[Mesa-dev] [PATCH 1/4] radeonsi: avoid stale pointers in si_delete_shader_selector
Marek Olšák
maraeo at gmail.com
Sat Mar 8 06:27:19 PST 2014
Yeah, you found the correct fix for the null constant buffer leak. For
the series:
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Marek
On Sat, Mar 8, 2014 at 2:54 PM, Christian König <deathsimple at vodafone.de> wrote:
> From: Christian König <christian.koenig at amd.com>
>
> Signed-off-by: Christian König <christian.koenig at amd.com>
> ---
> src/gallium/drivers/radeonsi/si_state.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
> index 8f90000..0ee4154 100644
> --- a/src/gallium/drivers/radeonsi/si_state.c
> +++ b/src/gallium/drivers/radeonsi/si_state.c
> @@ -2356,7 +2356,12 @@ static void si_delete_shader_selector(struct pipe_context *ctx,
>
> while (p) {
> c = p->next_variant;
> - si_pm4_delete_state(sctx, vs, p->pm4);
> + if (sel->type == PIPE_SHADER_GEOMETRY)
> + si_pm4_delete_state(sctx, gs, p->pm4);
> + else if (sel->type == PIPE_SHADER_FRAGMENT)
> + si_pm4_delete_state(sctx, ps, p->pm4);
> + else
> + si_pm4_delete_state(sctx, vs, p->pm4);
> si_pipe_shader_destroy(ctx, p);
> free(p);
> p = c;
> --
> 1.8.3.2
>
> _______________________________________________
> 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