diff options
author | Michel Dänzer <[email protected]> | 2016-01-15 15:46:31 +0900 |
---|---|---|
committer | Michel Dänzer <[email protected]> | 2016-01-18 17:39:37 +0900 |
commit | 0491dd1deb46ca77545322c53e90f86ae244cdae (patch) | |
tree | 13f29c51cc2364c522849be024b9c3df49b56995 /src/gallium/state_trackers/dri/dri_drawable.c | |
parent | a9ab7172a621294f5d7b5dfac3363bed240e20a0 (diff) |
st/dri: Don't call invalidate_resource for NULL depth/stencil buffers
Fixes crash in 4 EGL piglit tests with radeonsi.
Reviewed-by: Nicolai Hähnle <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/dri/dri_drawable.c')
-rw-r--r-- | src/gallium/state_trackers/dri/dri_drawable.c | 6 |
1 files 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 f0cc4a2a3ef..adc51284767 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]); } } |