diff options
author | Dave Airlie <[email protected]> | 2018-07-18 13:37:49 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2018-08-01 08:02:35 +1000 |
commit | a090df0d5dc804c1b6e16442a49b2ecb612a990d (patch) | |
tree | 4f7f4da25249753f43beed728bd65bcdcadba87e /src/gallium/drivers/virgl/virgl_context.c | |
parent | 6f75058359b9b79b778dfb043dfc9a29cb5169c9 (diff) |
virgl: add memory barrier support
Reviwed-by: Gert Wollny <[email protected]>
Diffstat (limited to 'src/gallium/drivers/virgl/virgl_context.c')
-rw-r--r-- | src/gallium/drivers/virgl/virgl_context.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gallium/drivers/virgl/virgl_context.c b/src/gallium/drivers/virgl/virgl_context.c index 41ba853805b..d224b68cfcd 100644 --- a/src/gallium/drivers/virgl/virgl_context.c +++ b/src/gallium/drivers/virgl/virgl_context.c @@ -997,6 +997,17 @@ static void virgl_set_shader_images(struct pipe_context *ctx, virgl_encode_set_shader_images(vctx, shader, start_slot, count, images); } +static void virgl_memory_barrier(struct pipe_context *ctx, + unsigned flags) +{ + struct virgl_context *vctx = virgl_context(ctx); + struct virgl_screen *rs = virgl_screen(ctx->screen); + + if (!(rs->caps.caps.v2.capability_bits & VIRGL_CAP_MEMORY_BARRIER)) + return; + virgl_encode_memory_barrier(vctx, flags); +} + static void virgl_context_destroy( struct pipe_context *ctx ) { @@ -1136,6 +1147,8 @@ struct pipe_context *virgl_context_create(struct pipe_screen *pscreen, vctx->base.set_shader_buffers = virgl_set_shader_buffers; vctx->base.set_shader_images = virgl_set_shader_images; + vctx->base.memory_barrier = virgl_memory_barrier; + virgl_init_context_resource_functions(&vctx->base); virgl_init_query_functions(vctx); virgl_init_so_functions(vctx); |