summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2013-02-20 07:39:04 -0700
committerAndreas Boll <andreas.boll.dev@gmail.com>2013-04-17 12:43:31 +0200
commit3b68a183d036b0ec72f14913fb948af3db3c4f40 (patch)
tree51d4408d46207b6f4a2d8b53360b19c80af3e45c
parente4e2bba8f433ae67f2fed221e8068d7c51684f04 (diff)
st/mesa: check for dummy programs in destroy_program_variants()
When we destroy an ARB vp/fp whose ID was gen'd but not otherwise used we get a pointer to the dummy/placeholder program. We can't destroy that one so just skip it. This only failed during context tear-down because glDeleteProgramsARB() was already aware of dummy programs. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=38086 Note: This is a candidate for the stable branches. Tested-by: Andreas Boll <andreas.boll.dev@gmail.com> (cherry picked from commit 8bb291b0f59e8e13bc252cb35672eb468e53881a)
-rw-r--r--src/mesa/state_tracker/st_program.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c
index 36015f69ad..6571070777 100644
--- a/src/mesa/state_tracker/st_program.c
+++ b/src/mesa/state_tracker/st_program.c
@@ -1148,7 +1148,7 @@ st_print_shaders(struct gl_context *ctx)
static void
destroy_program_variants(struct st_context *st, struct gl_program *program)
{
- if (!program)
+ if (!program || program == &_mesa_DummyProgram)
return;
switch (program->Target) {