summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2017-01-26 19:29:20 +1100
committerTimothy Arceri <[email protected]>2017-02-16 15:01:41 +1100
commite6506b3cd2382a9a7e0a3494a964d2bafb3bebc3 (patch)
tree2b4a50bf5da75da19f94c72dac3fb2f1e7ae0a65 /src/mesa/drivers
parent300900516d1e15edd86ea0512f9b5ccda85d150e (diff)
mesa: retain gl_shader_programs after glDeleteProgram if they are in use
Fixes regressions from c505d6d852220f4aaaee161465dd2c579647e672. Switching from using gl_shader_program to gl_program for the pipline objects CurrentProgram array meant we were freeing gl_shader_programs immediately after glDeleteProgram was called, but the spec states the program should only get deleted once it is no longer in use. To work around this we add a new ReferencedPrograms array to track gl_shader_programs in use. Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/common/meta.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index 5b99c6baa52..2db4668ef7d 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
@@ -962,7 +962,7 @@ _mesa_meta_end(struct gl_context *ctx)
* program object must be NULL. _mesa_use_program is a no-op
* in that case.
*/
- _mesa_use_program(ctx, i, save->Program[i], &ctx->Shader);
+ _mesa_use_program(ctx, i, NULL, save->Program[i], &ctx->Shader);
/* Do this *before* killing the reference. :)
*/