/* 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
* 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;