summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/virgl/virgl_query.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_query.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_query.c')
-rw-r--r--src/gallium/drivers/virgl/virgl_query.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gallium/drivers/virgl/virgl_query.c b/src/gallium/drivers/virgl/virgl_query.c
index f79be5f2f09..ea50f2f9341 100644
--- a/src/gallium/drivers/virgl/virgl_query.c
+++ b/src/gallium/drivers/virgl/virgl_query.c
@@ -42,7 +42,7 @@ static void virgl_render_condition(struct pipe_context *ctx,
boolean condition,
uint mode)
{
- struct virgl_context *vctx = (struct virgl_context *)ctx;
+ struct virgl_context *vctx = virgl_context(ctx);
struct virgl_query *query = (struct virgl_query *)q;
uint32_t handle = 0;
if (q)
@@ -53,7 +53,7 @@ static void virgl_render_condition(struct pipe_context *ctx,
static struct pipe_query *virgl_create_query(struct pipe_context *ctx,
unsigned query_type, unsigned index)
{
- struct virgl_context *vctx = (struct virgl_context *)ctx;
+ struct virgl_context *vctx = virgl_context(ctx);
struct virgl_query *query;
uint32_t handle;
@@ -81,7 +81,7 @@ static struct pipe_query *virgl_create_query(struct pipe_context *ctx,
static void virgl_destroy_query(struct pipe_context *ctx,
struct pipe_query *q)
{
- struct virgl_context *vctx = (struct virgl_context *)ctx;
+ struct virgl_context *vctx = virgl_context(ctx);
struct virgl_query *query = (struct virgl_query *)q;
virgl_encode_delete_object(vctx, query->handle, VIRGL_OBJECT_QUERY);
@@ -93,7 +93,7 @@ static void virgl_destroy_query(struct pipe_context *ctx,
static boolean virgl_begin_query(struct pipe_context *ctx,
struct pipe_query *q)
{
- struct virgl_context *vctx = (struct virgl_context *)ctx;
+ struct virgl_context *vctx = virgl_context(ctx);
struct virgl_query *query = (struct virgl_query *)q;
query->buf->clean = FALSE;
@@ -104,7 +104,7 @@ static boolean virgl_begin_query(struct pipe_context *ctx,
static void virgl_end_query(struct pipe_context *ctx,
struct pipe_query *q)
{
- struct virgl_context *vctx = (struct virgl_context *)ctx;
+ struct virgl_context *vctx = virgl_context(ctx);
struct virgl_query *query = (struct virgl_query *)q;
struct pipe_box box;
@@ -122,7 +122,7 @@ static boolean virgl_get_query_result(struct pipe_context *ctx,
boolean wait,
union pipe_query_result *result)
{
- struct virgl_context *vctx = (struct virgl_context *)ctx;
+ struct virgl_context *vctx = virgl_context(ctx);
struct virgl_query *query = (struct virgl_query *)q;
struct pipe_transfer *transfer;
struct virgl_host_query_state *host_state;