Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upImplement stencil fns for WebGLRenderingContext #10670
Conversation
highfive
commented
Apr 17, 2016
highfive
commented
Apr 17, 2016
|
|
||
| // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.3 | ||
| fn StencilOpSeparate(&self, face: u32, fail: u32, zfail: u32, zpass: u32) { | ||
| self.ipc_renderer |
This comment has been minimized.
This comment has been minimized.
KiChjang
Apr 17, 2016
Author
Member
I'm not sure if these methods need to validate their parameters as described here.
This comment has been minimized.
This comment has been minimized.
emilio
Apr 17, 2016
Member
Yes, all parameters should be validated first taking in account the GLES2.0 spec, and later taking in account any details that the WebGL spec could specify.
|
r? @emilio |
| @@ -1084,6 +1084,48 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext { | |||
| .unwrap() | |||
| } | |||
|
|
|||
| // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.3 | |||
| fn StencilFunc(&self, func: u32, ref_: i32, mask: u32) { | |||
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
KiChjang
Apr 17, 2016
•
Author
Member
In which case, should these functions have a [Throws] WebIDL attribute added to them?
This comment has been minimized.
This comment has been minimized.
emilio
Apr 17, 2016
Member
Nope! WebGL errors are tracked via gl.getError(), not via return values or exceptions.
This comment has been minimized.
This comment has been minimized.
cbrewster
Apr 17, 2016
•
Member
I do not think so, none of the other functions that can result in a WebGL error seem to have a [Throws] WebIDL attribute. Although I am sure @emilio would have a better answer.
0288fde
to
8f92097
|
Added checks for enum values with the stencil functions. |
| _ => return self.webgl_error(InvalidEnum), | ||
| } | ||
|
|
||
| match fail { |
This comment has been minimized.
This comment has been minimized.
|
Created a new function for checking stencil op parameters. |
|
|
6d767db
to
23eac18
|
Is now blocked on #10678. |
1fe62f0
to
1107c23
|
Should be ok to review now. |
|
Looks good to me, I usually prefer the early return approach instead of if else, but feel free to r=me if you think it's not worth the change. @bors-servo: try Reviewed 1 of 5 files at r1, 1 of 1 files at r6. Comments from Reviewable |
Implement stencil fns for WebGLRenderingContext Depends on servo/webrender#261. Closes #10659. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10670) <!-- Reviewable:end -->
|
|
|
It seems likely that #10790 is not actually intermittent and is a permanent failure exposed by the current set of changes. |
|
Yeah, it's consistently failed on OS X every time there hasn't been a linux failure first. |
|
That test should be fixed by #10443. Look at this comment though, to see why new correct implementations can lead to new test failures. |
|
|
|
@bors-servo try |
Implement stencil fns for WebGLRenderingContext Depends on servo/webrender#261. Closes #10659. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10670) <!-- Reviewable:end -->
|
|
|
@bors-servo r=emilio |
|
|
Implement stencil fns for WebGLRenderingContext Depends on servo/webrender#261. Closes #10659. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10670) <!-- Reviewable:end -->
|
|
|
I'd rather have waited for #10806 to land... But well, it landed so... :P |
KiChjang commentedApr 17, 2016
Depends on servo/webrender#261.
Closes #10659.
This change is