Closed Bug 616608 Opened 9 years ago Closed 9 years ago

Pass the rest of webgl-specific.html test (sections 6.4, 6.5, 6.7 of the spec)

Categories

(Core :: Canvas: WebGL, defect)

defect
Not set

Tracking

()

RESOLVED FIXED

People

(Reporter: bjacob, Assigned: bjacob)

Details

Attachments

(3 files, 2 obsolete files)

First patch: pass section 6.7 on depthRange.
Attachment #495107 - Flags: review?(vladimir)
Assignee: nobody → bjacob
Status: NEW → ASSIGNED
Attachment #495111 - Flags: review?(vladimir)
Just doing this formally, to get this test page green.
Attachment #495116 - Flags: review?(vladimir)
Comment on attachment 495111 [details] [diff] [review]
implement section 6.5 on separate parameters

>+    if (ref != mStencilRef || mask != mStencilValueMask)
>+        return ErrorInvalidOperation("stencilFuncSeparate: WebGL doesn't currently allow specifying "
>+                                     "different values for front and back, i.e. this function is currently useless.");

Let's not get snarky here :-)  "WebGL requires the same values for both front and back stencil mask" or something.  Also, this function can still work fine, if the specified face is GL_FRONT_AND_BACK, in which case it should work the same as glStencilMask.

> NS_IMETHODIMP
> WebGLContext::StencilMaskSeparate(WebGLenum face, WebGLuint mask)
> {
>     if (!ValidateFaceEnum(face, "stencilMaskSeparate: face"))
>         return NS_OK;
> 
>+    if (mask != mStencilWriteMask)
>+        return ErrorInvalidOperation("stencilMaskSeparate: WebGL doesn't currently allow specifying "
>+                                     "different values for front and back, i.e. this function is currently useless.");
>+

Same thing here for face == FRONT_AND_BACK; the function should set the write mask and mStencilWriteMask if face == FRONT_AND_BACK.
Attachment #495111 - Flags: review?(vladimir) → review-
OK, I had overlooked FRONT_AND_BACK in the logic.
Attachment #495111 - Attachment is obsolete: true
Attachment #495126 - Flags: review?(vladimir)
Forgot to update the values.
Attachment #495126 - Attachment is obsolete: true
Attachment #495128 - Flags: review?(vladimir)
Attachment #495126 - Flags: review?(vladimir)
Comment on attachment 495128 [details] [diff] [review]
implement section 6.5 on separate parameters

thanks :)
Attachment #495128 - Flags: review?(vladimir) → review+
Attachment #495107 - Flags: approval2.0+
Attachment #495116 - Flags: approval2.0+
Attachment #495128 - Flags: approval2.0+
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.