Commit 80514527 authored by Samuel Pitoiset's avatar Samuel Pitoiset Committed by Dylan Baker

radv: fix getting the index type size for uint8_t

16-bit and 32-bit values match hardware values but 8-bit doesn't.

This fixes dEQP-VK.pipeline.input_assembly.* with 8-bit index.

Fixes: 372c3dcf ("radv: implement VK_EXT_index_type_uint8")
Signed-off-by: Samuel Pitoiset's avatarSamuel Pitoiset <>
Reviewed-by: Bas Nieuwenhuizen <
(cherry picked from commit 89671ef2)
parent 7d8eee2b
......@@ -3321,7 +3321,7 @@ void radv_CmdBindIndexBuffer(
cmd_buffer->state.index_va = radv_buffer_get_va(index_buffer->bo);
cmd_buffer->state.index_va += index_buffer->offset + offset;
int index_size = radv_get_vgt_index_size(indexType);
int index_size = radv_get_vgt_index_size(vk_to_index_type(indexType));
cmd_buffer->state.max_index_count = (index_buffer->size - offset) / index_size;
cmd_buffer->state.dirty |= RADV_CMD_DIRTY_INDEX_BUFFER;
radv_cs_add_buffer(cmd_buffer->device->ws, cmd_buffer->cs, index_buffer->bo);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment