summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/virgl/virgl_context.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/virgl/virgl_context.c')
-rw-r--r--src/gallium/drivers/virgl/virgl_context.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gallium/drivers/virgl/virgl_context.c b/src/gallium/drivers/virgl/virgl_context.c
index 03c0fd7cd50..dc1dd2d3c29 100644
--- a/src/gallium/drivers/virgl/virgl_context.c
+++ b/src/gallium/drivers/virgl/virgl_context.c
@@ -805,9 +805,14 @@ static void virgl_set_sampler_views(struct pipe_context *ctx,
}
static void
-virgl_texture_barrier(struct pipe_context *pctx, unsigned flags)
+virgl_texture_barrier(struct pipe_context *ctx, unsigned flags)
{
- /* stub */
+ struct virgl_context *vctx = virgl_context(ctx);
+ struct virgl_screen *rs = virgl_screen(ctx->screen);
+
+ if (!(rs->caps.caps.v2.capability_bits & VIRGL_CAP_TEXTURE_BARRIER))
+ return;
+ virgl_encode_texture_barrier(vctx, flags);
}
static void virgl_destroy_sampler_view(struct pipe_context *ctx,