RESOLVED FIXED 46318
Perform framebuffer attachment checking upon draw call rather than attachment
https://bugs.webkit.org/show_bug.cgi?id=46318
Summary Perform framebuffer attachment checking upon draw call rather than attachment
Kenneth Russell
Reported 2010-09-22 16:18:48 PDT
Per recent changes to the WebGL specification (Framebuffer Object Attachments, section 6.3), checks about the validity of the framebuffer configuration need to occur upon draw call rather than at the point a renderbuffer is attached to a framebuffer. In particular: - Attachments to more than one attachment point (DEPTH, STENCIL, DEPTH_STENCIL) are illegal. - The attachment's format must match that of the attachment point. The reason for this is to avoid implicitly supporting separate depth+stencil (or packed depth+stencil) on some platforms and not others.
Attachments
patch (26.81 KB, patch)
2010-10-28 16:18 PDT, Zhenyao Mo
kbr: review-
zmo: commit-queue-
revised patch: responding to kbr's review (26.72 KB, patch)
2010-11-02 15:56 PDT, Zhenyao Mo
kbr: review+
zmo: commit-queue-
Zhenyao Mo
Comment 1 2010-10-28 16:18:12 PDT
Created attachment 72252 [details] patch I will commit the test change to khronos once reviewed.
Kenneth Russell
Comment 2 2010-11-02 11:44:55 PDT
Comment on attachment 72252 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=72252&action=review Looks good overall. Couple of minor comments. > WebCore/html/canvas/WebGLFramebuffer.cpp:38 > +static unsigned long getInternalFormat(WebGLObject* buffer) You could use an anonymous namespace instead of static methods here. > WebCore/html/canvas/WebGLFramebuffer.cpp:141 > + return true; This test seems redundant. > WebCore/html/canvas/WebGLFramebuffer.h:49 > + // readPixels, copyTexImage2D, copyTexSubImage2D if this frame bufferis bufferis -> buffer is
Kenneth Russell
Comment 3 2010-11-02 11:52:53 PDT
Comment on attachment 72252 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=72252&action=review Sorry, I noticed an issue after r+'ing the patch. Hopefully you get this email before landing. > WebCore/html/canvas/WebGLRenderingContext.cpp:458 > + return GraphicsContext3D::FRAMEBUFFER_INCOMPLETE_ATTACHMENT; According to the spec this is supposed to be FRAMEBUFFER_UNSUPPORTED. Is there a reason to diverge? If not, please update the code and the test.
Zhenyao Mo
Comment 4 2010-11-02 15:56:22 PDT
Created attachment 72754 [details] revised patch: responding to kbr's review
Kenneth Russell
Comment 5 2010-11-02 16:14:01 PDT
Comment on attachment 72754 [details] revised patch: responding to kbr's review Looks good. Thanks for taking care of this. Don't forget to sync the test with the Khronos repository.
Zhenyao Mo
Comment 6 2010-11-02 17:24:19 PDT
Note You need to log in before you can comment on or make changes to this bug.