mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-20 14:39:58 -04:00
Declare StorageImageReadWithoutFormat when the translator reads an image that has no format.
The translator declares every float storage image without a format and turns a load of it into OpImageRead, which SPIR-V allows only in a module that declares StorageImageReadWithoutFormat; only the write-side capability was declared. Of the 44,206 shader variants a 0.7.1 install stores, 117 compute shaders were invalid SPIR-V for that reason (the contributor's sweep with spirv-val, for NVIDIA's, AMD's and Intel's host options: 117 before, 0 after). The drivers tried accept them, so nothing crashed, but an invalid module is whatever a driver makes of it. The read now declares the capability, once a module. The translator's identity changes, so an updated install translates its shaders again (the carry pass serves the old translations meanwhile). Built here from the local package cache; tools/xlate_smoke.py's new compute case fails with the translator before the patch and passes with it, and both modules validate. Not played with the new translator. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> (cherry picked from commit 62e5c345a2ec3e2cc70be49214997ff76e691309)
This commit is contained in:
@@ -99,8 +99,8 @@ def prepare_sources() -> Path:
|
||||
for junk in list(src.glob("src/*/obj")) + list(src.glob("src/*/bin")):
|
||||
shutil.rmtree(junk)
|
||||
patches = sorted((XLATE / "patches").glob("*.patch"))
|
||||
if len(patches) != 37:
|
||||
sys.exit(f"expected 37 patches, found {len(patches)}")
|
||||
if len(patches) != 38:
|
||||
sys.exit(f"expected 38 patches, found {len(patches)}")
|
||||
# build/xlate is inside this checkout, and git inside a repository reads a "diff --git" patch's paths from the
|
||||
# repository's top: those hunks fall outside the directory handed to --directory, git skips every file of the patch
|
||||
# and still exits 0. GIT_CEILING_DIRECTORIES stops git from walking up to the checkout, so it reads each patch as it
|
||||
|
||||
Reference in New Issue
Block a user