mesa: Add ARB_direct_state_access checks in program pipeline functions
authorFredrik Höglund <fredrik@kde.org>
Sun, 10 May 2015 18:56:18 +0000 (20:56 +0200)
committerFredrik Höglund <fredrik@kde.org>
Thu, 14 May 2015 13:48:17 +0000 (15:48 +0200)
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
src/mesa/main/pipelineobj.c

index 0fefa7d568b5da5e954e830c0fdfb23ec4022154..a33cdd139c8f17aa471ed3d1576987f39bf033eb 100644 (file)
@@ -553,6 +553,12 @@ _mesa_CreateProgramPipelines(GLsizei n, GLuint *pipelines)
 {
    GET_CURRENT_CONTEXT(ctx);
 
+   if (!ctx->Extensions.ARB_direct_state_access) {
+      _mesa_error(ctx, GL_INVALID_OPERATION, "glCreateProgramPipelines("
+                  "GL_ARB_direct_state_access is not supported)");
+      return;
+   }
+
    create_program_pipelines(ctx, n, pipelines, true);
 }