Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(493)

Issue 5056048: [GPU] Use new Var type for inputs/outputs of FS and VS (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 3 months ago by bsalomon
Modified:
13 years, 2 months ago
CC:
skia-review_googlegroups.com
Base URL:
http://skia.googlecode.com/svn/trunk/
Visibility:
Public.

Description

This change makes us gather all the inputs / outputs of the FS and VS using a new type, Var, and defers generating the declarations until the end. At that time the GLSL version is used to determine how they are declared.

Patch Set 1 #

Patch Set 2 : cleanup #

Patch Set 3 : fix glsl v1.2 support #

Patch Set 4 : comment update #

Patch Set 5 : handle fs outputs as vararrays #

Patch Set 6 : function for printing a shader from array of strings #

Total comments: 16

Patch Set 7 : add assertion that declared FS outputs are not used with GLSL 1.2 #

Patch Set 8 : make assert look for != 1.2 rather than == 1.5 #

Patch Set 9 : incorporate comments #

Patch Set 10 : remove decl of deleted function #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+623 lines, -207 lines) Patch
M gpu/include/GrAllocator.h View 1 2 3 4 5 6 7 8 4 chunks +11 lines, -4 lines 0 comments Download
M gpu/src/GrGLProgram.h View 1 2 3 4 5 6 7 8 9 5 chunks +9 lines, -12 lines 0 comments Download
M gpu/src/GrGLProgram.cpp View 1 2 3 4 5 6 7 8 31 chunks +302 lines, -167 lines 4 comments Download
A gpu/src/GrGLShaderVar.h View 1 2 3 4 5 6 7 8 1 chunk +217 lines, -0 lines 0 comments Download
M gpu/src/GrGpuGL.h View 1 2 3 4 5 6 7 8 3 chunks +5 lines, -5 lines 0 comments Download
M gpu/src/GrGpuGLShaders.cpp View 1 2 3 4 5 6 7 8 6 chunks +40 lines, -19 lines 0 comments Download
M gyp/gpu.gyp View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M include/core/SkTArray.h View 1 2 3 4 5 6 7 8 2 chunks +38 lines, -0 lines 0 comments Download

Messages

Total messages: 11
bsalomon
13 years, 3 months ago (2011-09-19 20:16:16 UTC) #1
junov1
In the shader code segments, could we get rid of VSAttrs and VSUnis, and just ...
13 years, 3 months ago (2011-09-19 20:30:48 UTC) #2
junov1
On 2011/09/19 20:30:48, junov1 wrote: > In the shader code segments, could we get rid ...
13 years, 3 months ago (2011-09-19 20:40:14 UTC) #3
bsalomon
On 2011/09/19 20:40:14, junov1 wrote: > On 2011/09/19 20:30:48, junov1 wrote: > > In the ...
13 years, 3 months ago (2011-09-19 20:47:57 UTC) #4
junov1
http://codereview.appspot.com/5056048/diff/3006/gpu/src/GrGLProgram.cpp File gpu/src/GrGLProgram.cpp (right): http://codereview.appspot.com/5056048/diff/3006/gpu/src/GrGLProgram.cpp#newcode178 gpu/src/GrGLProgram.cpp:178: typedef SkTArray<Var> VarArray; How about this: class VarArray : ...
13 years, 3 months ago (2011-09-19 21:08:36 UTC) #5
Stephen White
This looks ok. I'm a little concerned that this level of refactoring is resulting in ...
13 years, 3 months ago (2011-09-19 22:01:59 UTC) #6
bsalomon
http://codereview.appspot.com/5056048/diff/3006/gpu/src/GrGLProgram.cpp File gpu/src/GrGLProgram.cpp (right): http://codereview.appspot.com/5056048/diff/3006/gpu/src/GrGLProgram.cpp#newcode75 gpu/src/GrGLProgram.cpp:75: class Var { On 2011/09/19 22:01:59, Stephen White wrote: ...
13 years, 2 months ago (2011-09-20 14:39:21 UTC) #7
junov1
> OpenGL has 2 digit version numbers, well within floating point precision. It > would ...
13 years, 2 months ago (2011-09-20 15:53:20 UTC) #8
Stephen White
LGTM. http://codereview.appspot.com/5056048/diff/27002/gpu/src/GrGLProgram.cpp File gpu/src/GrGLProgram.cpp (right): http://codereview.appspot.com/5056048/diff/27002/gpu/src/GrGLProgram.cpp#newcode43 gpu/src/GrGLProgram.cpp:43: : fVSUnis(8) Nit: these integer constants seem kind ...
13 years, 2 months ago (2011-09-20 15:58:30 UTC) #9
bsalomon
>Even with just two digits, the float representation may not be able to represent >3.3 ...
13 years, 2 months ago (2011-09-20 17:21:48 UTC) #10
bsalomon
13 years, 2 months ago (2011-09-21 15:16:34 UTC) #11
Closed with r2291
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b