radeonsi: Use proper member name for deleting export shader PM4 state
authorMichel Dänzer <michel.daenzer@amd.com>
Mon, 10 Mar 2014 03:21:50 +0000 (12:21 +0900)
committerMichel Dänzer <michel@daenzer.net>
Mon, 10 Mar 2014 03:21:50 +0000 (12:21 +0900)
Fixes double-free with some piglit tests using geometry shaders.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/si_state.c

index 0ee415406d2dce133523b556c7934137263ae154..7d4f3c7409d536bd4bd89f8c836da1ac3c238327 100644 (file)
@@ -2360,6 +2360,8 @@ static void si_delete_shader_selector(struct pipe_context *ctx,
                        si_pm4_delete_state(sctx, gs, p->pm4);
                else if (sel->type == PIPE_SHADER_FRAGMENT)
                        si_pm4_delete_state(sctx, ps, p->pm4);
+               else if (p->key.vs.as_es)
+                       si_pm4_delete_state(sctx, es, p->pm4);
                else
                        si_pm4_delete_state(sctx, vs, p->pm4);
                si_pipe_shader_destroy(ctx, p);