This will help for a follow up change where we will respawn the shader
multiple times in a loop and the base offset will be edited by the
shader itself.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Tested-by: Felix DeGrood <felix.j.degrood@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25361>
cmd_buffer,
anv_batch_current_address(&cmd_buffer->batch),
draw_cmd_stride,
- anv_address_add(indirect_data_addr,
- item_base * indirect_data_stride),
+ indirect_data_addr,
indirect_data_stride,
anv_address_add(draw_id_addr, 4 * item_base),
item_base,
{
bool is_indexed = (params.flags & ANV_GENERATED_FLAG_INDEXED) != 0;
bool is_predicated = (params.flags & ANV_GENERATED_FLAG_PREDICATED) != 0;
- uint indirect_data_offset = item_idx * params.indirect_data_stride / 4;
+ uint indirect_data_offset = draw_id * params.indirect_data_stride / 4;
if (is_indexed) {
/* Loading a VkDrawIndexedIndirectCommand */
bool uses_base = (params.flags & ANV_GENERATED_FLAG_BASE) != 0;
bool uses_drawid = (params.flags & ANV_GENERATED_FLAG_DRAWID) != 0;
uint mocs = (params.flags >> 8) & 0xff;
- uint indirect_data_offset = item_idx * params.indirect_data_stride / 4;
+ uint indirect_data_offset = draw_id * params.indirect_data_stride / 4;
if (is_indexed) {
/* Loading a VkDrawIndexedIndirectCommand */