summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/pipelineobj.c18
-rw-r--r--src/mesa/main/shader_query.cpp3
2 files changed, 16 insertions, 5 deletions
diff --git a/src/mesa/main/pipelineobj.c b/src/mesa/main/pipelineobj.c
index b1501984c9b..5a46cfe2dcd 100644
--- a/src/mesa/main/pipelineobj.c
+++ b/src/mesa/main/pipelineobj.c
@@ -906,7 +906,8 @@ _mesa_validate_program_pipeline(struct gl_context* ctx,
/* 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:
+ * Section 11.1.3.11 (Validation) of the OpenGL 4.5 Core Profile spec says:
+ *
* "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
@@ -914,8 +915,21 @@ _mesa_validate_program_pipeline(struct gl_context* ctx,
* program objects."
*
* OpenGL ES 3.1 specification has the same text.
+ *
+ * Section 11.1.3.11 (Validation) of the OpenGL ES spec also says:
+ *
+ * An INVALID_OPERATION error is generated by any command that transfers
+ * vertices to the GL or launches compute work if the current set of
+ * active program objects cannot be executed, for reasons including:
+ *
+ * * The current program pipeline object contains a shader interface
+ * that doesn't have an exact match (see section 7.4.1)
+ *
+ * Based on this, only perform the most-strict checking on ES or when the
+ * application has created a debug context.
*/
- if (!_mesa_validate_pipeline_io(pipe))
+ if ((_mesa_is_gles(ctx) || (ctx->Const.ContextFlags & GL_CONTEXT_FLAG_DEBUG_BIT)) &&
+ !_mesa_validate_pipeline_io(pipe))
return GL_FALSE;
pipe->Validated = GL_TRUE;
diff --git a/src/mesa/main/shader_query.cpp b/src/mesa/main/shader_query.cpp
index 81277b6175c..31c0a4eb6fb 100644
--- a/src/mesa/main/shader_query.cpp
+++ b/src/mesa/main/shader_query.cpp
@@ -1377,9 +1377,6 @@ validate_io(struct gl_shader_program *producer,
if (producer == consumer)
return true;
- if (!producer->IsES && !consumer->IsES)
- return true;
-
bool valid = true;
gl_shader_variable const **outputs =