mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 15:58:05 +02:00
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> (cherry picked from commit0aa632b519)
This commit is contained in:
parent
2a82433d7b
commit
8b496ec0ab
2 changed files with 4 additions and 3 deletions
|
|
@ -3834,7 +3834,7 @@
|
|||
"description": "anv: Use appropriate argument format for indirect draw",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "6d4f43f0d6f58edb5bf236ddf1ce6f798afa851b",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -5265,7 +5265,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);
|
||||
|
||||
|
|
@ -5314,7 +5315,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…
Add table
Reference in a new issue