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

Issue 2183041: Added API to query for active attribs and uniforms. These functions are model... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 9 months ago by Alok Priyadarshi
Modified:
13 years, 9 months ago
Reviewers:
kbr1, gmanchromium, dgkoch
CC:
angleproject-review_googlegroups.com
Base URL:
http://angleproject.googlecode.com/svn/trunk/
Visibility:
Public.

Description

Added API to query for active attribs and uniforms. These functions are modeled after glGetShaderiv, glGetProgramiv, glGetActiveAttrib, and glGetActiveUniform. The main difference between this and OpenGL API is that we do not have programs - just shaders. BUG=26

Patch Set 1 #

Total comments: 2

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+417 lines, -259 lines) Patch
M include/GLSLANG/ShaderLang.h View 1 2 3 chunks +132 lines, -22 lines 0 comments Download
M samples/translator/translator.cpp View 6 chunks +19 lines, -11 lines 0 comments Download
M src/compiler/InfoSink.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/ShaderLang.cpp View 3 chunks +81 lines, -44 lines 2 comments Download
M src/compiler/intermOut.cpp View 8 chunks +175 lines, -175 lines 0 comments Download
M src/libGLESv2/Shader.cpp View 1 chunk +9 lines, -7 lines 0 comments Download

Messages

Total messages: 19
Alok Priyadarshi
Please review the API. I will have further work to do once the API is ...
13 years, 9 months ago (2010-09-14 01:53:40 UTC) #1
gmanchromium
Personally I'd prefer it just hand me some struct but I can see the advantage ...
13 years, 9 months ago (2010-09-14 16:17:09 UTC) #2
kbr1
The API looks fine; one comment on precise documentation of null terminators and buffer lengths ...
13 years, 9 months ago (2010-09-14 17:14:04 UTC) #3
Alok Priyadarshi
> But, if that's the goal then it would be nice in the various constants ...
13 years, 9 months ago (2010-09-14 17:31:03 UTC) #4
Alok Priyadarshi
Added more comments about null-terminated strings. http://codereview.appspot.com/2183041/diff/1/include/GLSLANG/ShaderLang.h File include/GLSLANG/ShaderLang.h (right): http://codereview.appspot.com/2183041/diff/1/include/GLSLANG/ShaderLang.h#newcode158 include/GLSLANG/ShaderLang.h:158: // ShGetInfo with ...
13 years, 9 months ago (2010-09-14 17:52:20 UTC) #5
kbr1
On 2010/09/14 17:31:03, alokp wrote: > > But, if that's the goal then it would ...
13 years, 9 months ago (2010-09-14 18:05:43 UTC) #6
dgkoch
On 2010/09/14 17:31:03, alokp wrote: > Do values for OpenGL enums change? No the enum ...
13 years, 9 months ago (2010-09-14 18:07:47 UTC) #7
Alok Priyadarshi
On 2010/09/14 18:07:47, dgkoch wrote: > On 2010/09/14 17:31:03, alokp wrote: > > Do values ...
13 years, 9 months ago (2010-09-14 18:26:25 UTC) #8
kbr1
On 2010/09/14 18:26:25, alokp wrote: > On 2010/09/14 18:07:47, dgkoch wrote: > > On 2010/09/14 ...
13 years, 9 months ago (2010-09-14 19:53:47 UTC) #9
Alok Priyadarshi
> (2) should work. These enum values have not changed in years. You'd want to ...
13 years, 9 months ago (2010-09-14 19:59:05 UTC) #10
Alok Priyadarshi
> Daniel's point is a good one. The indices passed to the currently named > ...
13 years, 9 months ago (2010-09-14 20:04:45 UTC) #11
kbr1
On 2010/09/14 20:04:45, alokp wrote: > > Daniel's point is a good one. The indices ...
13 years, 9 months ago (2010-09-14 20:11:28 UTC) #12
Alok Priyadarshi
> I guess that sounds OK. Let's do rename them though to get rid of ...
13 years, 9 months ago (2010-09-14 22:09:18 UTC) #13
gmanchromium
On Tue, Sep 14, 2010 at 12:53 PM, <kbr@chromium.org> wrote: > On 2010/09/14 18:26:25, alokp ...
13 years, 9 months ago (2010-09-14 22:51:47 UTC) #14
Alok Priyadarshi
All changes are uploaded. Please review. I have left "active" in the function and enum ...
13 years, 9 months ago (2010-09-14 23:30:35 UTC) #15
dgkoch
On 2010/09/14 23:30:35, alokp wrote: > I have left "active" in the function and enum ...
13 years, 9 months ago (2010-09-15 03:17:24 UTC) #16
dgkoch
http://codereview.appspot.com/2183041/diff/22001/src/compiler/ShaderLang.cpp File src/compiler/ShaderLang.cpp (left): http://codereview.appspot.com/2183041/diff/22001/src/compiler/ShaderLang.cpp#oldcode310 src/compiler/ShaderLang.cpp:310: if (!InitThread()) did you mean to drop the !InitThread ...
13 years, 9 months ago (2010-09-15 03:17:45 UTC) #17
Alok Priyadarshi
Thanks guys! http://codereview.appspot.com/2183041/diff/22001/src/compiler/ShaderLang.cpp File src/compiler/ShaderLang.cpp (left): http://codereview.appspot.com/2183041/diff/22001/src/compiler/ShaderLang.cpp#oldcode310 src/compiler/ShaderLang.cpp:310: if (!InitThread()) On 2010/09/15 03:17:46, dgkoch wrote: ...
13 years, 9 months ago (2010-09-15 03:46:40 UTC) #18
dgkoch
13 years, 9 months ago (2010-09-15 04:04:10 UTC) #19
On 2010/09/15 03:46:40, alokp wrote:
> 
> Yes. It is only needed in ShCompile() and ShConstructCompiler(). Rest of the
> functions do not access TLS. They only return information already stored in
the
> compiler object.

Ok thanks.

> BTW for all the threading code here, I do not think that this library is
thread
> safe. The preprocessor interface modifies many global variables. I also
believe
> there will be memory leaks if used in a multi-threaded way. I plan to fix all
> that eventually.

No I don't really expect it is either.  All of that is from the original 3Dlabs
code.

Daniel
Sign in to reply to this message.

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