RESOLVED FIXED 50716
Update validation of stencil mask and ref values
https://bugs.webkit.org/show_bug.cgi?id=50716
Summary Update validation of stencil mask and ref values
Kenneth Russell
Reported 2010-12-08 14:05:56 PST
Based on feedback from Daniel Koch from TransGaming, the section in the WebGL spec on restrictions on the stencil mask and ref values has been changed to do the validation at draw time rather than when stencilMaskSeparate and stencilFuncSeparate are called, since generating an INVALID_OPERATION error from those entry points may make it hard for applications to transition between states. The WebKit implementation needs to be updated to do the validation then as well. Ideally stencilMaskSeparate and stencilFuncSeparate would set a boolean flag which can be easily checked in drawArrays and drawElements.
Attachments
Patch (26.07 KB, patch)
2010-12-29 10:59 PST, Zhenyao Mo
kbr: review+
Zhenyao Mo
Comment 1 2010-12-29 10:59:33 PST
Kenneth Russell
Comment 2 2010-12-29 18:34:20 PST
Comment on attachment 77631 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=77631&action=review Looks good; one cleanup upon landing please. > WebCore/html/canvas/WebGLRenderingContext.cpp:1119 > + if (m_stencilMask != m_stencilMaskBack || m_stencilFuncRef != m_stencilFuncRefBack || m_stencilFuncMask != m_stencilFuncMaskBack) { > + m_context->synthesizeGLError(GraphicsContext3D::INVALID_OPERATION); > + return; > + } > + Could you please refactor these tests into a helper function similar to validateDrawMode?
Zhenyao Mo
Comment 3 2010-12-30 11:11:43 PST
(In reply to comment #2) > (From update of attachment 77631 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=77631&action=review > > Looks good; one cleanup upon landing please. > > > WebCore/html/canvas/WebGLRenderingContext.cpp:1119 > > + if (m_stencilMask != m_stencilMaskBack || m_stencilFuncRef != m_stencilFuncRefBack || m_stencilFuncMask != m_stencilFuncMaskBack) { > > + m_context->synthesizeGLError(GraphicsContext3D::INVALID_OPERATION); > > + return; > > + } > > + > > Could you please refactor these tests into a helper function similar to validateDrawMode? Will do.
Zhenyao Mo
Comment 4 2010-12-30 17:34:15 PST
Zhenyao Mo
Comment 5 2010-12-30 17:36:00 PST
Again, webkit-patch land does not close the bug automatically and I had to manually add the committed message and close the bug. This is the second time this happened. Both time I called webkit-patch land remotely through PUTTY.
WebKit Review Bot
Comment 6 2010-12-30 18:18:19 PST
http://trac.webkit.org/changeset/74818 might have broken SnowLeopard Intel Release (Tests)
Zhenyao Mo
Comment 7 2010-12-30 18:48:39 PST
Zhenyao Mo
Comment 8 2010-12-30 18:51:11 PST
(In reply to comment #7) > Committed r74820: <http://trac.webkit.org/changeset/74820> I had to commit test changes a second time. I really don't understand what's happening here. Seems like r74818 only picked up changes under WebCore but not under LayoutTests; however, it picked up both change logs. Really strange. Again, I did the two commits through PUTTY.
Kenneth Russell
Comment 9 2011-01-04 12:44:19 PST
(In reply to comment #8) > (In reply to comment #7) > > Committed r74820: <http://trac.webkit.org/changeset/74820> > > I had to commit test changes a second time. I really don't understand what's happening here. Seems like r74818 only picked up changes under WebCore but not under LayoutTests; however, it picked up both change logs. Really strange. > > Again, I did the two commits through PUTTY. I'm not sure this could be the issue, but I always run webkit-patch land while cd'd into the top-level WebKit directory, just like svn-create-patch.
Note You need to log in before you can comment on or make changes to this bug.