Revert "mesa: return initial value for VALIDATE_STATUS if pipe not bound"
authorTimothy Arceri <timothy.arceri@collabora.com>
Tue, 24 Nov 2015 00:50:22 +0000 (11:50 +1100)
committerTimothy Arceri <t_arceri@yahoo.com.au>
Tue, 24 Nov 2015 09:59:44 +0000 (20:59 +1100)
This reverts commit ba02f7a3b6a0e4314753a8e5080db61241563f9c.

The commit checked whether the pipeline was currently bound instead
of checking whether it had ever been bound.  The previous setting
of Validated during object creation makes this unnecessary.  The
real problem was that Validated was not properly set to false
elsewhere in the code.  This is fixed by a later patch.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Cc: "11.1" <mesa-stable@lists.freedesktop.org>
src/mesa/main/pipelineobj.c

index 90dff13485b888da2db5e1daac0652f3b1696891..f079c508b1d927fc48233132de96b81f7f4624d3 100644 (file)
@@ -645,8 +645,7 @@ _mesa_GetProgramPipelineiv(GLuint pipeline, GLenum pname, GLint *params)
       *params = pipe->InfoLog ? strlen(pipe->InfoLog) + 1 : 0;
       return;
    case GL_VALIDATE_STATUS:
-      /* If pipeline is not bound, return initial value 0. */
-      *params = (ctx->_Shader->Name != pipe->Name) ? 0 : pipe->Validated;
+      *params = pipe->Validated;
       return;
    case GL_VERTEX_SHADER:
       *params = pipe->CurrentProgram[MESA_SHADER_VERTEX]