[Mesa-dev] [PATCH] st/dri: Don't call invalidate_resource for NULL depth/stencil buffers
Marek Olšák
maraeo at gmail.com
Fri Jan 15 07:27:19 PST 2016
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
On Fri, Jan 15, 2016 at 8:22 AM, Michel Dänzer <michel at daenzer.net> wrote:
> From: Michel Dänzer <michel.daenzer at amd.com>
>
> Fixes crash in 4 EGL piglit tests with radeonsi.
>
> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
> ---
> src/gallium/state_trackers/dri/dri_drawable.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/src/gallium/state_trackers/dri/dri_drawable.c b/src/gallium/state_trackers/dri/dri_drawable.c
> index f0cc4a2..adc5128 100644
> --- a/src/gallium/state_trackers/dri/dri_drawable.c
> +++ b/src/gallium/state_trackers/dri/dri_drawable.c
> @@ -492,8 +492,10 @@ dri_flush(__DRIcontext *cPriv,
>
> if (pipe->invalidate_resource &&
> (flags & __DRI2_FLUSH_INVALIDATE_ANCILLARY)) {
> - pipe->invalidate_resource(pipe, drawable->textures[ST_ATTACHMENT_DEPTH_STENCIL]);
> - pipe->invalidate_resource(pipe, drawable->msaa_textures[ST_ATTACHMENT_DEPTH_STENCIL]);
> + if (drawable->textures[ST_ATTACHMENT_DEPTH_STENCIL])
> + pipe->invalidate_resource(pipe, drawable->textures[ST_ATTACHMENT_DEPTH_STENCIL]);
> + if (drawable->msaa_textures[ST_ATTACHMENT_DEPTH_STENCIL])
> + pipe->invalidate_resource(pipe, drawable->msaa_textures[ST_ATTACHMENT_DEPTH_STENCIL]);
> }
> }
>
> --
> 2.6.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