Title: [254400] trunk
Revision
254400
Author
[email protected]
Date
2020-01-11 09:42:01 -0800 (Sat, 11 Jan 2020)

Log Message

[WebGL] Clarify USE_OPENGL_ES_3
https://bugs.webkit.org/show_bug.cgi?id=206081
<rdar://problem/58486798>

Reviewed by Simon Fraser.

Make it clear that USE_ANGLE | USE_OPENGL | USE_OPENGL_ES are exclusive,
and that the availability of OpenGL ES 3 is a separate query.

.:

* Source/cmake/OptionsFTW.cmake:
* Source/cmake/OptionsWPE.cmake:
* Source/cmake/OptionsWinCairo.cmake:

Source/WebCore:

* platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp:

Source/WTF:

* wtf/Platform.h:

Modified Paths

Diff

Modified: trunk/ChangeLog (254399 => 254400)


--- trunk/ChangeLog	2020-01-11 17:31:59 UTC (rev 254399)
+++ trunk/ChangeLog	2020-01-11 17:42:01 UTC (rev 254400)
@@ -1,3 +1,18 @@
+2020-01-10  Dean Jackson  <[email protected]>
+
+        [WebGL] Clarify USE_OPENGL_ES_3
+        https://bugs.webkit.org/show_bug.cgi?id=206081
+        <rdar://problem/58486798>
+
+        Reviewed by Simon Fraser.
+
+        Make it clear that USE_ANGLE | USE_OPENGL | USE_OPENGL_ES are exclusive,
+        and that the availability of OpenGL ES 3 is a separate query.
+
+        * Source/cmake/OptionsFTW.cmake:
+        * Source/cmake/OptionsWPE.cmake:
+        * Source/cmake/OptionsWinCairo.cmake:
+
 2020-01-10  Carlos Garcia Campos  <[email protected]>
 
         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.27.4 release

Modified: trunk/Source/WTF/ChangeLog (254399 => 254400)


--- trunk/Source/WTF/ChangeLog	2020-01-11 17:31:59 UTC (rev 254399)
+++ trunk/Source/WTF/ChangeLog	2020-01-11 17:42:01 UTC (rev 254400)
@@ -1,3 +1,16 @@
+2020-01-10  Dean Jackson  <[email protected]>
+
+        [WebGL] Clarify USE_OPENGL_ES_3
+        https://bugs.webkit.org/show_bug.cgi?id=206081
+        <rdar://problem/58486798>
+
+        Reviewed by Simon Fraser.
+
+        Make it clear that USE_ANGLE | USE_OPENGL | USE_OPENGL_ES are exclusive,
+        and that the availability of OpenGL ES 3 is a separate query.
+
+        * wtf/Platform.h:
+
 2020-01-11  Yusuke Suzuki  <[email protected]>
 
         Unreviewed, fix RunLoopGeneric's RunLoop::cycle

Modified: trunk/Source/WTF/wtf/Platform.h (254399 => 254400)


--- trunk/Source/WTF/wtf/Platform.h	2020-01-11 17:31:59 UTC (rev 254399)
+++ trunk/Source/WTF/wtf/Platform.h	2020-01-11 17:42:01 UTC (rev 254400)
@@ -1118,15 +1118,11 @@
    It replaces USE_OPENGL, USE_OPENGL_ES and USE_EGL. */
 #if PLATFORM(MAC) || (PLATFORM(MACCATALYST) && __has_include(<OpenGL/OpenGL.h>))
 #define USE_OPENGL 1
-#define USE_OPENGL_3 1
 #define USE_OPENGL_ES 0
-#define USE_OPENGL_ES_3 0
 #define USE_ANGLE 0
 #else
 #define USE_OPENGL 0
-#define USE_OPENGL_3 0
 #define USE_OPENGL_ES 1
-#define USE_OPENGL_ES_3 1
 #define USE_ANGLE 0
 #endif
 #if PLATFORM(COCOA)
@@ -1133,8 +1129,17 @@
 #ifndef GL_SILENCE_DEPRECATION
 #define GL_SILENCE_DEPRECATION 1
 #endif
+#if USE(OPENGL) && !defined(HAVE_OPENGL_4)
+#define HAVE_OPENGL_4 1
 #endif
+#if USE(OPENGL_ES) && !defined(HAVE_OPENGL_ES_3)
+#define HAVE_OPENGL_ES_3 1
 #endif
+#endif
+#if USE_ANGLE && (USE_OPENGL || USE_OPENGL_ES)
+#error USE_ANGLE is incompatible with USE_OPENGL and USE_OPENGL_ES
+#endif
+#endif
 
 #define USE_METAL 1
 

Modified: trunk/Source/WebCore/ChangeLog (254399 => 254400)


--- trunk/Source/WebCore/ChangeLog	2020-01-11 17:31:59 UTC (rev 254399)
+++ trunk/Source/WebCore/ChangeLog	2020-01-11 17:42:01 UTC (rev 254400)
@@ -1,3 +1,16 @@
+2020-01-10  Dean Jackson  <[email protected]>
+
+        [WebGL] Clarify USE_OPENGL_ES_3
+        https://bugs.webkit.org/show_bug.cgi?id=206081
+        <rdar://problem/58486798>
+
+        Reviewed by Simon Fraser.
+
+        Make it clear that USE_ANGLE | USE_OPENGL | USE_OPENGL_ES are exclusive,
+        and that the availability of OpenGL ES 3 is a separate query.
+
+        * platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp:
+
 2020-01-10  Zalan Bujtas  <[email protected]>
 
         [LFC] TableFormattingContext::layoutTableCellBox should take HorizontalConstraints

Modified: trunk/Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.cpp (254399 => 254400)


--- trunk/Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.cpp	2020-01-11 17:31:59 UTC (rev 254399)
+++ trunk/Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.cpp	2020-01-11 17:42:01 UTC (rev 254400)
@@ -1832,6 +1832,89 @@
     getExtensions().vertexAttribDivisor(index, divisor);
 }
 
+void GraphicsContextGLOpenGL::copyBufferSubData(GCGLenum readTarget, GCGLenum writeTarget, GCGLintptr readOffset, GCGLintptr writeOffset, GCGLsizeiptr size)
+{
+    makeContextCurrent();
+    gl::CopyBufferSubData(readTarget, writeTarget, readOffset, writeOffset, size);
 }
 
+void* GraphicsContextGLOpenGL::mapBufferRange(GCGLenum target, GCGLintptr offset, GCGLsizeiptr length, GCGLbitfield access)
+{
+    makeContextCurrent();
+    return gl::MapBufferRange(target, offset, length, access);
+}
+
+GCGLboolean GraphicsContextGLOpenGL::unmapBuffer(GCGLenum target)
+{
+    makeContextCurrent();
+    return gl::UnmapBuffer(target);
+}
+
+void GraphicsContextGLOpenGL::getInternalformativ(GCGLenum target, GCGLenum internalformat, GCGLenum pname, GCGLsizei bufSize, GCGLint* params)
+{
+    makeContextCurrent();
+    gl::GetInternalformativ(target, internalformat, pname, bufSize, params);
+}
+
+void GraphicsContextGLOpenGL::renderbufferStorageMultisample(GCGLenum target, GCGLsizei samples, GCGLenum internalformat, GCGLsizei width, GCGLsizei height)
+{
+    makeContextCurrent();
+    gl::RenderbufferStorageMultisample(target, samples, internalformat, width, height);
+}
+
+void GraphicsContextGLOpenGL::texStorage2D(GCGLenum target, GCGLsizei levels, GCGLenum internalformat, GCGLsizei width, GCGLsizei height)
+{
+    makeContextCurrent();
+    gl::TexStorage2D(target, levels, internalformat, width, height);
+    m_state.textureSeedCount.add(m_state.currentBoundTexture());
+}
+
+void GraphicsContextGLOpenGL::texStorage3D(GCGLenum target, GCGLsizei levels, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLsizei depth)
+{
+    makeContextCurrent();
+    gl::TexStorage3D(target, levels, internalformat, width, height, depth);
+    m_state.textureSeedCount.add(m_state.currentBoundTexture());
+}
+
+void GraphicsContextGLOpenGL::getActiveUniforms(PlatformGLObject program, const Vector<GCGLuint>& uniformIndices, GCGLenum pname, Vector<GCGLint>& params)
+{
+    ASSERT(program);
+    makeContextCurrent();
+
+    gl::GetActiveUniformsiv(program, uniformIndices.size(), uniformIndices.data(), pname, params.data());
+}
+
+GCGLuint GraphicsContextGLOpenGL::getUniformBlockIndex(PlatformGLObject program, const String& uniformBlockName)
+{
+    UNUSED_PARAM(program);
+    UNUSED_PARAM(uniformBlockName);
+
+    return 0;
+}
+
+void GraphicsContextGLOpenGL::getActiveUniformBlockiv(PlatformGLObject program, GCGLuint uniformBlockIndex, GCGLenum pname, GCGLint* params)
+{
+    UNUSED_PARAM(program);
+    UNUSED_PARAM(uniformBlockIndex);
+    UNUSED_PARAM(pname);
+    UNUSED_PARAM(params);
+}
+
+String GraphicsContextGLOpenGL::getActiveUniformBlockName(PlatformGLObject program, GCGLuint uniformBlockIndex)
+{
+    UNUSED_PARAM(program);
+    UNUSED_PARAM(uniformBlockIndex);
+
+    return emptyString();
+}
+
+void GraphicsContextGLOpenGL::uniformBlockBinding(PlatformGLObject program, GCGLuint uniformBlockIndex, GCGLuint uniformBlockBinding)
+{
+    UNUSED_PARAM(program);
+    UNUSED_PARAM(uniformBlockIndex);
+    UNUSED_PARAM(uniformBlockBinding);
+}
+
+}
+
 #endif // ENABLE(GRAPHICS_CONTEXT_GL) && USE(ANGLE)

