st/dri: flush drawable textures before unreferencing

This fixes piglit/fbo-sys-blit with fast clear on radeonsi.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
This commit is contained in:
Marek Olšák 2014-03-07 17:25:05 +01:00
parent a38e1fd78b
commit 8bd7a6f48c

View file

@ -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);
}