summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/pipelineobj.c
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2017-05-03 15:26:22 +1000
committerTimothy Arceri <[email protected]>2017-05-11 10:56:08 +1000
commit0bca4784c29e5b12f995eae52a90214de6249771 (patch)
treead3df97d62933ce6ebdce7faf18d24247d761bef /src/mesa/main/pipelineobj.c
parent00c5119a5e8210e801192c77069b79a87f63264e (diff)
mesa: add KHR_no_error support for glActiveShaderProgram()
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/main/pipelineobj.c')
-rw-r--r--src/mesa/main/pipelineobj.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/mesa/main/pipelineobj.c b/src/mesa/main/pipelineobj.c
index b6a4332f605..993fc0a0b17 100644
--- a/src/mesa/main/pipelineobj.c
+++ b/src/mesa/main/pipelineobj.c
@@ -373,6 +373,24 @@ _mesa_UseProgramStages(GLuint pipeline, GLbitfield stages, GLuint program)
use_program_stages(ctx, shProg, stages, pipe);
}
+void GLAPIENTRY
+_mesa_ActiveShaderProgram_no_error(GLuint pipeline, GLuint program)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ struct gl_shader_program *shProg = NULL;
+ struct gl_pipeline_object *pipe = _mesa_lookup_pipeline_object(ctx, pipeline);
+
+ if (program)
+ shProg = _mesa_lookup_shader_program(ctx, program);
+
+ /* Object is created by any Pipeline call but glGenProgramPipelines,
+ * glIsProgramPipeline and GetProgramPipelineInfoLog
+ */
+ pipe->EverBound = GL_TRUE;
+
+ _mesa_reference_shader_program(ctx, &pipe->ActiveProgram, shProg);
+}
+
/**
* Use the named shader program for subsequent glUniform calls (if pipeline
* bound)