Modified: trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp (254399 => 254400)


--- trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp	2020-01-11 17:31:59 UTC (rev 254399)
+++ trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp	2020-01-11 17:42:01 UTC (rev 254400)
@@ -2009,7 +2009,7 @@
     getExtensions().vertexAttribDivisor(index, divisor);
 }
 
-#if USE(OPENGL) && ENABLE(WEBGL2)
+#if HAVE(OPENGL_4) && ENABLE(WEBGL2)
 void GraphicsContextGLOpenGL::primitiveRestartIndex(GCGLuint index)
 {
     makeContextCurrent();
@@ -2035,13 +2035,13 @@
     UNUSED_PARAM(length);
 }
 
-#if USE(OPENGL_3) || USE(OPENGL_ES_3)
+#if HAVE(OPENGL_4) || HAVE(OPENGL_ES_3)
 void GraphicsContextGLOpenGL::copyBufferSubData(GCGLenum readTarget, GCGLenum writeTarget, GCGLintptr readOffset, GCGLintptr writeOffset, GCGLsizeiptr size)
 {
     makeContextCurrent();
     ::glCopyBufferSubData(readTarget, writeTarget, readOffset, writeOffset, size);
 }
-#else
+#elif !USE(ANGLE)
 void GraphicsContextGLOpenGL::copyBufferSubData(GCGLenum, GCGLenum, GCGLintptr, GCGLintptr, GCGLsizeiptr)
 {
 }
@@ -2056,7 +2056,7 @@
     UNUSED_PARAM(length);
 }
 
-#if USE(OPENGL_3) || USE(OPENGL_ES_3)
+#if HAVE(OPENGL_4) || HAVE(OPENGL_ES_3)
 void* GraphicsContextGLOpenGL::mapBufferRange(GCGLenum target, GCGLintptr offset, GCGLsizeiptr length, GCGLbitfield access)
 {
     makeContextCurrent();
@@ -2068,7 +2068,7 @@
     makeContextCurrent();
     return ::glUnmapBuffer(target);
 }
-#else
+#elif !USE(ANGLE)
 void* GraphicsContextGLOpenGL::mapBufferRange(GCGLenum, GCGLintptr, GCGLsizeiptr, GCGLbitfield)
 {
     return nullptr;
@@ -2124,7 +2124,7 @@
     UNUSED_PARAM(src);
 }
 
-#if USE(OPENGL_3) || USE(OPENGL_ES_3)
+#if HAVE(OPENGL_4) || HAVE(OPENGL_ES_3)
 void GraphicsContextGLOpenGL::getInternalformativ(GCGLenum target, GCGLenum internalformat, GCGLenum pname, GCGLsizei bufSize, GCGLint* params)
 {
 #if USE(OPENGL_ES)
@@ -2158,7 +2158,7 @@
     ::glTexStorage3D(target, levels, internalformat, width, height, depth);
     m_state.textureSeedCount.add(m_state.currentBoundTexture());
 }
-#else
+#elif !USE(ANGLE)
 void GraphicsContextGLOpenGL::getInternalformativ(GCGLenum, GCGLenum, GCGLenum, GCGLsizei, GCGLint*)
 {
 }
