tools: validate the program cache's SPIR-V offline (scripts/validate_spirv.py) #1508
No reviewers
Labels
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
testing wanted
wontfix
No milestone
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Hookshot!1508
Loading…
Reference in a new issue
No description provided.
Delete branch "tools/validate-program-cache-spirv"
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?
A developer tool: runs
spirv-valoffline over every program inhookshot_programs.bin, and checks workgroup limits thatspirv-valdoesn't. No game code changes.Part of splitting up #1023.
Why
The mesh fallback's SPIR-V bugs that #1314 fixed showed up on an RX 5500M only as driver crashes or silent failures at pipeline creation. Validating the program cache offline found every one of them at once, with no game session needed:
Aligned;With those fixes: 1347 mesh-as-compute programs, 0 failed stages (
--uniform-buffer-standard-layout --scalar-block-layout, as Lichii validates).What it does
python -I scripts/validate_spirv.py <hookshot_programs.bin> [--all | --key <hex>]--all, or one program with--key.spirv-val(--target-env vulkan1.3by default;--val-argpasses more).--max-invocations,--max-shared; RDNA1 defaults 1024 and 64 KB)..spv,.spvasm(viaspirv-dis) and.txtwith the reasons, and groups the errors by message in a summary.Tests
tests/test_validate_spirv.py(new) builds a small cache with one valid module over the workgroup-memory limit and one invalid module, and checks that both are found.Risk
None to the game: one script and one test.