diff options
author | Dave Airlie <[email protected]> | 2016-06-07 15:25:55 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2016-08-23 11:03:45 +1000 |
commit | 4566aaaa5b169724174e04dc0a99a37ae0abcd2a (patch) | |
tree | 7a868b06b480e0469b9fd19b1d78f3515d6f6942 /src/mesa/main/shaderapi.h | |
parent | 27d20ee264429ecf43968fa1a746ff428262cfb9 (diff) |
mesa/subroutines: start adding per-context subroutine index support (v1.1)
One piece of ARB_shader_subroutine I ignored was the fact that it
needs to store the subroutine index data per context and not per
shader program.
There is one CTS test that tests this:
GL45-CTS.shader_subroutine.multiple_contexts
However the test only does a write to context and readback,
it never renders using the values, so this is enough to fix the
test however not enough to do what the spec says.
So with this patch the info is now stored per context, but
it gets updated into the program at UseProgram and when the
values are inserted into the context, which won't help if
multiple contexts are in use in multiple threads.
v1.1: cleanups and nit-picks (Andres)
Signed-off-by: Dave Airlie <[email protected]>
Reviewed-by: Andres Gomez <[email protected]>
Diffstat (limited to 'src/mesa/main/shaderapi.h')
-rw-r--r-- | src/mesa/main/shaderapi.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/main/shaderapi.h b/src/mesa/main/shaderapi.h index 09b9525e402..b3de5fab1e7 100644 --- a/src/mesa/main/shaderapi.h +++ b/src/mesa/main/shaderapi.h @@ -286,7 +286,8 @@ _mesa_PatchParameterfv(GLenum pname, const GLfloat *values); /* GL_ARB_shader_subroutine */ void -_mesa_shader_program_init_subroutine_defaults(struct gl_shader_program *shProg); +_mesa_shader_program_init_subroutine_defaults(struct gl_context *ctx, + struct gl_shader_program *shProg); extern GLint GLAPIENTRY _mesa_GetSubroutineUniformLocation(GLuint program, GLenum shadertype, |