@@ -2748,7 +2748,7 @@
     return { };
 }
 
-#if USE(OPENGL_3) || USE(OPENGL_ES_3)
+#if HAVE(OPENGL_4) || HAVE(OPENGL_ES_3)
 void GraphicsContextGLOpenGL::getActiveUniforms(PlatformGLObject program, const Vector<GCGLuint>& uniformIndices, GCGLenum pname, Vector<GCGLint>& params)
 {
     ASSERT(program);
@@ -2787,7 +2787,7 @@
     UNUSED_PARAM(uniformBlockIndex);
     UNUSED_PARAM(uniformBlockBinding);
 }
-#else
+#elif !USE(ANGLE)
 void GraphicsContextGLOpenGL::getActiveUniforms(PlatformGLObject, const Vector<GCGLuint>&, GCGLenum, Vector<GCGLint>&)
 {
 }

Modified: trunk/Source/cmake/OptionsFTW.cmake (254399 => 254400)


--- trunk/Source/cmake/OptionsFTW.cmake	2020-01-11 17:31:59 UTC (rev 254399)
+++ trunk/Source/cmake/OptionsFTW.cmake	2020-01-11 17:42:01 UTC (rev 254400)
@@ -245,7 +245,7 @@
 SET_AND_EXPOSE_TO_BUILD(USE_EGL ON)
 SET_AND_EXPOSE_TO_BUILD(USE_EXPORT_MACROS ON)
 SET_AND_EXPOSE_TO_BUILD(USE_OPENGL_ES ON)
-SET_AND_EXPOSE_TO_BUILD(USE_OPENGL_ES_3 ON)
+SET_AND_EXPOSE_TO_BUILD(HAVE_OPENGL_ES_3 ON)
 SET_AND_EXPOSE_TO_BUILD(USE_TEXTURE_MAPPER ON)
 SET_AND_EXPOSE_TO_BUILD(USE_TEXTURE_MAPPER_GL ON)
 #SET_AND_EXPOSE_TO_BUILD(USE_INSPECTOR_SOCKET_SERVER ${ENABLE_REMOTE_INSPECTOR})

Modified: trunk/Source/cmake/OptionsWPE.cmake (254399 => 254400)


--- trunk/Source/cmake/OptionsWPE.cmake	2020-01-11 17:31:59 UTC (rev 254399)
+++ trunk/Source/cmake/OptionsWPE.cmake	2020-01-11 17:42:01 UTC (rev 254400)
@@ -189,7 +189,7 @@
 SET_AND_EXPOSE_TO_BUILD(USE_LIBEPOXY TRUE)
 SET_AND_EXPOSE_TO_BUILD(USE_LIBWPE TRUE)
 SET_AND_EXPOSE_TO_BUILD(USE_OPENGL_ES TRUE)
-SET_AND_EXPOSE_TO_BUILD(USE_OPENGL_ES_3 TRUE)
+SET_AND_EXPOSE_TO_BUILD(HAVE_OPENGL_ES_3 TRUE)
 SET_AND_EXPOSE_TO_BUILD(USE_WPE_RENDERER TRUE)
 SET_AND_EXPOSE_TO_BUILD(USE_XDGMIME TRUE)
 

Modified: trunk/Source/cmake/OptionsWinCairo.cmake (254399 => 254400)


--- trunk/Source/cmake/OptionsWinCairo.cmake	2020-01-11 17:31:59 UTC (rev 254399)
+++ trunk/Source/cmake/OptionsWinCairo.cmake	2020-01-11 17:42:01 UTC (rev 254400)
@@ -38,7 +38,7 @@
 SET_AND_EXPOSE_TO_BUILD(USE_CURL ON)
 SET_AND_EXPOSE_TO_BUILD(USE_EGL ON)
 SET_AND_EXPOSE_TO_BUILD(USE_OPENGL_ES ON)
-SET_AND_EXPOSE_TO_BUILD(USE_OPENGL_ES_3 ON)
+SET_AND_EXPOSE_TO_BUILD(HAVE_OPENGL_ES_3 ON)
 SET_AND_EXPOSE_TO_BUILD(USE_TEXTURE_MAPPER ON)
 SET_AND_EXPOSE_TO_BUILD(USE_TEXTURE_MAPPER_GL ON)
 SET_AND_EXPOSE_TO_BUILD(USE_MEDIA_FOUNDATION ON)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to