anv: use a single generation shader for indirect draws

The indirect draw count shader can be used as a more generic case of
the indirect draw one. We'll never enter the last condition of the
shader (writing the MI_BATCH_BUFFER_START) with non count variants of
draws.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20497>
This commit is contained in:
Lionel Landwerlin
2023-01-02 02:01:48 +02:00
committed by Marge Bot
parent 897a92f576
commit caf2389bc5
9 changed files with 118 additions and 409 deletions
+4 -2
View File
@@ -4727,6 +4727,7 @@ void genX(CmdDrawIndirect)(
cmd_buffer,
anv_address_add(buffer->address, offset),
MAX2(stride, sizeof(VkDrawIndirectCommand)),
ANV_NULL_ADDRESS /* count_addr */,
drawCount,
false /* indexed */);
} else {
@@ -4768,6 +4769,7 @@ void genX(CmdDrawIndexedIndirect)(
cmd_buffer,
anv_address_add(buffer->address, offset),
MAX2(stride, sizeof(VkDrawIndexedIndirectCommand)),
ANV_NULL_ADDRESS /* count_addr */,
drawCount,
true /* indexed */);
} else {
@@ -4966,7 +4968,7 @@ void genX(CmdDrawIndirectCount)(
#if GFX_HAS_GENERATED_CMDS
if (anv_use_generated_draws(cmd_buffer, maxDrawCount)) {
genX(cmd_buffer_emit_indirect_generated_draws_count)(
genX(cmd_buffer_emit_indirect_generated_draws)(
cmd_buffer,
indirect_data_address,
stride,
@@ -5023,7 +5025,7 @@ void genX(CmdDrawIndexedIndirectCount)(
#if GFX_HAS_GENERATED_CMDS
if (anv_use_generated_draws(cmd_buffer, maxDrawCount)) {
genX(cmd_buffer_emit_indirect_generated_draws_count)(
genX(cmd_buffer_emit_indirect_generated_draws)(
cmd_buffer,
indirect_data_address,
stride,