mesa: add KHR_no_error support for glUseProgramStages()

Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
Timothy Arceri 2017-05-03 14:20:26 +10:00
parent ea4c606441
commit 00c5119a5e
3 changed files with 25 additions and 1 deletions

View file

@ -15,7 +15,7 @@
<enum name="ALL_SHADER_BITS" value="0xFFFFFFFF"/>
<enum name="PROGRAM_SEPARABLE" value="0x8258"/>
<function name="UseProgramStages" es2="3.1">
<function name="UseProgramStages" es2="3.1" no_error="true">
<param name="pipeline" type="GLuint" />
<param name="stages" type="GLbitfield" />
<param name="program" type="GLuint" />

View file

@ -256,6 +256,27 @@ use_program_stages(struct gl_context *ctx, struct gl_shader_program *shProg,
pipe->Validated = false;
}
void GLAPIENTRY
_mesa_UseProgramStages_no_error(GLuint pipeline, GLbitfield stages,
GLuint prog)
{
GET_CURRENT_CONTEXT(ctx);
struct gl_pipeline_object *pipe =
_mesa_lookup_pipeline_object(ctx, pipeline);
struct gl_shader_program *shProg = NULL;
if (prog)
_mesa_lookup_shader_program(ctx, prog);
/* Object is created by any Pipeline call but glGenProgramPipelines,
* glIsProgramPipeline and GetProgramPipelineInfoLog
*/
pipe->EverBound = GL_TRUE;
use_program_stages(ctx, shProg, stages, pipe);
}
/**
* Bound program to severals stages of the pipeline
*/

View file

@ -71,6 +71,9 @@ _mesa_validate_program_pipeline(struct gl_context * ctx,
struct gl_pipeline_object *pipe);
void GLAPIENTRY
_mesa_UseProgramStages_no_error(GLuint pipeline, GLbitfield stages,
GLuint prog);
extern void GLAPIENTRY
_mesa_UseProgramStages(GLuint pipeline, GLbitfield stages, GLuint program);