mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 03:08:05 +02:00
v3dv: fix incorrect index buffer size
When programming the size, we should take into account the
offset from the start of the index buffer address.
cc: mesa-stable
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29425>
(cherry picked from commit 70aa470bdb)
This commit is contained in:
parent
4319c1c6e8
commit
a2716f97d8
2 changed files with 6 additions and 5 deletions
|
|
@ -2014,7 +2014,7 @@
|
|||
"description": "v3dv: fix incorrect index buffer size",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -2606,11 +2606,12 @@ v3dX(cmd_buffer_emit_index_buffer)(struct v3dv_cmd_buffer *cmd_buffer)
|
|||
&job->bcl, cl_packet_length(INDEX_BUFFER_SETUP));
|
||||
v3dv_return_if_oom(cmd_buffer, NULL);
|
||||
|
||||
const uint32_t offset = cmd_buffer->state.index_buffer.offset;
|
||||
const uint32_t offset = ibuffer->mem_offset +
|
||||
cmd_buffer->state.index_buffer.offset;
|
||||
assert(ibuffer->mem->bo->size >= offset);
|
||||
cl_emit(&job->bcl, INDEX_BUFFER_SETUP, ib) {
|
||||
ib.address = v3dv_cl_address(ibuffer->mem->bo,
|
||||
ibuffer->mem_offset + offset);
|
||||
ib.size = ibuffer->mem->bo->size;
|
||||
ib.address = v3dv_cl_address(ibuffer->mem->bo, offset);
|
||||
ib.size = ibuffer->mem->bo->size - offset;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue