From 239db93888a75a03cf52910f596c1184746eaebd Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Sun, 21 Dec 2014 12:48:59 -0800 Subject: gallium: Plumb the swap INVALIDATE_ANCILLARY flag through more layers. v2: Instead of telling the driver that the window system ancillaries have been invalidated (when the driver doesn't know which of its buffers are the window system's!), introduce a method for invalidating specific surfaces. Reviewed-by: Jose Fonseca --- src/gallium/state_trackers/dri/dri_drawable.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/gallium/state_trackers') diff --git a/src/gallium/state_trackers/dri/dri_drawable.c b/src/gallium/state_trackers/dri/dri_drawable.c index b7df053594c..eda2d5232c5 100644 --- a/src/gallium/state_trackers/dri/dri_drawable.c +++ b/src/gallium/state_trackers/dri/dri_drawable.c @@ -484,6 +484,12 @@ dri_flush(__DRIcontext *cPriv, } pipe->flush_resource(pipe, drawable->textures[ST_ATTACHMENT_BACK_LEFT]); + + 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]); + } } flush_flags = 0; -- cgit v1.2.3