[Mesa-dev] [PATCH 51/57] mesa: Add ARB_direct_state_access checks in program pipeline functions

Fredrik Höglund fredrik at kde.org
Mon May 11 10:27:17 PDT 2015


Signed-off-by: Fredrik Höglund <fredrik at kde.org>
---
 src/mesa/main/pipelineobj.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/mesa/main/pipelineobj.c b/src/mesa/main/pipelineobj.c
index 0fefa7d..a33cdd1 100644
--- a/src/mesa/main/pipelineobj.c
+++ b/src/mesa/main/pipelineobj.c
@@ -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);
 }
 
-- 
2.1.4



More information about the mesa-dev mailing list