[Mesa-dev] [PATCH 7/7] st/dri: flush drawable textures before unreferencing
Marek Olšák
maraeo at gmail.com
Fri Mar 7 10:54:21 PST 2014
From: Marek Olšák <marek.olsak at amd.com>
This fixes piglit/fbo-sys-blit with fast clear on radeonsi.
---
src/gallium/state_trackers/dri/drm/dri2.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/gallium/state_trackers/dri/drm/dri2.c b/src/gallium/state_trackers/dri/drm/dri2.c
index 3d8d569..4f2a87e 100644
--- a/src/gallium/state_trackers/dri/drm/dri2.c
+++ b/src/gallium/state_trackers/dri/drm/dri2.c
@@ -237,6 +237,14 @@ dri2_drawable_process_buffers(struct dri_context *ctx,
if (i == ST_ATTACHMENT_DEPTH_STENCIL && alloc_depthstencil)
continue;
+ /* Flush the texture before unreferencing, so that other clients can
+ * see what the driver has rendered.
+ */
+ if (i != ST_ATTACHMENT_DEPTH_STENCIL && drawable->textures[i]) {
+ struct pipe_context *pipe = ctx->st->pipe;
+ pipe->flush_resource(pipe, drawable->textures[i]);
+ }
+
pipe_resource_reference(&drawable->textures[i], NULL);
}
--
1.8.3.2
More information about the mesa-dev
mailing list