Call glValidateProgram() before querying GL_VALIDATE_STATUS
authorIago Toral Quiroga <itoral@igalia.com>
Tue, 13 Jun 2017 08:26:17 +0000 (10:26 +0200)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Sat, 1 Jul 2017 10:34:27 +0000 (06:34 -0400)
The DSA program_pipelines_functional test queries this param
without calling glValidateProgram() first, which is not
correct:

From section 7.13. SHADER, PROGRAM, AND PROGRAM PIPELINE QUERIES:

"If pname is VALIDATE_STATUS, TRUE is returned if the last
 call to ValidateProgram (see section 11.1.3.11) with
 program was successful, and FALSE is returned otherwise."

Components: OpenGL
VK-GL-CTS issue: 498

Affects:
KHR-GL45.direct_state_access.program_pipelines_functional

Change-Id: I4de325f0779c3330523b1fac1845d287b790ee3a

external/openglcts/modules/gl/gl4cDirectStateAccessProgramPipelinesTests.cpp

index c9a358f..2eacfe4 100644 (file)
@@ -639,6 +639,9 @@ void FunctionalTest::prepareShaderPrograms()
 
        glw::GLint status = GL_TRUE;
 
+       gl.validateProgram(m_spo_v);
+       GLU_EXPECT_NO_ERROR(gl.getError(), "glValidateProgram call failed.");
+
        gl.getProgramiv(m_spo_v, GL_VALIDATE_STATUS, &status);
        GLU_EXPECT_NO_ERROR(gl.getError(), "glGetProgramiv call failed.");
 
@@ -665,6 +668,9 @@ void FunctionalTest::prepareShaderPrograms()
 
        status = GL_TRUE;
 
+       gl.validateProgram(m_spo_f);
+       GLU_EXPECT_NO_ERROR(gl.getError(), "glValidateProgram call failed.");
+
        gl.getProgramiv(m_spo_f, GL_VALIDATE_STATUS, &status);
        GLU_EXPECT_NO_ERROR(gl.getError(), "glGetProgramiv call failed.");