diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2017-04-18 15:40:16 +0200 |
---|---|---|
committer | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2017-04-18 19:14:23 +0000 |
commit | 30abb904d42de5423749170c0de6e497d2aaf76e (patch) | |
tree | 4f440638e1fe53bc2f73ac5a3e00b3dce0c1a4c3 | |
parent | 50712f797527b6519ec22e5f1a4b5a939152c798 (diff) |
tst_GraphicsHelperGL3_2::blitFramebuffer(): check how many samples are supported
Apply the same fix as tst_GraphicsHelperGL3_3.
Unblacklist the test, since it now passes.
Change-Id: I72bde506c3c6c802ed30acf40e10013f01e69de3
Task-number: QTBUG-59921
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
-rw-r--r-- | tests/auto/render/graphicshelpergl3_2/BLACKLIST | 2 | ||||
-rw-r--r-- | tests/auto/render/graphicshelpergl3_2/tst_graphicshelpergl3_2.cpp | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/tests/auto/render/graphicshelpergl3_2/BLACKLIST b/tests/auto/render/graphicshelpergl3_2/BLACKLIST deleted file mode 100644 index 1d6233cd7..000000000 --- a/tests/auto/render/graphicshelpergl3_2/BLACKLIST +++ /dev/null @@ -1,2 +0,0 @@ -[blitFramebuffer] -ubuntu-16.04 diff --git a/tests/auto/render/graphicshelpergl3_2/tst_graphicshelpergl3_2.cpp b/tests/auto/render/graphicshelpergl3_2/tst_graphicshelpergl3_2.cpp index fb0265427..7e24d22c7 100644 --- a/tests/auto/render/graphicshelpergl3_2/tst_graphicshelpergl3_2.cpp +++ b/tests/auto/render/graphicshelpergl3_2/tst_graphicshelpergl3_2.cpp @@ -1867,6 +1867,11 @@ private Q_SLOTS: if (!m_initializationSuccessful) QSKIP("Initialization failed, OpenGL 3.2 Core functions not supported"); + GLint maxSamples; + m_func->glGetIntegerv(GL_MAX_SAMPLES, &maxSamples); + if (maxSamples < 1) + QSKIP("This test requires an implementation that supports multisampled textures"); + // GIVEN GLuint fbos[2]; GLuint fboTextures[2]; @@ -1875,7 +1880,7 @@ private Q_SLOTS: m_func->glGenTextures(2, fboTextures); m_func->glBindTexture(GL_TEXTURE_2D_MULTISAMPLE, fboTextures[0]); - m_func->glTexImage2DMultisample(GL_TEXTURE_2D_MULTISAMPLE, 4, GL_RGBA8, 10, 10, true); + m_func->glTexImage2DMultisample(GL_TEXTURE_2D_MULTISAMPLE, maxSamples, GL_RGBA8, 10, 10, true); m_func->glBindTexture(GL_TEXTURE_2D_MULTISAMPLE, 0); m_func->glBindTexture(GL_TEXTURE_2D, fboTextures[1]); |