[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Public WebGL] framebuffer-object-attachment test is not passable




Hi,

If I'm not mistaken, the second testAttachment call in framebuffer-object-attachment is not passable. It is:

        debug("Attach depth using STENCIL_ATTACHMENT");
        testAttachment(gl.STENCIL_ATTACHMENT, depthBuffer, true);

This is attaching a renderbuffer with DEPTH format to the STENCIL attachment point of a newly created framebuffer, and requiring the resulting framebuffer status to be FRAMEBUFFER_UNSUPPORTED.

If I understand it correctly, the OpenGL ES 2.0.25 spec requires the status to be FRAMEBUFFER_INCOMPLETE_ATTACHMENT in this case. Indeed, on page 118 it says that FRAMEBUFFER_INCOMPLETE_ATTACHMENT is returned if some framebuffer attachment point is not "Framebuffer Attachment Complete" while FRAMEBUFFER_UNSUPPORTED is returned in implementation-dependent cases.

The present case (DEPTH format buffer attached to STENCIL attachment point) is not an implementation-dependent case, and violates the "Framebuffer Attachment Complete" rules given on page 117: "If attachment is STENCIL_ATTACHMENT, then image must have a stencil-renderable internal format."

Thus, FRAMEBUFFER_INCOMPLETE_ATTACHMENT must be returned in this case.

To fix this, I propose that instead of the current isConflicted parameter, the testAttachment takes a bit-field, each bit allowing a different error status.

Cheers,
Benoit

-----------------------------------------------------------
You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email:
unsubscribe public_webgl
-----------------------------------------------------------