mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 15:00:11 +01:00
zink: set vbo resource usage on bind
this is more accurate and avoids setting usage on a batch that could be flushed before draw Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12822>
This commit is contained in:
parent
891b4497b4
commit
468a0fb2b1
2 changed files with 1 additions and 1 deletions
|
|
@ -935,7 +935,6 @@ zink_set_vertex_buffers(struct pipe_context *pctx,
|
|||
zink_resource_buffer_barrier(ctx, res, VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT,
|
||||
VK_PIPELINE_STAGE_VERTEX_INPUT_BIT);
|
||||
set_vertex_buffer_clamped(ctx, start_slot + i);
|
||||
zink_batch_resource_usage_set(&ctx->batch, res, false);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -146,6 +146,7 @@ zink_bind_vertex_buffers(struct zink_batch *batch, struct zink_context *ctx)
|
|||
elems->hw_state.dynbindings[i].stride = vb->stride;
|
||||
buffer_offsets[i] = ctx->vbuf_offsets[buffer_id];
|
||||
buffer_strides[i] = vb->stride;
|
||||
zink_batch_resource_usage_set(&ctx->batch, zink_resource(vb->buffer.resource), false);
|
||||
} else {
|
||||
buffers[i] = zink_resource(ctx->dummy_vertex_buffer)->obj->buffer;
|
||||
buffer_offsets[i] = 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue