summaryrefslogtreecommitdiffstats
path: root/src/gui/opengl/qopenglfunctions.cpp
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-12-04 01:00:23 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-12-04 01:00:23 +0100
commit0c29ebe374caad7e29c6a3d35c72c4eddaacc6af (patch)
treec6b228302ab37375a82f7bfb535e5bb39d36e624 /src/gui/opengl/qopenglfunctions.cpp
parente5438e8ded27eb6f7f0e85704d6843069296c698 (diff)
parent2ed59f0d42d2817a5855be167f5e3ccf23563e39 (diff)
Merge remote-tracking branch 'origin/5.15' into dev
Diffstat (limited to 'src/gui/opengl/qopenglfunctions.cpp')
-rw-r--r--src/gui/opengl/qopenglfunctions.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gui/opengl/qopenglfunctions.cpp b/src/gui/opengl/qopenglfunctions.cpp
index 42186ace23..3e9eb3dd0a 100644
--- a/src/gui/opengl/qopenglfunctions.cpp
+++ b/src/gui/opengl/qopenglfunctions.cpp
@@ -388,8 +388,12 @@ static int qt_gl_resolve_extensions()
| QOpenGLExtensions::MapBufferRange
| QOpenGLExtensions::FramebufferBlit
| QOpenGLExtensions::FramebufferMultisample
- | QOpenGLExtensions::Sized8Formats
- | QOpenGLExtensions::TextureSwizzle;
+ | QOpenGLExtensions::Sized8Formats;
+#ifndef Q_OS_WASM
+ // WebGL 2.0 specification explicitly does not support texture swizzles
+ // https://www.khronos.org/registry/webgl/specs/latest/2.0/#5.19
+ extensions |= QOpenGLExtensions::TextureSwizzle;
+#endif
} else {
// Recognize features by extension name.
if (extensionMatcher.match("GL_OES_packed_depth_stencil"))