summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/dri
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2014-12-21 12:48:59 -0800
committerEric Anholt <eric@anholt.net>2015-01-06 15:40:41 -0800
commit239db93888a75a03cf52910f596c1184746eaebd (patch)
tree38c0185b3d4b3fdb7f44dbdb84483cb080af682a /src/gallium/state_trackers/dri
parent70e8ccc459d9bf579ad7efeae453cb8641266c94 (diff)
downloadexternal_mesa3d-239db93888a75a03cf52910f596c1184746eaebd.zip
external_mesa3d-239db93888a75a03cf52910f596c1184746eaebd.tar.gz
external_mesa3d-239db93888a75a03cf52910f596c1184746eaebd.tar.bz2
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 <jfonseca@vmware.com>
Diffstat (limited to 'src/gallium/state_trackers/dri')
-rw-r--r--src/gallium/state_trackers/dri/dri_drawable.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/dri/dri_drawable.c b/src/gallium/state_trackers/dri/dri_drawable.c
index b7df053..eda2d52 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;