Respect unsigned storage-image formats #848

Closed
klimovich008 wants to merge 2 commits from codex/unsigned-image-sample-types into main
klimovich008 commented 2026-11-08 23:09:36 +00:00 (Migrated from github.com)

What this fixes

Compute preparation can emit a float-sampled storage image with an explicit unsigned format when the texture-format answer is false. Vulkan rejects the module with VUID-StandaloneSpirv-Image-04965, including the R32ui case reproduced on RX 9070 XT.

Why merge

  • Explicit unsigned formats determine the sampled type before consulting the environment.
  • Typeless and signed formats retain their existing queries and behavior.
  • Keep current main's depth guard and unrelated changes; preserve read, write and atomic work.

Change

  • gpu/vk/eden/shader_recompiler/ir_opt/texture_pass.cpp: recognize the five explicit unsigned image formats.
  • tests/unsigned_image_types_ir.cpp: reuse the real-pass/emitter read, write, buffer-write, atomic and Typeless fixture.
  • nx2/test_unsigned_image_types.py: validate fourteen modules, answer invariance and query counts.
  • tests/run_all.py: register the existing compiler/header/validator bindings.

Tested

python -I -B tests/run_all.py --jobs 1 --strict unsigned_image_types.

Fails on the old code, passes now: earlier CPU checks found five old float-answer failures; all fourteen fixed modules validated and nine controls stayed byte-identical. Earlier RX 9070 XT/API4 checks built four fresh compute variants with no VUIDs on #772 plus #834 and this fix. All four rebased CI jobs pass, including the Linux fourteen-module regression. Windows passes with the expected validator-dependent skip.

Not covered

  • Current-main GPU and full-game validation remain pending. Earlier hardware evidence used the combined #772/#834 build.
  • Signed formats and separate extended-format/buffer-read capability gaps are unchanged.
## What this fixes Compute preparation can emit a float-sampled storage image with an explicit unsigned format when the texture-format answer is false. Vulkan rejects the module with `VUID-StandaloneSpirv-Image-04965`, including the R32ui case reproduced on RX 9070 XT. ## Why merge - Explicit unsigned formats determine the sampled type before consulting the environment. - Typeless and signed formats retain their existing queries and behavior. - Keep current main's depth guard and unrelated changes; preserve read, write and atomic work. ## Change - `gpu/vk/eden/shader_recompiler/ir_opt/texture_pass.cpp`: recognize the five explicit unsigned image formats. - `tests/unsigned_image_types_ir.cpp`: reuse the real-pass/emitter read, write, buffer-write, atomic and Typeless fixture. - `nx2/test_unsigned_image_types.py`: validate fourteen modules, answer invariance and query counts. - `tests/run_all.py`: register the existing compiler/header/validator bindings. ## Tested `python -I -B tests/run_all.py --jobs 1 --strict unsigned_image_types`. Fails on the old code, passes now: earlier CPU checks found five old float-answer failures; all fourteen fixed modules validated and nine controls stayed byte-identical. Earlier RX 9070 XT/API4 checks built four fresh compute variants with no VUIDs on #772 plus #834 and this fix. All four [rebased CI jobs](https://github.com/klimovich008/Hookshot/actions/runs/42578982395) pass, including the Linux fourteen-module regression. Windows passes with the expected validator-dependent skip. ## Not covered - **Current-main GPU and full-game validation remain pending.** Earlier hardware evidence used the combined #772/#834 build. - Signed formats and separate extended-format/buffer-read capability gaps are unchanged.
NotRexed commented 2026-11-09 05:30:35 +00:00 (Migrated from github.com)

Closing to keep the queue clear — please rebase on current main and reopen; thanks!

Closing to keep the queue clear — please rebase on current main and reopen; thanks!
Commenting is not possible because the repository is archived.
No description provided.