summaryrefslogtreecommitdiffstats
path: root/src/gui/opengl
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2019-12-03 06:55:21 +0100
committerLiang Qi <liang.qi@qt.io>2019-12-03 06:57:05 +0100
commite62d04b933a91c2bdd347aa97dc15ba210a04d2a (patch)
tree67c67af5f59d9b71522738da8a8d2d803e3ff44f /src/gui/opengl
parentf81f21151d30a37f955aa4af2398a96507626b15 (diff)
parent9ac156c90b92a981f70929e081c64083b14e9a57 (diff)
Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts: src/corelib/serialization/qcborvalue.cpp Change-Id: I675a3029955c96e81a33ed9d98b72b55b6784b52
Diffstat (limited to 'src/gui/opengl')
-rw-r--r--src/gui/opengl/qopenglframebufferobject.cpp6
-rw-r--r--src/gui/opengl/qopenglfunctions.cpp8
2 files changed, 8 insertions, 6 deletions
diff --git a/src/gui/opengl/qopenglframebufferobject.cpp b/src/gui/opengl/qopenglframebufferobject.cpp
index 5d30891565..bb0dbdc9bd 100644
--- a/src/gui/opengl/qopenglframebufferobject.cpp
+++ b/src/gui/opengl/qopenglframebufferobject.cpp
@@ -658,13 +658,11 @@ void QOpenGLFramebufferObjectPrivate::initDepthStencilAttachments(QOpenGLContext
funcs.glBindRenderbuffer(GL_RENDERBUFFER, depth_buffer);
Q_ASSERT(funcs.glIsRenderbuffer(depth_buffer));
- GLenum storageFormat = GL_DEPTH_STENCIL;
-
if (samples != 0 ) {
funcs.glRenderbufferStorageMultisample(GL_RENDERBUFFER, samples,
- storageFormat, dsSize.width(), dsSize.height());
+ GL_DEPTH24_STENCIL8, dsSize.width(), dsSize.height());
} else {
- funcs.glRenderbufferStorage(GL_RENDERBUFFER, storageFormat,
+ funcs.glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_STENCIL,
dsSize.width(), dsSize.height());
}
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"))