Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Mesa
mesa
Commits
244cef16
Commit
244cef16
authored
May 03, 2017
by
Timothy Arceri
Browse files
mesa: add KHR_no_error support for glBindProgramPipeline()
Reviewed-by:
Eric Anholt
<
eric@anholt.net
>
parent
0bca4784
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/mapi/glapi/gen/ARB_separate_shader_objects.xml
View file @
244cef16
...
...
@@ -30,7 +30,7 @@
<param
name=
"strings"
type=
"const GLchar * const *"
/>
<return
type=
"GLuint"
/>
</function>
<function
name=
"BindProgramPipeline"
es2=
"3.1"
>
<function
name=
"BindProgramPipeline"
es2=
"3.1"
no_error=
"true"
>
<param
name=
"pipeline"
type=
"GLuint"
/>
</function>
<function
name=
"DeleteProgramPipelines"
es2=
"3.1"
>
...
...
src/mesa/main/pipelineobj.c
View file @
244cef16
...
...
@@ -431,6 +431,32 @@ _mesa_ActiveShaderProgram(GLuint pipeline, GLuint program)
_mesa_reference_shader_program
(
ctx
,
&
pipe
->
ActiveProgram
,
shProg
);
}
void
GLAPIENTRY
_mesa_BindProgramPipeline_no_error
(
GLuint
pipeline
)
{
GET_CURRENT_CONTEXT
(
ctx
);
struct
gl_pipeline_object
*
newObj
=
NULL
;
/* Rebinding the same pipeline object: no change.
*/
if
(
ctx
->
_Shader
->
Name
==
pipeline
)
return
;
/* Get pointer to new pipeline object (newObj)
*/
if
(
pipeline
)
{
/* non-default pipeline object */
newObj
=
_mesa_lookup_pipeline_object
(
ctx
,
pipeline
);
/* Object is created by any Pipeline call but glGenProgramPipelines,
* glIsProgramPipeline and GetProgramPipelineInfoLog
*/
newObj
->
EverBound
=
GL_TRUE
;
}
_mesa_bind_pipeline
(
ctx
,
newObj
);
}
/**
* Make program of the pipeline current
*/
...
...
src/mesa/main/pipelineobj.h
View file @
244cef16
...
...
@@ -82,6 +82,8 @@ _mesa_ActiveShaderProgram_no_error(GLuint pipeline, GLuint program);
extern
void
GLAPIENTRY
_mesa_ActiveShaderProgram
(
GLuint
pipeline
,
GLuint
program
);
void
GLAPIENTRY
_mesa_BindProgramPipeline_no_error
(
GLuint
pipeline
);
extern
void
GLAPIENTRY
_mesa_BindProgramPipeline
(
GLuint
pipeline
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment