From 2e0878b1d3170c39af00bd02d61244b83caf3882 Mon Sep 17 00:00:00 2001 From: Iago Toral Quiroga Date: Tue, 13 Jun 2017 10:26:17 +0200 Subject: [PATCH] Call glValidateProgram() before querying GL_VALIDATE_STATUS 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 --- .../modules/gl/gl4cDirectStateAccessProgramPipelinesTests.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/external/openglcts/modules/gl/gl4cDirectStateAccessProgramPipelinesTests.cpp b/external/openglcts/modules/gl/gl4cDirectStateAccessProgramPipelinesTests.cpp index c9a358f..2eacfe4 100644 --- a/external/openglcts/modules/gl/gl4cDirectStateAccessProgramPipelinesTests.cpp +++ b/external/openglcts/modules/gl/gl4cDirectStateAccessProgramPipelinesTests.cpp @@ -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."); -- 2.7.4