diff options
author | Marek Olšák <[email protected]> | 2014-03-07 17:25:05 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2014-03-11 18:51:20 +0100 |
commit | 8bd7a6f48c03b8bec2740cae392b6b1b00cbe1fc (patch) | |
tree | 51ec5e91fd44a55c07d0693bc464d6a6c56cab94 /src/gallium/state_trackers | |
parent | a38e1fd78ba406abe6c6dfd665804ec0d8f98172 (diff) |
st/dri: flush drawable textures before unreferencing
This fixes piglit/fbo-sys-blit with fast clear on radeonsi.
Reviewed-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r-- | src/gallium/state_trackers/dri/drm/dri2.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/dri/drm/dri2.c b/src/gallium/state_trackers/dri/drm/dri2.c index 3d8d5697327..4f2a87e86ce 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); } |