Closed
Bug 571076
Opened 15 years ago
Closed 15 years ago
Implement GetAttachedShaders
Categories
(Core :: Graphics: CanvasWebGL, defect)
Core
Graphics: CanvasWebGL
Tracking
()
RESOLVED
FIXED
People
(Reporter: vlad, Assigned: bjacob)
Details
Attachments
(2 files, 2 obsolete files)
5.82 KB,
patch
|
vlad
:
review+
|
Details | Diff | Splinter Review |
9.61 KB,
patch
|
vlad
:
review+
|
Details | Diff | Splinter Review |
Should return a JS array of (nsI)WebGLShader.
Assignee | ||
Comment 1•15 years ago
|
||
Patch; note that no existing conformance test covers this function at all. So the only thing that I checked, is that it compiles. Should learn some JS...
Attachment #450414 -
Flags: review?(vladimir)
Reporter | ||
Comment 2•15 years ago
|
||
Sounds like I shouldn't review this until you create and add a test! :-)
Assignee | ||
Comment 3•15 years ago
|
||
hehehe :)
Assignee | ||
Comment 4•15 years ago
|
||
Here's a patch against the program-test.html test, making it test getAttachedShaders. Do you think 1) it's enough testing and 2) that this test change would be OK to commit to khronos.org?
Attachment #450435 -
Flags: review?(vladimir)
Reporter | ||
Comment 5•15 years ago
|
||
Nope, not nearly enough testing (also space after "if"); this should test at least --
- getting attached shaders with a program with no shaders (empty list)
- with a few shaders attached
- removing a shader, then checking the list
- removing all shaders, ensuring list is empty
- maybe adding some shaders whose compilation purposely fails, and checking that they still exist in the list
Assignee | ||
Comment 6•15 years ago
|
||
This new version fixes an issue discovered while testing (see next comment): GetAttachedShaders was returning null object instead of empty list.
It also fixes an issue in LinkProgram: when the program doesn't have both shader types attached, the result was INVALID_OPERATION, but according to the OpenGL ES documentation, this shouldn't generate any GL error, it should simply let the program in a failed link status.
Attachment #450414 -
Attachment is obsolete: true
Attachment #451077 -
Flags: review?(vladimir)
Attachment #450414 -
Flags: review?(vladimir)
Assignee | ||
Comment 7•15 years ago
|
||
This patch expands a lot the program-test. It allowed to catch the 2 issues mentioned in the previous comment.
Attachment #450435 -
Attachment is obsolete: true
Attachment #451078 -
Flags: review?(vladimir)
Attachment #450435 -
Flags: review?(vladimir)
Reporter | ||
Comment 8•15 years ago
|
||
Comment on attachment 451078 [details] [diff] [review]
Expand the WebGL program test
Looks good, though a style comment on the tests.. right now the tests create a new program for each check and validate each step along the way. That's probably fine, but it would also be ok (and maybe easier to follow) if you just used one program, attaching/detaching shaders along the way and validating that the set of attached shaders is consistent after each step. Up to you which way you want to keep it, though.
Attachment #451078 -
Flags: review?(vladimir) → review+
Reporter | ||
Updated•15 years ago
|
Attachment #451077 -
Flags: review?(vladimir) → review+
Assignee | ||
Comment 9•15 years ago
|
||
My fear is that, since we store state in WebGLProgram, reusing a WebGLProgram object may lead to different behavior (if we have a bug). So I felt more comfortable creating a new WebGLProgram everytime. Is that reasonable?
Assignee | ||
Comment 10•15 years ago
|
||
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•