radv: only emit the "normal" index buffer when needed with DGC

Only if DGC emits an indexed draw without providing the index buffer
as part of the tokens. This avoids emitting useless packets.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41159>
This commit is contained in:
Samuel Pitoiset 2026-04-24 16:11:10 +02:00 committed by Marge Bot
parent dc816ce4ac
commit 4996cd82f6

View file

@ -13908,7 +13908,8 @@ radv_CmdExecuteGeneratedCommandsEXT(VkCommandBuffer commandBuffer, VkBool32 isPr
struct radv_draw_info info = {
.count = pGeneratedCommandsInfo->maxSequenceCount,
.indirect_va = (uintptr_t)&info,
.indexed = !!(layout->vk.dgc_info & BITFIELD_BIT(MESA_VK_DGC_DRAW_INDEXED)),
.indexed = (layout->vk.dgc_info & BITFIELD_BIT(MESA_VK_DGC_DRAW_INDEXED)) &&
!(layout->vk.dgc_info & BITFIELD_BIT(MESA_VK_DGC_IB)),
};
if (layout->vk.dgc_info & BITFIELD_BIT(MESA_VK_DGC_DRAW_MESH)) {