mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 06:58:05 +02:00
zink: move zink_flush_compute() users to zink_flush_queue()
Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9726>
This commit is contained in:
parent
fec07a664e
commit
e7362a9cbd
5 changed files with 7 additions and 16 deletions
|
|
@ -1364,12 +1364,6 @@ zink_batch_no_rp(struct zink_context *ctx)
|
|||
return batch;
|
||||
}
|
||||
|
||||
void
|
||||
zink_flush_compute(struct zink_context *ctx)
|
||||
{
|
||||
flush_batch(ctx, ZINK_QUEUE_COMPUTE);
|
||||
}
|
||||
|
||||
void
|
||||
zink_flush_queue(struct zink_context *ctx, enum zink_queue queue)
|
||||
{
|
||||
|
|
@ -1888,7 +1882,7 @@ zink_texture_barrier(struct pipe_context *pctx, unsigned flags)
|
|||
struct zink_context *ctx = zink_context(pctx);
|
||||
if (zink_batch_g(ctx)->has_work)
|
||||
pctx->flush(pctx, NULL, 0);
|
||||
zink_flush_compute(ctx);
|
||||
zink_flush_queue(ctx, ZINK_QUEUE_COMPUTE);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
|
|
@ -260,9 +260,6 @@ zink_fence_wait(struct pipe_context *ctx);
|
|||
void
|
||||
zink_wait_on_batch(struct zink_context *ctx, enum zink_queue queue, uint32_t batch_id);
|
||||
|
||||
void
|
||||
zink_flush_compute(struct zink_context *ctx);
|
||||
|
||||
void
|
||||
zink_flush_queue(struct zink_context *ctx, enum zink_queue queue);
|
||||
|
||||
|
|
|
|||
|
|
@ -801,7 +801,7 @@ update_descriptors(struct zink_context *ctx, struct zink_screen *screen, bool is
|
|||
ctx->base.flush(&ctx->base, NULL, PIPE_FLUSH_HINT_FINISH);
|
||||
else {
|
||||
/* flush compute batch */
|
||||
zink_flush_compute(ctx);
|
||||
zink_flush_queue(ctx, ZINK_QUEUE_COMPUTE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -409,7 +409,7 @@ force_cpu_read(struct zink_context *ctx, struct pipe_query *pquery, bool wait, e
|
|||
if (zink_batch_usage_matches(&query->batch_id, ZINK_QUEUE_GFX, zink_batch_g(ctx)->state->fence.batch_id))
|
||||
pctx->flush(pctx, NULL, PIPE_FLUSH_HINT_FINISH);
|
||||
else if (is_cs_query(query))
|
||||
zink_flush_compute(ctx);
|
||||
zink_flush_queue(ctx, ZINK_QUEUE_COMPUTE);
|
||||
|
||||
bool success = get_query_result(pctx, pquery, wait, &result);
|
||||
if (!success) {
|
||||
|
|
@ -460,7 +460,7 @@ copy_results_to_buffer(struct zink_context *ctx, struct zink_query *query, struc
|
|||
offset, 0, flags);
|
||||
/* this is required for compute batch sync and will be removed later */
|
||||
if (is_cs_query(query))
|
||||
zink_flush_compute(ctx);
|
||||
zink_flush_queue(ctx, ZINK_QUEUE_COMPUTE);
|
||||
else
|
||||
ctx->base.flush(&ctx->base, NULL, PIPE_FLUSH_HINT_FINISH);
|
||||
|
||||
|
|
@ -617,7 +617,7 @@ zink_get_query_result(struct pipe_context *pctx,
|
|||
uint32_t batch_id = p_atomic_read(&query->batch_id.usage[ZINK_QUEUE_COMPUTE]);
|
||||
zink_wait_on_batch(ctx, ZINK_QUEUE_COMPUTE, batch_id);
|
||||
} else {
|
||||
zink_flush_compute(ctx);
|
||||
zink_flush_queue(ctx, ZINK_QUEUE_COMPUTE);
|
||||
}
|
||||
} else {
|
||||
if (wait) {
|
||||
|
|
|
|||
|
|
@ -789,7 +789,7 @@ zink_transfer_map(struct pipe_context *pctx,
|
|||
/* TODO: can probably just do a full cs copy if it's already in a cs batch */
|
||||
if (zink_resource_has_usage(res, ZINK_RESOURCE_ACCESS_WRITE, ZINK_QUEUE_COMPUTE))
|
||||
/* don't actually have to stall here, only ensure batch is submitted */
|
||||
zink_flush_compute(ctx);
|
||||
zink_flush_queue(ctx, ZINK_QUEUE_COMPUTE);
|
||||
struct zink_context *ctx = zink_context(pctx);
|
||||
zink_transfer_copy_bufimage(ctx, staging_res, res, trans);
|
||||
/* need to wait for rendering to finish */
|
||||
|
|
@ -868,7 +868,7 @@ zink_transfer_flush_region(struct pipe_context *pctx,
|
|||
struct zink_resource *staging_res = zink_resource(trans->staging_res);
|
||||
if (zink_resource_has_usage(res, ZINK_RESOURCE_ACCESS_WRITE, ZINK_QUEUE_COMPUTE))
|
||||
/* don't actually have to stall here, only ensure batch is submitted */
|
||||
zink_flush_compute(ctx);
|
||||
zink_flush_queue(ctx, ZINK_QUEUE_COMPUTE);
|
||||
|
||||
if (ptrans->resource->target == PIPE_BUFFER)
|
||||
zink_copy_buffer(ctx, NULL, res, staging_res, box->x, box->x, box->width);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue