Title: [252751] trunk/Source/WebCore
Revision
252751
Author
justin_...@apple.com
Date
2019-11-21 13:47:59 -0800 (Thu, 21 Nov 2019)

Log Message

[WebGL] Fix framebufferTexture2D with DEPTH_STENCIL_ATTACHMENT on ANGLE
https://bugs.webkit.org/show_bug.cgi?id=204433

Reviewed by Dean Jackson.

ANGLE expects requests for DEPTH_STENCIL_ATTACHMENT to not be split into two calls, as previous WebGL 1 backend required.

No new tests. Prevents conformance/extensions/webgl-depth-texture.html regression when run with the ANGLE backend.

* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::framebufferTexture2D):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (252750 => 252751)


--- trunk/Source/WebCore/ChangeLog	2019-11-21 21:42:42 UTC (rev 252750)
+++ trunk/Source/WebCore/ChangeLog	2019-11-21 21:47:59 UTC (rev 252751)
@@ -1,3 +1,17 @@
+2019-11-21  Justin Fan  <justin_...@apple.com>
+
+        [WebGL] Fix framebufferTexture2D with DEPTH_STENCIL_ATTACHMENT on ANGLE
+        https://bugs.webkit.org/show_bug.cgi?id=204433
+
+        Reviewed by Dean Jackson.
+
+        ANGLE expects requests for DEPTH_STENCIL_ATTACHMENT to not be split into two calls, as previous WebGL 1 backend required.
+
+        No new tests. Prevents conformance/extensions/webgl-depth-texture.html regression when run with the ANGLE backend.
+
+        * html/canvas/WebGLRenderingContextBase.cpp:
+        (WebCore::WebGLRenderingContextBase::framebufferTexture2D):
+
 2019-11-21  Zalan Bujtas  <za...@apple.com>
 
         [LFC][IFC] Cache trailing trimmable width.

Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp (252750 => 252751)


--- trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp	2019-11-21 21:42:42 UTC (rev 252750)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp	2019-11-21 21:47:59 UTC (rev 252751)
@@ -2472,20 +2472,15 @@
         return;
     }
     Platform3DObject textureObject = objectOrZero(texture);
-    switch (attachment) {
-    case GraphicsContext3D::DEPTH_STENCIL_ATTACHMENT:
+
+#if !USE_ANGLE
+    if (attachment == GraphicsContext3D::DEPTH_STENCIL_ATTACHMENT) {
         m_context->framebufferTexture2D(target, GraphicsContext3D::DEPTH_ATTACHMENT, textarget, textureObject, level);
         m_context->framebufferTexture2D(target, GraphicsContext3D::STENCIL_ATTACHMENT, textarget, textureObject, level);
-        break;
-    case GraphicsContext3D::DEPTH_ATTACHMENT:
+    } else
+#endif
         m_context->framebufferTexture2D(target, attachment, textarget, textureObject, level);
-        break;
-    case GraphicsContext3D::STENCIL_ATTACHMENT:
-        m_context->framebufferTexture2D(target, attachment, textarget, textureObject, level);
-        break;
-    default:
-        m_context->framebufferTexture2D(target, attachment, textarget, textureObject, level);
-    }
+
     targetFramebuffer->setAttachmentForBoundFramebuffer(attachment, textarget, texture, level);
     applyStencilTest();
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to