GLboolean IsBound)
{
unsigned i;
+ bool program_empty = true;
pipe->Validated = GL_FALSE;
}
}
+ /* Section 11.1.3.11 (Validation) of the OpenGL 4.5 spec says:
+ *
+ * "An INVALID_OPERATION error is generated by any command that trans-
+ * fers vertices to the GL or launches compute work if the current set
+ * of active program objects cannot be executed, for reasons including:
+ *
+ * ...
+ *
+ * - There is no current program object specified by UseProgram,
+ * there is a current program pipeline object, and that object is
+ * empty (no executable code is installed for any stage).
+ */
+ for (i = 0; i < MESA_SHADER_STAGES; i++) {
+ if (pipe->CurrentProgram[i]) {
+ program_empty = false;
+ break;
+ }
+ }
+
+ if (program_empty) {
+ goto err;
+ }
+
/* Section 2.11.11 (Shader Execution), subheading "Validation," of the
* OpenGL 4.1 spec says:
*