Bug 48669 - A different mask or reference value in stencil operations should generate INVALID_OPERATION
: A different mask or reference value in stencil operations should generate INV...
Status: RESOLVED FIXED
: WebKit
WebGL
: 528+ (Nightly build)
: PC Mac OS X 10.5
: P2 Normal
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2010-10-29 14:05 PST by
Modified: 2010-11-03 16:53 PST (History)


Attachments
patch (9.15 KB, patch)
2010-11-02 17:35 PST, Zhenyao Mo
kbr: review+
zmo: commit‑queue-
Review Patch | Details | Formatted Diff | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2010-10-29 14:05:21 PST
WebGL Spec:

6.5 Stencil Separate Mask and Reference Value

In the WebGL API it is illegal to specify a different mask or reference value for front facing and back facing triangles in stencil operations. A call to stencilMaskSeparate will generate an INVALID_OPERATION error if FRONT mask is not equal to BACK mask. Similarly, a call to stencilFuncSeparate will generate an INVALID_OPERATION error if FRONT ref is not equal to BACK ref or FRONT mask is not equal to BACK mask.
------- Comment #1 From 2010-11-02 17:35:34 PST -------
Created an attachment (id=72775) [details]
patch
------- Comment #2 From 2010-11-03 16:32:32 PST -------
(From update of attachment 72775 [details])
This bug strongly indicates that stencilFuncSeparate and stencilMaskSeparate are completely useless in the WebGL API. Before r+'ing this I want to raise this issue with the WebGL working group.
------- Comment #3 From 2010-11-03 16:36:54 PST -------
(In reply to comment #2)
> (From update of attachment 72775 [details] [details])
> This bug strongly indicates that stencilFuncSeparate and stencilMaskSeparate are completely useless in the WebGL API. Before r+'ing this I want to raise this issue with the WebGL working group.

For stencilMaskSeparate yes, for stencilFuncSeparate, you can still specify different funcs for front and back, although they have to have the same ref and mask values.
------- Comment #4 From 2010-11-03 16:42:58 PST -------
(From update of attachment 72775 [details])
Thanks for pointing that out. Looks good in that case.
------- Comment #5 From 2010-11-03 16:53:39 PST -------
Committed r71282: <http://trac.webkit.org/changeset/71282>