mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-21 14:20:29 +01:00
zink: ref vertex buffers during set_vertex_buffers
now we don't need to do it during bind Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10997>
This commit is contained in:
parent
962b162766
commit
f4bae3fe5e
2 changed files with 1 additions and 1 deletions
|
|
@ -844,6 +844,7 @@ zink_set_vertex_buffers(struct pipe_context *pctx,
|
|||
struct zink_resource *res = zink_resource(vb->buffer.resource);
|
||||
res->vbo_bind_count++;
|
||||
res->bind_count[0]++;
|
||||
zink_batch_reference_resource_rw(&ctx->batch, res, false);
|
||||
zink_resource_buffer_barrier(ctx, NULL, res, VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT,
|
||||
VK_PIPELINE_STAGE_VERTEX_INPUT_BIT);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -143,7 +143,6 @@ zink_bind_vertex_buffers(struct zink_batch *batch, struct zink_context *ctx)
|
|||
buffers[i] = res->obj->buffer;
|
||||
buffer_offsets[i] = vb->buffer_offset;
|
||||
buffer_strides[i] = vb->stride;
|
||||
zink_batch_reference_resource_rw(batch, res, false);
|
||||
} else {
|
||||
buffers[i] = zink_resource(ctx->dummy_vertex_buffer)->obj->buffer;
|
||||
buffer_offsets[i] = 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue