Repository navigation
Conversation
seed_compute tries every answer to a compute program's texture questions. A depth compare answered with an integer format gives SPIR-V that samples a uint image for a float compare result. No bound texture can give that answer, but the variant was kept in hookshot_programs.bin and compiled at start, where RADV's compiler crashes on it.
|
Confirmed on an RX 6800 XT (RADV NAVI21, Mesa 26.2.6, Fedora 44, kernel 7.2.15) with the v2.0.5 game and this branch's Fresh cache, no Ten minutes of frames afterwards, no Cache validation,
The six that remain are two other classes and are not this patch's: four compute modules with an One caveat on my side: the run renders offscreen ( |
|
Closing to keep the queue clear — please rebase on current main and reopen; thanks! |
What this fixes
On a fresh install with Mesa 26.2.6 (RADV, RX 9070 XT, Linux), the first start crashes in the shader warm-up, and the next two crash in the precompile before it gives up for one start:
seed_computetries every answer to a compute program's texture questions. When a texture that is depth-compared gets the answer "integer format", the SPIR-V samples auintimage for afloatcompare result.spirv-valrejects it, Mesa'sspirv_to_nirreturns NULL, and RADV dereferences that.No bound texture can give that answer, because a depth compare needs a depth format. The variant was still saved to
hookshot_programs.bin, soprecompile_runcompiled it again on later starts, and the warm-up and precompile markers only skip those steps temporarily.Change
seed_computenow treats a variant with a texture that is bothis_depthandis_integeras failed, so it is never compiled or saved.vk_shader.cppis part of the shader stamp, so caches that already hold these variants are rebuilt.Testing
On the RX 9070 XT with Mesa 26.2.6, using the v2.0.5 game with this branch's
hookshot_vk.so:MESA_SPIRV_FAIL_DUMP_PATHwrote no rejected shaders during either start. Before the fix it wrote the failing shader.spirv_to_nir. The other 194 passed it, including 190 valid gathers on integer textures and 4 with a mismatched image format, so the check does not need to be broader.tests/test_seed_compute_depth_integer.pyis new and game-free. It fails without the change.tests/run_all.py: 100 passed, 0 failed, 12 skipped (missing headers on this machine).Only the opening screens were run, about 15 seconds per start. I did not test gameplay, other GPUs or Windows.
Related