[Mesa-dev] [PATCH 3/3] mesa: return initial value for VALIDATE_STATUS if pipe not bound
Lofstedt, Marta
marta.lofstedt at intel.com
Fri Sep 11 00:57:34 PDT 2015
Reviewed-by: Marta Lofstedt <marta.lofstedt at intel.com>
________________________________________
From: mesa-dev [mesa-dev-bounces at lists.freedesktop.org] on behalf of Tapani Pälli [tapani.palli at intel.com]
Sent: Tuesday, September 01, 2015 12:53 PM
To: mesa-dev at lists.freedesktop.org
Cc: Romanick, Ian D
Subject: [Mesa-dev] [PATCH 3/3] mesa: return initial value for VALIDATE_STATUS if pipe not bound
>From OpenGL 4.5 Core spec (7.13):
"If pipeline is a name that has been generated (without subsequent
deletion) by GenProgramPipelines, but refers to a program pipeline
object that has not been previously bound, the GL first creates a
new state vector in the same manner as when BindProgramPipeline
creates a new program pipeline object."
I interpret this as "If GetProgramPipelineiv gets called without a
bound (but valid) pipeline object, the state should reflect initial
state of a new pipeline object." This is also expected behaviour by
ES31-CTS.sepshaderobjs.PipelineApi conformance test.
Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
---
src/mesa/main/pipelineobj.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/mesa/main/pipelineobj.c b/src/mesa/main/pipelineobj.c
index 07acbf1..c2e1d29 100644
--- a/src/mesa/main/pipelineobj.c
+++ b/src/mesa/main/pipelineobj.c
@@ -614,7 +614,8 @@ _mesa_GetProgramPipelineiv(GLuint pipeline, GLenum pname, GLint *params)
*params = pipe->InfoLog ? strlen(pipe->InfoLog) + 1 : 0;
return;
case GL_VALIDATE_STATUS:
- *params = pipe->Validated;
+ /* If pipeline is not bound, return initial value 0. */
+ *params = (ctx->_Shader->Name != pipe->Name) ? 0 : pipe->Validated;
return;
case GL_VERTEX_SHADER:
*params = pipe->CurrentProgram[MESA_SHADER_VERTEX]
--
2.4.3
_______________________________________________
mesa-dev mailing list
mesa-dev at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list