Title: [287923] trunk
Revision
287923
Author
cl...@igalia.com
Date
2022-01-12 07:04:39 -0800 (Wed, 12 Jan 2022)

Log Message

[WPE] Fix building WebXR with ANGLE enabled
https://bugs.webkit.org/show_bug.cgi?id=235108

Reviewed by Alejandro G. Castro.

.:

Remove conflict between WebXR and ANGLE WebGL for WPE.

* Source/cmake/OptionsWPE.cmake:

Source/WebCore:

Fix building both ANGLE WebGL and WebXR simultaneously when GLES is
being used.

* Modules/webxr/WebXROpaqueFramebuffer.cpp:
(WebCore::WebXROpaqueFramebuffer::startFrame):
(WebCore::WebXROpaqueFramebuffer::setupFramebuffer):

Modified Paths

Diff

Modified: trunk/ChangeLog (287922 => 287923)


--- trunk/ChangeLog	2022-01-12 14:37:38 UTC (rev 287922)
+++ trunk/ChangeLog	2022-01-12 15:04:39 UTC (rev 287923)
@@ -1,5 +1,16 @@
 2022-01-12  Chris Lord  <cl...@igalia.com>
 
+        [WPE] Fix building WebXR with ANGLE enabled
+        https://bugs.webkit.org/show_bug.cgi?id=235108
+
+        Reviewed by Alejandro G. Castro.
+
+        Remove conflict between WebXR and ANGLE WebGL for WPE.
+
+        * Source/cmake/OptionsWPE.cmake:
+
+2022-01-12  Chris Lord  <cl...@igalia.com>
+
         [WPE] Enable WebGL ANGLE support
         https://bugs.webkit.org/show_bug.cgi?id=235064
 

Modified: trunk/Source/WebCore/ChangeLog (287922 => 287923)


--- trunk/Source/WebCore/ChangeLog	2022-01-12 14:37:38 UTC (rev 287922)
+++ trunk/Source/WebCore/ChangeLog	2022-01-12 15:04:39 UTC (rev 287923)
@@ -1,3 +1,17 @@
+2022-01-12  Chris Lord  <cl...@igalia.com>
+
+        [WPE] Fix building WebXR with ANGLE enabled
+        https://bugs.webkit.org/show_bug.cgi?id=235108
+
+        Reviewed by Alejandro G. Castro.
+
+        Fix building both ANGLE WebGL and WebXR simultaneously when GLES is
+        being used.
+
+        * Modules/webxr/WebXROpaqueFramebuffer.cpp:
+        (WebCore::WebXROpaqueFramebuffer::startFrame):
+        (WebCore::WebXROpaqueFramebuffer::setupFramebuffer):
+
 2022-01-12  Alan Bujtas  <za...@apple.com>
 
         [LFC][IFC] Incorrect negative margin handling (both left/right) with RTL inline base direction

Modified: trunk/Source/WebCore/Modules/webxr/WebXROpaqueFramebuffer.cpp (287922 => 287923)


--- trunk/Source/WebCore/Modules/webxr/WebXROpaqueFramebuffer.cpp	2022-01-12 14:37:38 UTC (rev 287922)
+++ trunk/Source/WebCore/Modules/webxr/WebXROpaqueFramebuffer.cpp	2022-01-12 15:04:39 UTC (rev 287923)
@@ -31,11 +31,9 @@
 
 #if !USE(ANGLE)
 #include "ExtensionsGLOpenGLCommon.h"
-#endif
 #if USE(OPENGL_ES)
 #include "ExtensionsGLOpenGLES.h"
 #endif
-#if !USE(ANGLE)
 #include "GraphicsContextGL.h"
 #endif
 #include "IntSize.h"
@@ -178,7 +176,7 @@
 #else
     m_opaqueTexture = data.opaqueTexture;
 
-#if USE(OPENGL_ES)
+#if USE(OPENGL_ES) && !USE(ANGLE)
     auto& extensions = reinterpret_cast<ExtensionsGLOpenGLES&>(gl.getExtensions());
     if (m_attributes.antialias && extensions.isImagination()) {
         extensions.framebufferTexture2DMultisampleIMG(GL::FRAMEBUFFER, GL::COLOR_ATTACHMENT0, GL::TEXTURE_2D, m_opaqueTexture, 0, m_sampleCount);
@@ -269,15 +267,15 @@
 
     // Set up color, depth and stencil formats
     bool hasDepthOrStencil = m_attributes.stencil || m_attributes.depth;
-#if USE(OPENGL_ES)
+#if USE(ANGLE)
+    bool platformSupportsPackedDepthStencil = true;
+    auto depthFormat = platformSupportsPackedDepthStencil ? GL::DEPTH24_STENCIL8 : GL::DEPTH_COMPONENT;
+    auto stencilFormat = GL::STENCIL_INDEX8;
+#elif USE(OPENGL_ES)
     auto& extensions = reinterpret_cast<ExtensionsGLOpenGLES&>(gl.getExtensions());
     bool platformSupportsPackedDepthStencil = hasDepthOrStencil && extensions.supports("GL_OES_packed_depth_stencil");
     auto depthFormat = platformSupportsPackedDepthStencil ? GL::DEPTH24_STENCIL8 : GL::DEPTH_COMPONENT16;
     auto stencilFormat = GL::STENCIL_INDEX8;
-#elif USE(ANGLE)
-    bool platformSupportsPackedDepthStencil = true;
-    auto depthFormat = platformSupportsPackedDepthStencil ? GL::DEPTH24_STENCIL8 : GL::DEPTH_COMPONENT;
-    auto stencilFormat = GL::STENCIL_INDEX8;
 #else
     auto& extensions = reinterpret_cast<ExtensionsGLOpenGLCommon&>(gl.getExtensions());
     bool platformSupportsPackedDepthStencil = hasDepthOrStencil && extensions.supports("GL_EXT_packed_depth_stencil");
@@ -298,7 +296,7 @@
         m_sampleCount = std::min(4, maxSampleCount);
     }
 
-#if USE(OPENGL_ES)
+#if USE(OPENGL_ES) && !USE(ANGLE)
     // Use multisampled_render_to_texture extension if available.
     if (m_attributes.antialias && extensions.isImagination()) {
         // framebufferTexture2DMultisampleIMG is set up in startFrame call.

Modified: trunk/Source/cmake/OptionsWPE.cmake (287922 => 287923)


--- trunk/Source/cmake/OptionsWPE.cmake	2022-01-12 14:37:38 UTC (rev 287922)
+++ trunk/Source/cmake/OptionsWPE.cmake	2022-01-12 15:04:39 UTC (rev 287923)
@@ -89,8 +89,6 @@
 WEBKIT_OPTION_DEFINE(USE_ANGLE_WEBGL "Whether to use ANGLE as WebGL backend." PRIVATE OFF)
 WEBKIT_OPTION_DEPEND(USE_ANGLE_WEBGL ENABLE_WEBGL)
 
-WEBKIT_OPTION_CONFLICT(USE_ANGLE_WEBGL ENABLE_WEBXR)
-
 if (CMAKE_SYSTEM_NAME MATCHES "Linux")
     WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_BUBBLEWRAP_SANDBOX PUBLIC ON)
     WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEMORY_SAMPLER PRIVATE ON)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to