[Mesa-dev] [PATCH] st/dri: Don't call invalidate_resource for NULL depth/stencil buffers
Nicolai Hähnle
nhaehnle at gmail.com
Fri Jan 15 07:13:07 PST 2016
Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
On 15.01.2016 02:22, Michel Dänzer 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]);
> }
> }
>
>
More information about the mesa-dev
mailing list