Repository navigation
fix(agc): let mesh-path list draws with primitive restart skip the list-restart emulation - #17976
Conversation
…st-restart emulation The list-restart emulation compacts the index buffer that the input assembler reads. A mesh draw has no input assembler: its entry fetches the indices itself, so the emulation does not apply to it. On a device without VK_EXT_primitive_topology_list_restart, a mesh-path list draw with primitive restart stopped at the requirement for that extension instead of drawing. It now takes the same path as on a device with the extension. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Windows CPU check of head Setup: Windows 11 Enterprise 22621, WinLibs GCC 15.2.0 UCRT r7, Release, with Vulkan hidden.
I'll run the fill-completion-labels tests and the inspection test on this machine's AMD GPU, with SPIRV-Tools on, and post the result here. AI-assisted: yes. |
|
GPU follow-up for head Setup: Windows 11 Enterprise 22621, AMD Radeon RX 6700 XT (driver 32.0.21045.16010), WinLibs GCC 15.2 UCRT, Release, These seven tests pass in 3 of 3 runs each, 21 of 21, none skipped:
All 411 hashes matched the prepared build when the job started. They cover the test and AI-assisted: yes. |
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
What
Draw.cppemulates primitive restart in point, line and triangle lists on devices withoutVK_EXT_primitive_topology_list_restartby compacting the index buffer that the input assembler reads (#12180). That branch also stopped every mesh-path list draw with restart at a requirement for the extension. A mesh draw has no input assembler: its entry fetches the indices itself, so the compaction does not apply to it.A mesh-path list draw with primitive restart now skips the emulation and takes the same path as on a device with the extension:
skipRestartis set for it, so the index range is read with the restart index left out. The requirement is removed.The fix and its diagnosis are imellag's (comment on #9356), and the commit carries their authorship. It is opened on its own at the request of the author of #17611 (comment): #17611 is what lets mesh-path draws reach devices without
VK_EXT_mesh_shader, such as MoltenVK, and there the requirement stops PPSA21564 shortly after launch.Not changed: the mesh entry handles the restart index only in triangle strips and fans. In a list it is fetched as an ordinary index, as it already was on devices with the extension.
Tested
macOS 27.3, Apple M5 Pro, Apple clang, x86-64 Release under Rosetta 2. Tree:
main81eb4e1935with #17611 (7957c8eb77; its only conflict,FormatVersioninShaderDiskCache.hpp, set to 69), and #16591, #17425, #17532 and #17767, which macOS needs to build. The game binary was relinked from the same tree.PPSA21564 on MoltenVK 1.4.2 (which lists
VK_EXT_primitive_topology_list_restartbut reportsprimitiveTopologyListRestartas false), same save, cold shader cache, 150 s limit:mainAGC graphics: device does not support mesh shadersmain+ #17611primitive restart in a mesh list draw needs VK_EXT_primitive_topology_list_restartmain+ #17611 + this changectest -R '^(agc_driver_(graphics|layered_[a-z_]+|mesh[a-z_]*|pass_break_reasons|pass_input_hazard)|agc_mesh_output_budget)$'on MoltenVK 1.4.2 and KosmicKrisp (Mesamain), on the same pull requests overmain6c03f737f0(Draw.cppis unchanged since), with and without this change: 10 run and pass, 8 skip. The 8 are the mesh execution tests, which skip on both drivers because neither hasVK_EXT_mesh_shader, so no existing test reaches this path.Linux, Windows, AMD and NVIDIA: not run. On a device that supports
primitiveTopologyListRestartthe change does nothing:skipRestartwas already set for these draws.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)mainon its own, and feat(agc): emulate mesh pipeline draws with a compute pass when VK_EXT_mesh_shader is unavailable #17611 is what makes the path reachable on devices withoutVK_EXT_mesh_shader🤖 Generated with Claude Code