summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Arceri <timothy.arceri@collabora.com>2015-12-06 15:17:15 +1100
committerEmil Velikov <emil.l.velikov@gmail.com>2015-12-12 19:39:01 +0000
commit499d409a20136d66b265b96d19eba5c1bc7fc5f4 (patch)
tree4bc6cebefbc6f8ac66ddd61a0c84df85a1a0d7e0
parenta16f5195ef750118688d6c7b4863516e10f8b43f (diff)
mesa: move pipeline input/output validation inside _mesa_validate_program_pipeline()
This allows validation to be done on rendering calls also. Fixes 3 dEQP-GLES31.functional.separate tests. Cc: "11.1" <mesa-stable@lists.freedesktop.org> Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Cc: Kenneth Graunke <kenneth@whitecape.org> (cherry picked from commit 4dd096d74178e66334089fb0ed01cbf2d6117fac)
-rw-r--r--src/mesa/main/pipelineobj.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/mesa/main/pipelineobj.c b/src/mesa/main/pipelineobj.c
index 6710d0d40a4..d8c9ded93dc 100644
--- a/src/mesa/main/pipelineobj.c
+++ b/src/mesa/main/pipelineobj.c
@@ -898,6 +898,21 @@ _mesa_validate_program_pipeline(struct gl_context* ctx,
if (!_mesa_sampler_uniforms_pipeline_are_valid(pipe))
goto err;
+ /* Validate inputs against outputs, this cannot be done during linking
+ * since programs have been linked separately from each other.
+ *
+ * From OpenGL 4.5 Core spec:
+ * "Separable program objects may have validation failures that cannot be
+ * detected without the complete program pipeline. Mismatched interfaces,
+ * improper usage of program objects together, and the same
+ * state-dependent failures can result in validation errors for such
+ * program objects."
+ *
+ * OpenGL ES 3.1 specification has the same text.
+ */
+ if (!_mesa_validate_pipeline_io(pipe))
+ goto err;
+
pipe->Validated = GL_TRUE;
return GL_TRUE;
@@ -933,21 +948,6 @@ _mesa_ValidateProgramPipeline(GLuint pipeline)
* false for IsBound to avoid an error being thrown.
*/
_mesa_validate_program_pipeline(ctx, pipe, false);
-
- /* Validate inputs against outputs, this cannot be done during linking
- * since programs have been linked separately from each other.
- *
- * From OpenGL 4.5 Core spec:
- * "Separable program objects may have validation failures that cannot be
- * detected without the complete program pipeline. Mismatched interfaces,
- * improper usage of program objects together, and the same
- * state-dependent failures can result in validation errors for such
- * program objects."
- *
- * OpenGL ES 3.1 specification has the same text.
- */
- if (!_mesa_validate_pipeline_io(pipe))
- pipe->Validated = GL_FALSE;
}
void GLAPIENTRY