aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2019-12-10 15:45:14 -0500
committerMarek Olšák <[email protected]>2020-01-17 15:04:35 -0500
commit3ba16d36c988a1c7b31c7fe44c1b6a24d9d8227d (patch)
treed8ad4fd6b61bd11703d05f374065b2d5a4e8c222 /src
parentbec9c90b5ecf9cc2dc580f9ff297f94ba5aa3506 (diff)
st/dri: do FLUSH_VERTICES before calling flush_resource
Diffstat (limited to 'src')
-rw-r--r--src/gallium/state_trackers/dri/dri2.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/gallium/state_trackers/dri/dri2.c b/src/gallium/state_trackers/dri/dri2.c
index e6f0e40465a..e1d87eec6ad 100644
--- a/src/gallium/state_trackers/dri/dri2.c
+++ b/src/gallium/state_trackers/dri/dri2.c
@@ -445,10 +445,8 @@ dri2_allocate_textures(struct dri_context *ctx,
/* 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]);
- }
+ if (i != ST_ATTACHMENT_DEPTH_STENCIL && drawable->textures[i])
+ ctx->st->flush_resource(ctx->st, drawable->textures[i]);
pipe_resource_reference(&drawable->textures[i], NULL);
}
@@ -1517,11 +1515,11 @@ dri2_blit_image(__DRIcontext *context, __DRIimage *dst, __DRIimage *src,
pipe->blit(pipe, &blit);
if (flush_flag == __BLIT_FLAG_FLUSH) {
- pipe->flush_resource(pipe, dst->texture);
+ ctx->st->flush_resource(ctx->st, dst->texture);
ctx->st->flush(ctx->st, 0, NULL, NULL, NULL);
} else if (flush_flag == __BLIT_FLAG_FINISH) {
screen = dri_screen(ctx->sPriv)->base.screen;
- pipe->flush_resource(pipe, dst->texture);
+ ctx->st->flush_resource(ctx->st, dst->texture);
ctx->st->flush(ctx->st, 0, &fence, NULL, NULL);
(void) screen->fence_finish(screen, NULL, fence, PIPE_TIMEOUT_INFINITE);
screen->fence_reference(screen, &fence, NULL);