diff options
author | Nicolai Hähnle <[email protected]> | 2018-09-20 10:19:30 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2019-07-03 15:51:12 -0400 |
commit | e241b405ca3d9da5167af2f224520227a9a5377e (patch) | |
tree | 99d9634c76619edef72e1f9667f9e5de0a388265 /src/gallium | |
parent | 064f195ef01fbcd0cf49b32cb48cc03b91470527 (diff) |
radeonsi: pass the context to query destroy functions
We'll need this in the future.
Acked-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_perfcounter.c | 6 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_query.c | 11 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_query.h | 4 |
3 files changed, 10 insertions, 11 deletions
diff --git a/src/gallium/drivers/radeonsi/si_perfcounter.c b/src/gallium/drivers/radeonsi/si_perfcounter.c index 75bd61730da..d073b5821fb 100644 --- a/src/gallium/drivers/radeonsi/si_perfcounter.c +++ b/src/gallium/drivers/radeonsi/si_perfcounter.c @@ -749,7 +749,7 @@ static void si_pc_emit_read(struct si_context *sctx, } } -static void si_pc_query_destroy(struct si_screen *sscreen, +static void si_pc_query_destroy(struct si_context *sctx, struct si_query *squery) { struct si_query_pc *query = (struct si_query_pc *)squery; @@ -762,7 +762,7 @@ static void si_pc_query_destroy(struct si_screen *sscreen, FREE(query->counters); - si_query_buffer_destroy(sscreen, &query->buffer); + si_query_buffer_destroy(sctx->screen, &query->buffer); FREE(query); } @@ -1100,7 +1100,7 @@ struct pipe_query *si_create_batch_query(struct pipe_context *ctx, return (struct pipe_query *)query; error: - si_pc_query_destroy(screen, &query->b); + si_pc_query_destroy((struct si_context *)ctx, &query->b); return NULL; } diff --git a/src/gallium/drivers/radeonsi/si_query.c b/src/gallium/drivers/radeonsi/si_query.c index fabb7544047..ae6498e1895 100644 --- a/src/gallium/drivers/radeonsi/si_query.c +++ b/src/gallium/drivers/radeonsi/si_query.c @@ -58,12 +58,12 @@ struct si_query_sw { struct pipe_fence_handle *fence; }; -static void si_query_sw_destroy(struct si_screen *sscreen, +static void si_query_sw_destroy(struct si_context *sctx, struct si_query *squery) { struct si_query_sw *query = (struct si_query_sw *)squery; - sscreen->b.fence_reference(&sscreen->b, &query->fence, NULL); + sctx->b.screen->fence_reference(sctx->b.screen, &query->fence, NULL); FREE(query); } @@ -624,12 +624,11 @@ bool si_query_buffer_alloc(struct si_context *sctx, struct si_query_buffer *buff } -void si_query_hw_destroy(struct si_screen *sscreen, - struct si_query *squery) +void si_query_hw_destroy(struct si_context *sctx, struct si_query *squery) { struct si_query_hw *query = (struct si_query_hw *)squery; - si_query_buffer_destroy(sscreen, &query->buffer); + si_query_buffer_destroy(sctx->screen, &query->buffer); si_resource_reference(&query->workaround_buf, NULL); FREE(squery); } @@ -1105,7 +1104,7 @@ static void si_destroy_query(struct pipe_context *ctx, struct pipe_query *query) struct si_context *sctx = (struct si_context *)ctx; struct si_query *squery = (struct si_query *)query; - squery->ops->destroy(sctx->screen, squery); + squery->ops->destroy(sctx, squery); } static boolean si_begin_query(struct pipe_context *ctx, diff --git a/src/gallium/drivers/radeonsi/si_query.h b/src/gallium/drivers/radeonsi/si_query.h index c1918f4df2d..82e5e25ed00 100644 --- a/src/gallium/drivers/radeonsi/si_query.h +++ b/src/gallium/drivers/radeonsi/si_query.h @@ -125,7 +125,7 @@ enum { }; struct si_query_ops { - void (*destroy)(struct si_screen *, struct si_query *); + void (*destroy)(struct si_context *, struct si_query *); bool (*begin)(struct si_context *, struct si_query *); bool (*end)(struct si_context *, struct si_query *); bool (*get_result)(struct si_context *, @@ -214,7 +214,7 @@ struct si_query_hw { unsigned workaround_offset; }; -void si_query_hw_destroy(struct si_screen *sscreen, +void si_query_hw_destroy(struct si_context *sctx, struct si_query *squery); bool si_query_hw_begin(struct si_context *sctx, struct si_query *squery); |