mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 22:38:05 +02:00
zink: allow reordered clear_buffer calls
rare to hit, but no point in not promoting them when possible Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18784>
This commit is contained in:
parent
084f3b6664
commit
ceb34a2145
1 changed files with 3 additions and 5 deletions
|
|
@ -500,13 +500,11 @@ zink_clear_buffer(struct pipe_context *pctx,
|
|||
- size is the number of bytes to fill, and must be either a multiple of 4,
|
||||
or VK_WHOLE_SIZE to fill the range from offset to the end of the buffer
|
||||
*/
|
||||
struct zink_batch *batch = &ctx->batch;
|
||||
zink_batch_no_rp(ctx);
|
||||
zink_batch_reference_resource_rw(batch, res, true);
|
||||
util_range_add(&res->base.b, &res->valid_buffer_range, offset, offset + size);
|
||||
zink_screen(ctx->base.screen)->buffer_barrier(ctx, res, VK_ACCESS_TRANSFER_WRITE_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT);
|
||||
res->obj->unordered_read = res->obj->unordered_write = false;
|
||||
VKCTX(CmdFillBuffer)(batch->state->cmdbuf, res->obj->buffer, offset, size, *(uint32_t*)clear_value);
|
||||
VkCommandBuffer cmdbuf = zink_get_cmdbuf(ctx, NULL, res);
|
||||
zink_batch_reference_resource_rw(&ctx->batch, res, true);
|
||||
VKCTX(CmdFillBuffer)(cmdbuf, res->obj->buffer, offset, size, *(uint32_t*)clear_value);
|
||||
return;
|
||||
}
|
||||
struct pipe_transfer *xfer;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue