radeonsi: pass the context to query destroy functions
We'll need this in the future. Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
This commit is contained in:
parent
064f195ef0
commit
e241b405ca
|
@ -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 *squery)
|
||||||
{
|
{
|
||||||
struct si_query_pc *query = (struct si_query_pc *)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);
|
FREE(query->counters);
|
||||||
|
|
||||||
si_query_buffer_destroy(sscreen, &query->buffer);
|
si_query_buffer_destroy(sctx->screen, &query->buffer);
|
||||||
FREE(query);
|
FREE(query);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1100,7 +1100,7 @@ struct pipe_query *si_create_batch_query(struct pipe_context *ctx,
|
||||||
return (struct pipe_query *)query;
|
return (struct pipe_query *)query;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
si_pc_query_destroy(screen, &query->b);
|
si_pc_query_destroy((struct si_context *)ctx, &query->b);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -58,12 +58,12 @@ struct si_query_sw {
|
||||||
struct pipe_fence_handle *fence;
|
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 *squery)
|
||||||
{
|
{
|
||||||
struct si_query_sw *query = (struct si_query_sw *)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);
|
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,
|
void si_query_hw_destroy(struct si_context *sctx, struct si_query *squery)
|
||||||
struct si_query *squery)
|
|
||||||
{
|
{
|
||||||
struct si_query_hw *query = (struct si_query_hw *)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);
|
si_resource_reference(&query->workaround_buf, NULL);
|
||||||
FREE(squery);
|
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_context *sctx = (struct si_context *)ctx;
|
||||||
struct si_query *squery = (struct si_query *)query;
|
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,
|
static boolean si_begin_query(struct pipe_context *ctx,
|
||||||
|
|
|
@ -125,7 +125,7 @@ enum {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct si_query_ops {
|
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 (*begin)(struct si_context *, struct si_query *);
|
||||||
bool (*end)(struct si_context *, struct si_query *);
|
bool (*end)(struct si_context *, struct si_query *);
|
||||||
bool (*get_result)(struct si_context *,
|
bool (*get_result)(struct si_context *,
|
||||||
|
@ -214,7 +214,7 @@ struct si_query_hw {
|
||||||
unsigned workaround_offset;
|
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);
|
struct si_query *squery);
|
||||||
bool si_query_hw_begin(struct si_context *sctx,
|
bool si_query_hw_begin(struct si_context *sctx,
|
||||||
struct si_query *squery);
|
struct si_query *squery);
|
||||||
|
|
Loading…
Reference in New Issue