mirror of https://gitlab.freedesktop.org/mesa/mesa
anv: Use appropriate argument format for indirect draw
If index is specified we can use the DRAWINDEXED otherwise we can simply
use DRAW argument format.
v2: (Rohan & Lionel)
- Fix the aligned_stride check
Fixes: 6d4f43f0d6
("anv: Emit EXECUTE_INDIRECT_DRAW when available")
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28658>
This commit is contained in:
parent
7e82c59fa4
commit
0aa632b519
|
@ -1603,7 +1603,8 @@ emit_indirect_draws(struct anv_cmd_buffer *cmd_buffer,
|
|||
UNUSED const struct intel_device_info *devinfo = cmd_buffer->device->info;
|
||||
UNUSED const bool aligned_stride =
|
||||
(indirect_data_stride == 0 ||
|
||||
indirect_data_stride == sizeof(VkDrawIndirectCommand));
|
||||
(!indexed && indirect_data_stride == sizeof(VkDrawIndirectCommand)) ||
|
||||
(indexed && indirect_data_stride == sizeof(VkDrawIndexedIndirectCommand)));
|
||||
UNUSED const bool execute_indirect_supported =
|
||||
execute_indirect_draw_supported(cmd_buffer);
|
||||
|
||||
|
@ -1652,7 +1653,7 @@ emit_indirect_draws(struct anv_cmd_buffer *cmd_buffer,
|
|||
#if GFX_VERx10 >= 125
|
||||
genX(emit_breakpoint)(&cmd_buffer->batch, cmd_buffer->device, true);
|
||||
anv_batch_emit(&cmd_buffer->batch, GENX(EXECUTE_INDIRECT_DRAW), ind) {
|
||||
ind.ArgumentFormat = DRAW;
|
||||
ind.ArgumentFormat = indexed ? DRAWINDEXED : DRAW;
|
||||
ind.TBIMREnabled = cmd_buffer->state.gfx.dyn_state.use_tbimr;
|
||||
ind.PredicateEnable =
|
||||
cmd_buffer->state.conditional_render_enabled;
|
||||
|
|
Loading…
Reference in New Issue