This fixes piglit/fbo-sys-blit with fast clear on radeonsi.
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
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);
}