Bug 148930

Summary: [WebGL] Return correct values for GL_STENCIL_VALUE_MASK and GL_STENCIL_WRITE_MASK
Product: WebKit Reporter: Jinyoung Hur <hur.ims>
Component: WebGLAssignee: Jinyoung Hur <hur.ims>
Status: RESOLVED WONTFIX    
Severity: Normal CC: dino
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch dino: review+

Description Jinyoung Hur 2015-09-07 07:12:10 PDT
n
Comment 1 Jinyoung Hur 2015-09-07 07:14:26 PDT
It seems that ANGLE clamps GL_STENCIL_VALUE_MASK, GL_STENCIL_BACK_VALUE_MASK, GL_STENCIL_WRITEMASK and GL_STENCIL_BACK_WRITEMASK values into max integer, which results in the value change(0xffffffff --> 0x7fffffff) unintentionally.
Comment 2 Jinyoung Hur 2015-09-07 07:22:41 PDT
Created attachment 260737 [details]
Patch
Comment 3 Jinyoung Hur 2015-09-07 07:35:19 PDT
Without this patch, fast/canvas/webgl/gl-get-calls.html fails on ANGLE backed OpenGL ES  platform.
Comment 4 Dean Jackson 2015-09-10 11:08:19 PDT
Comment on attachment 260737 [details]
Patch

We can apply this in WebKit, but you really need the change to be made in ANGLE. Also, is there a way to test this?
Comment 5 Jinyoung Hur 2015-09-10 11:33:59 PDT
(In reply to comment #4)
> Comment on attachment 260737 [details]
> Patch
> 
> We can apply this in WebKit, but you really need the change to be made in
> ANGLE. Also, is there a way to test this?

Ok then, I think it would be safe to commit this patch after landed on ANGLE project first.

I believe there is no way to test this because no ports are using ANGLE as its OpenGL implementation but mine.
My team's port is using ANGLE backed OpenGL APIs so I could find this bug.

Anyway, thanks for review!
Comment 6 Jinyoung Hur 2015-09-15 11:42:11 PDT
ANGLE seems implemented correctly based on the OpenGL ES 3.0 spec.
So this patch should be abandoned.

Instead, I'm trying to modify fast/canvas/webgl/gl-get-calls.html at https://bugs.webkit.org/show_bug.cgi?id=149174
Comment 7 Jinyoung Hur 2015-09-15 11:48:46 PDT
(In reply to comment #6)
> ANGLE seems implemented correctly based on the OpenGL ES 3.0 spec.
> So this patch should be abandoned.
> 
> Instead, I'm trying to modify fast/canvas/webgl/gl-get-calls.html at
> https://bugs.webkit.org/show_bug.cgi?id=149174

Review from an ANGLE people.
https://chromium-review.googlesource.com/#/c/299564/