Check for integer texture support in negative teximage tests
Affects:
KHR-GLES2.texture_3d.filtering.combinations.negative
Components: OpenGL
VK-GL-CTS issue: 3134
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Change-Id: I352d408a486fa12b406fadd6ec6b8d24e1cd211d
diff --git a/external/openglcts/modules/gles2/es2cTexture3DTests.cpp b/external/openglcts/modules/gles2/es2cTexture3DTests.cpp
index 4220464..bde98f9 100644
--- a/external/openglcts/modules/gles2/es2cTexture3DTests.cpp
+++ b/external/openglcts/modules/gles2/es2cTexture3DTests.cpp
@@ -1149,6 +1149,11 @@
const glw::Functions& gl = m_context.getRenderContext().getFunctions();
+ /* Integer textures supported for OpenGL ES 3.0+ */
+ int major = 0;
+ gl.getIntegerv(GL_MAJOR_VERSION, &major);
+ bool supportsIntegerTextures = major >= 3;
+
m_testCtx.setTestResult(QP_TEST_RESULT_PASS, "Pass");
// negative usage
@@ -1186,8 +1191,11 @@
verifyError(GL_INVALID_OPERATION, message3);
callTexImage3D(GL_TEXTURE_3D, 0, GL_RGB10_A2, 1, 1, 1, 0, GL_RGB, GL_UNSIGNED_INT_2_10_10_10_REV, 0);
verifyError(GL_INVALID_OPERATION, message3);
- callTexImage3D(GL_TEXTURE_3D, 0, GL_RGBA32UI, 1, 1, 1, 0, GL_RGBA_INTEGER, GL_INT, 0);
- verifyError(GL_INVALID_OPERATION, message3);
+
+ if (supportsIntegerTextures) {
+ callTexImage3D(GL_TEXTURE_3D, 0, GL_RGBA32UI, 1, 1, 1, 0, GL_RGBA_INTEGER, GL_INT, 0);
+ verifyError(GL_INVALID_OPERATION, message3);
+ }
}
// invalid leve