diff options
author | Dave Airlie <[email protected]> | 2016-05-17 16:25:02 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2016-05-23 16:19:57 +1000 |
commit | 5fe912831cac6722f2cf8add010c553a43e178b4 (patch) | |
tree | d925e544361c9530a5e9007c9199d89d2b05b91a /src/mesa/main/pipelineobj.c | |
parent | 7fa0250f9446ec57caab581b8cac2c011c1cb497 (diff) |
mesa/subroutines: fix reset on bindpipeline
Fixes:
GL45-CTS.shader_subroutine.subroutine_uniform_reset
Reviewed-by: Chris Forbes <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/mesa/main/pipelineobj.c')
-rw-r--r-- | src/mesa/main/pipelineobj.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/main/pipelineobj.c b/src/mesa/main/pipelineobj.c index 97285a28ab0..b1501984c9b 100644 --- a/src/mesa/main/pipelineobj.c +++ b/src/mesa/main/pipelineobj.c @@ -442,6 +442,7 @@ void _mesa_bind_pipeline(struct gl_context *ctx, struct gl_pipeline_object *pipe) { + int i; /* First bind the Pipeline to pipeline binding point */ _mesa_reference_pipeline_object(ctx, &ctx->Pipeline.Current, pipe); @@ -467,6 +468,9 @@ _mesa_bind_pipeline(struct gl_context *ctx, FLUSH_VERTICES(ctx, _NEW_PROGRAM | _NEW_PROGRAM_CONSTANTS); + for (i = 0; i < MESA_SHADER_STAGES; i++) + _mesa_shader_program_init_subroutine_defaults(ctx->_Shader->CurrentProgram[i]); + if (ctx->Driver.UseProgram) ctx->Driver.UseProgram(ctx, NULL); } |