return false;
}
+ /* Section 11.2 (Tessellation) of the ES 3.2 spec says:
+ *
+ * "An INVALID_OPERATION error is generated by any command that
+ * transfers vertices to the GL if the current program state has
+ * one but not both of a tessellation control shader and tessellation
+ * evaluation shader."
+ *
+ * The OpenGL spec argues that this is allowed because a tess ctrl shader
+ * without a tess eval shader can be used with transform feedback.
+ * However, glBeginTransformFeedback doesn't allow GL_PATCHES and
+ * therefore doesn't allow tessellation.
+ *
+ * Further investigation showed that this is indeed a spec bug and
+ * a tess ctrl shader without a tess eval shader shouldn't have been
+ * allowed, because there is no API in GL 4.0 that can make use this
+ * to produce something useful.
+ *
+ * Also, all vendors except one don't support a tess ctrl shader without
+ * a tess eval shader anyway.
+ */
+ if (ctx->TessCtrlProgram._Current && !ctx->TessEvalProgram._Current) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "%s(tess eval shader is missing)", function);
+ return false;
+ }
+
switch (ctx->API) {
case API_OPENGLES2:
/* For ES2, we can draw if we have a vertex program/shader). */
return false;
}
- /* The spec argues that this is allowed because a tess ctrl shader
- * without a tess eval shader can be used with transform feedback.
- * However, glBeginTransformFeedback doesn't allow GL_PATCHES and
- * therefore doesn't allow tessellation.
- *
- * Further investigation showed that this is indeed a spec bug and
- * a tess ctrl shader without a tess eval shader shouldn't have been
- * allowed, because there is no API in GL 4.0 that can make use this
- * to produce something useful.
- *
- * Also, all vendors except one don't support a tess ctrl shader without
- * a tess eval shader anyway.
- */
- if (ctx->TessCtrlProgram._Current && !ctx->TessEvalProgram._Current) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "%s(tess eval shader is missing)", function);
- return false;
- }
-
/* Section 7.3 (Program Objects) of the OpenGL 4.5 Core Profile spec
* says:
*