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 <nicolai.haehnle@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
a9ab7172a6
commit
0491dd1deb
|
@ -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]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue