diff options
author | Emil Velikov <[email protected]> | 2015-10-28 10:48:31 +0000 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2015-10-30 17:37:08 +0000 |
commit | 6b123fa07ff9d73d6e67416c2372eab5c17282b6 (patch) | |
tree | 4a77a0546c32450d71a7d49608ba1f9725f07c24 /src/gallium/drivers/virgl/virgl_streamout.c | |
parent | 1f43e4e1a3395592a9d0843cdba725a2ea45fa74 (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_streamout.c')
-rw-r--r-- | src/gallium/drivers/virgl/virgl_streamout.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/drivers/virgl/virgl_streamout.c b/src/gallium/drivers/virgl/virgl_streamout.c index 95420f688d3..c3cbcffc193 100644 --- a/src/gallium/drivers/virgl/virgl_streamout.c +++ b/src/gallium/drivers/virgl/virgl_streamout.c @@ -32,7 +32,7 @@ static struct pipe_stream_output_target *virgl_create_so_target( unsigned buffer_offset, unsigned buffer_size) { - struct virgl_context *vctx = (struct virgl_context *)ctx; + struct virgl_context *vctx = virgl_context(ctx); struct virgl_resource *res = (struct virgl_resource *)buffer; struct virgl_so_target *t = CALLOC_STRUCT(virgl_so_target); uint32_t handle; @@ -55,8 +55,8 @@ static struct pipe_stream_output_target *virgl_create_so_target( static void virgl_destroy_so_target(struct pipe_context *ctx, struct pipe_stream_output_target *target) { - struct virgl_context *vctx = (struct virgl_context *)ctx; - struct virgl_so_target *t = (struct virgl_so_target *)target; + struct virgl_context *vctx = virgl_context(ctx); + struct virgl_so_target *t = virgl_so_target(target); pipe_resource_reference(&t->base.buffer, NULL); virgl_encode_delete_object(vctx, t->handle, VIRGL_OBJECT_STREAMOUT_TARGET); @@ -68,7 +68,7 @@ static void virgl_set_so_targets(struct pipe_context *ctx, struct pipe_stream_output_target **targets, const unsigned *offset) { - struct virgl_context *vctx = (struct virgl_context *)ctx; + struct virgl_context *vctx = virgl_context(ctx); int i; for (i = 0; i < num_targets; i++) { pipe_resource_reference(&vctx->so_targets[i].base.buffer, targets[i]->buffer); |