mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-30 18:40:13 +01:00
anv: index indirect data buffer with absolute offset
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>
This commit is contained in:
parent
db335d9b73
commit
718e77eee5
3 changed files with 3 additions and 4 deletions
|
|
@ -315,8 +315,7 @@ genX(cmd_buffer_emit_indirect_generated_draws)(struct anv_cmd_buffer *cmd_buffer
|
|||
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,
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ void write_draw(uint item_idx, uint cmd_idx, uint draw_id)
|
|||
{
|
||||
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 */
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ void write_draw(uint item_idx, uint cmd_idx, uint draw_id)
|
|||
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 */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue