Update TextureParameter* errors
authorJames Helferty <jhelferty@nvidia.com>
Wed, 7 Jun 2017 20:17:50 +0000 (16:17 -0400)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Fri, 9 Jun 2017 15:46:13 +0000 (11:46 -0400)
Check for INVALID_OPERATION instead of INVALID_ENUM whenever attempting
to use GetTextureParameter* with a texture object with an incompatible
TEXTURE_TARGET.

VK-GL-CTS issue: 485
Components: OpenGL

Affects:

KHR-GL45.direct_state_access.textures_parameter_errors

Change-Id: Id0cf6eb72896ce9221fc38b6f37e8d7f54766ae1

external/openglcts/modules/gl/gl4cDirectStateAccessTexturesTests.cpp

index ced4673..a8df62c 100644 (file)
@@ -13292,26 +13292,26 @@ tcu::TestNode::IterateResult ParameterErrorsTest::iterate()
                is_ok &= CheckErrorAndLog(m_context, GL_INVALID_OPERATION, "glGetTextureParameteriv",
                                                                  "texture is not the name of an existing texture object.");
 
-               /* Check that INVALID_ENUM error is generated if the effective target is
+               /* Check that INVALID_OPERATION error is generated if the effective target is
                 not one of the supported texture targets (eg. TEXTURE_BUFFER). */
                gl.getTextureParameterfv(texture_buffer, GL_TEXTURE_TARGET, storef);
                is_ok &=
-                       CheckErrorAndLog(m_context, GL_INVALID_ENUM, "glGetTextureParameterfv",
+                       CheckErrorAndLog(m_context, GL_INVALID_OPERATION, "glGetTextureParameterfv",
                                                         "the effective target is not one of the supported texture targets (eg. TEXTURE_BUFFER).");
 
                gl.getTextureParameterIiv(texture_buffer, GL_TEXTURE_TARGET, storei);
                is_ok &=
-                       CheckErrorAndLog(m_context, GL_INVALID_ENUM, "glGetTextureParameterIiv",
+                       CheckErrorAndLog(m_context, GL_INVALID_OPERATION, "glGetTextureParameterIiv",
                                                         "the effective target is not one of the supported texture targets (eg. TEXTURE_BUFFER).");
 
                gl.getTextureParameterIuiv(texture_buffer, GL_TEXTURE_TARGET, storeu);
                is_ok &=
-                       CheckErrorAndLog(m_context, GL_INVALID_ENUM, "glGetTextureParameterIuiv",
+                       CheckErrorAndLog(m_context, GL_INVALID_OPERATION, "glGetTextureParameterIuiv",
                                                         "the effective target is not one of the supported texture targets (eg. TEXTURE_BUFFER).");
 
                gl.getTextureParameteriv(texture_buffer, GL_TEXTURE_TARGET, storei);
                is_ok &=
-                       CheckErrorAndLog(m_context, GL_INVALID_ENUM, "glGetTextureParameteriv",
+                       CheckErrorAndLog(m_context, GL_INVALID_OPERATION, "glGetTextureParameteriv",
                                                         "the effective target is not one of the supported texture targets (eg. TEXTURE_BUFFER).");
        }
        catch (...)