[Mesa-dev] [PATCH] st/mesa: check for dummy programs in destroy_program_variants()
Andreas Boll
andreas.boll.dev at gmail.com
Fri Feb 22 06:17:54 PST 2013
Now the "Unexpected program target 0x0 in destroy_program_variants_cb()"
errors don't occur anymore. Tested with TF2
Tested-by: Andreas Boll <andreas.boll.dev at gmail.com>
2013/2/20 Brian Paul <brianp at vmware.com>:
> 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.
> ---
> src/mesa/state_tracker/st_program.c | 2 +-
> 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 a9111b5..f56f7cb 100644
> --- a/src/mesa/state_tracker/st_program.c
> +++ b/src/mesa/state_tracker/st_program.c
> @@ -1142,7 +1142,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) {
> --
> 1.7.3.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list