Mesh draw batching beyond strict state adjacency: per-draw parameter SRV table & Vulkan DGC path #1239
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork#1239
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Marukooh on GitHub · 2026-11-26 01:29 UTC · original
Summary & Measurements (RTX 5070 Ti + Proton / vkd3d-proton)
With
VICTORY_VIDEO_BUDGET_MB=10500andVICTORY_HOIST_CLAMPS=1, GPU time in heavy prologue scenes (2,500–6,000 draws/frame) is ~41–46 ms, of which ~2,400+ indirect mesh draws/frame (mostly single-record, no declared UAVs) still cost ~19–28 µs/draw (~45 ms total including remaining per-draw overhead).Two key local observations:
VICTORY_MESH_RUN_PROBE): across ~2,400 mesh draws/frame, 0 adjacent pairs matched identical-state adjacency — because root constants / CBV bindings change between consecutive draws, even when PSO, render targets, and barriers stay unchanged.mesh-batchbenchmark on RTX 5070 Ti (4,096 mesh draws):vulkaninfoon RTX 5070 Ti (driver 620.73.04) thatVK_EXT_device_generated_commands(DGC) with task/mesh pipeline binding is supported natively.Proposals
draw_idSRV) + multi-countExecuteIndirect:For runs that share the same PSO, attachments, and barrier/UAV boundaries and only vary root constants or CBV/buffer pointers, pack those per-draw parameters into an SRV ring buffer indexed by
draw_id(SV_DrawIndex/ indirect counter) and emit a single multi-countExecuteIndirectfor the whole run. This bypasses the 0-pair strict-adjacency limitation and removes per-drawState::replay+hoistoverhead.Under
vkd3d-proton, resource-scoped UAV barriers still lower to global Vulkan barriers and everyExecuteIndirectpays D3D12→Vulkan translation overhead. A native Vulkan /VK_EXT_device_generated_commandsfast-path (starting with the main mesh pass) would remove both translation overhead and unnecessary global drains.