summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/virgl/virgl_buffer.c
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2015-10-28 10:48:31 +0000
committerEmil Velikov <[email protected]>2015-10-30 17:37:08 +0000
commit6b123fa07ff9d73d6e67416c2372eab5c17282b6 (patch)
tree4a77a0546c32450d71a7d49608ba1f9725f07c24 /src/gallium/drivers/virgl/virgl_buffer.c
parent1f43e4e1a3395592a9d0843cdba725a2ea45fa74 (diff)
virgl: add virgl_context/sampler_view/so_target() upcast wrappers
Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/drivers/virgl/virgl_buffer.c')
-rw-r--r--src/gallium/drivers/virgl/virgl_buffer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/virgl/virgl_buffer.c b/src/gallium/drivers/virgl/virgl_buffer.c
index 93fb29598a9..96cb82c4a90 100644
--- a/src/gallium/drivers/virgl/virgl_buffer.c
+++ b/src/gallium/drivers/virgl/virgl_buffer.c
@@ -43,7 +43,7 @@ static void *virgl_buffer_transfer_map(struct pipe_context *ctx,
const struct pipe_box *box,
struct pipe_transfer **transfer)
{
- struct virgl_context *vctx = (struct virgl_context *)ctx;
+ struct virgl_context *vctx = virgl_context(ctx);
struct virgl_screen *vs = virgl_screen(ctx->screen);
struct virgl_buffer *vbuf = virgl_buffer(resource);
struct virgl_transfer *trans;
@@ -97,7 +97,7 @@ static void *virgl_buffer_transfer_map(struct pipe_context *ctx,
static void virgl_buffer_transfer_unmap(struct pipe_context *ctx,
struct pipe_transfer *transfer)
{
- struct virgl_context *vctx = (struct virgl_context *)ctx;
+ struct virgl_context *vctx = virgl_context(ctx);
struct virgl_transfer *trans = (struct virgl_transfer *)transfer;
struct virgl_buffer *vbuf = virgl_buffer(transfer->resource);
@@ -119,7 +119,7 @@ static void virgl_buffer_transfer_flush_region(struct pipe_context *ctx,
struct pipe_transfer *transfer,
const struct pipe_box *box)
{
- struct virgl_context *vctx = (struct virgl_context *)ctx;
+ struct virgl_context *vctx = virgl_context(ctx);
struct virgl_buffer *vbuf = virgl_buffer(transfer->resource);
if (!vbuf->on_list) {