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
Product: WebKit
Classification: Unclassified
Component: WebGL
: 528+ (Nightly build)
: PC Mac OS X 10.5
: P2 Normal
Assigned To: Zhenyao Mo
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-10-29 14:05 PDT by Zhenyao Mo
Modified: 2010-11-03 16:53 PDT (History)
3 users (show)

See Also:


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

Note You need to log in before you can comment on or make changes to this bug.
Description Zhenyao Mo 2010-10-29 14:05:21 PDT
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 Zhenyao Mo 2010-11-02 17:35:34 PDT
Created attachment 72775 [details]
patch
Comment 2 Kenneth Russell 2010-11-03 16:32:32 PDT
Comment on attachment 72775 [details]
patch

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 Zhenyao Mo 2010-11-03 16:36:54 PDT
(In reply to comment #2)
> (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.

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 Kenneth Russell 2010-11-03 16:42:58 PDT
Comment on attachment 72775 [details]
patch

Thanks for pointing that out. Looks good in that case.
Comment 5 Zhenyao Mo 2010-11-03 16:53:39 PDT
Committed r71282: <http://trac.webkit.org/changeset/71282>