mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-10 03:28:18 +02:00
kk: Fix divide by 0 in non-indexed draw unroll
For non-indexed draws, `index_buffer_el_size_B` is 0. Reviewed-by: Aitor Camacho <aitor@lunarg.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42071>
This commit is contained in:
parent
70caf135d2
commit
43b110dd62
1 changed files with 3 additions and 2 deletions
|
|
@ -1309,8 +1309,9 @@ kk_unroll_geometry(struct kk_cmd_buffer *cmd, struct kk_draw_command *data)
|
|||
.in_draw_stride_el = data->indirect_command.stride / sizeof(uint32_t),
|
||||
/* Handle primitive restart disable by forcing index to UINT32_MAX */
|
||||
.restart_index = !data->restart ? UINT32_MAX : data->restart_index,
|
||||
.index_buffer_size_el =
|
||||
data->index_buffer_range_B / data->index_buffer_el_size_B,
|
||||
.index_buffer_size_el = data->indexed ? data->index_buffer_range_B /
|
||||
data->index_buffer_el_size_B
|
||||
: 0u,
|
||||
.in_el_size_B = data->index_buffer_el_size_B,
|
||||
.out_el_size_B = 4u,
|
||||
.flatshade_first = true,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue