mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-21 18:00:13 +01:00
anv: implement vkCmdBindIndexBuffer2KHR
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: José Roberto de Souza <jose.souza@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24387>
This commit is contained in:
parent
ceb1d81763
commit
5c2aca456e
3 changed files with 5 additions and 3 deletions
|
|
@ -2831,6 +2831,7 @@ struct anv_cmd_graphics_state {
|
|||
struct anv_buffer *index_buffer;
|
||||
uint32_t index_type; /**< 3DSTATE_INDEX_BUFFER.IndexFormat */
|
||||
uint32_t index_offset;
|
||||
uint32_t index_size;
|
||||
|
||||
struct vk_vertex_input_state vertex_input;
|
||||
struct vk_sample_locations_state sample_locations;
|
||||
|
|
|
|||
|
|
@ -8180,10 +8180,11 @@ static uint32_t restart_index_for_type(VkIndexType type)
|
|||
}
|
||||
}
|
||||
|
||||
void genX(CmdBindIndexBuffer)(
|
||||
void genX(CmdBindIndexBuffer2KHR)(
|
||||
VkCommandBuffer commandBuffer,
|
||||
VkBuffer _buffer,
|
||||
VkDeviceSize offset,
|
||||
VkDeviceSize size,
|
||||
VkIndexType indexType)
|
||||
{
|
||||
ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
|
||||
|
|
@ -8202,6 +8203,7 @@ void genX(CmdBindIndexBuffer)(
|
|||
cmd_buffer->state.gfx.index_buffer = buffer;
|
||||
cmd_buffer->state.gfx.index_type = vk_to_intel_index_type(indexType);
|
||||
cmd_buffer->state.gfx.index_offset = offset;
|
||||
cmd_buffer->state.gfx.index_size = vk_buffer_range(&buffer->vk, offset, size);
|
||||
cmd_buffer->state.gfx.dirty |= ANV_CMD_DIRTY_INDEX_BUFFER;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -797,8 +797,7 @@ genX(cmd_buffer_flush_dynamic_state)(struct anv_cmd_buffer *cmd_buffer)
|
|||
ib.L3BypassDisable = true;
|
||||
#endif
|
||||
ib.BufferStartingAddress = anv_address_add(buffer->address, offset);
|
||||
ib.BufferSize = vk_buffer_range(&buffer->vk, offset,
|
||||
VK_WHOLE_SIZE);
|
||||
ib.BufferSize = cmd_buffer->state.gfx.index_size;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue