mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 21:40:08 +01:00
mesa: add KHR_no_error support for glUseProgramStages()
Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
parent
ea4c606441
commit
00c5119a5e
3 changed files with 25 additions and 1 deletions
|
|
@ -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" />
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue