Skip to content

fix(agc): round 16-bit float image stores toward zero - #8998

Open
MarcZX10 wants to merge 4 commits into
boykopovar:mainfrom
MarcZX10:codex/f32-image-store-rtz-8282
Open

MarcZX10 wants to merge 4 commits into
boykopovar:mainfrom
MarcZX10:codex/f32-image-store-rtz-8282

Conversation

@MarcZX10

@MarcZX10 MarcZX10 commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

What

Use a UINT storage-image view for write-only 16-bit float formats and convert each stored component with the existing round-toward-zero float-to-half routine. This preserves negative values, infinities and NaNs, and saturates finite overflow as observed on the AMD hardware documented in #8282. Add execution coverage for 16_FLOAT, 16_16_FLOAT and 16_16_16_16_FLOAT, including edge values and component masks. The follow-up binds UINT-compatible views for these converted formats while retaining native SFLOAT views for float bindings. This update also binds a compatible UINT view for multisampled float16 targets and restores the existing two-argument StorageView call sites after rebasing on current main.

Tested

  • Linux: ninja -C build agc_driver_sample_multisample_target_tests succeeds on updated head 7081834388.
  • Local Vulkan execution of agc_driver_sample_multisample_target stops before test initialization because this host CPU lacks BMI1, BMI2, LZCNT, MOVBE, AVX2 and FMA. The test therefore did not reach Vulkan validation.
  • AMD Windows: RX 6700 XT (gfx1031), driver 32.0.21045.5002, Windows 11 26200, MinGW GCC 15.2 Release, updated head 7081834388 cleanly merged onto main b00235dda0. agc_driver_sample_multisample_target and agc_driver_image_store_float_rounding each pass 3/3 without validation and 3/3 with VK_LAYER_KHRONOS_validation; the focused validation runs report 0 VUID- lines. Adjacent native-MSAA, image conversion/repacking and depth-storage tests also pass 3/3 in both modes.
  • Apple M2 Max (Metal via MoltenVK 1.4.2), macOS 27.2 under Rosetta 2, updated head 708183438: agc_driver_image_store_float_rounding passes 3/3. The multisample target test is skipped because MoltenVK does not expose shaderStorageImageMultisample. With the production change reverted and the new test retained, the float16 rounding test fails at 0x7e00 where round-toward-zero expects 0x7e09, confirming the host rounding difference this path handles.
  • python3 tools/check_conventions.py --base upstream/main passes. python3 tools/pr_overlap.py --branch codex/f32-image-store-rtz-8282 reports shared graphics files in other open PRs, including fix(agc): support packed 16-bit storage images #6218, perf(shader): deduplicate runtime image switch modes and base-level sample branches #8716 and feat(shader): support 32-bit image atomics through keyed image tables #8792; their topics are packed storage images, shader emitter performance and image atomics, respectively. No dependency is identified.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: AMD Radeon RX 6700 XT (gfx1031), AMD driver 32.0.21045.5002, Windows 11; Apple M2 Max with MoltenVK 1.4.2, macOS 27.2. The updated head was GPU-tested on both; the multisample target test is unavailable on MoltenVK.
  • AI-assisted: yes

@clairtonmichel

Copy link
Copy Markdown

Tested on AMD Ryzen 7 9800X3D and AMD Radeon RX 7900 XTX (Fedora Linux, Mesa 26.2.5):

  • Built cleanly with zero errors.
  • Ran image and graphics test suites, resulting in 2 failures:
    • agc_driver_image_array_window_past_layer_limit (Failed)
    • agc_driver_image_store_float_rounding (Failed with: image_store of 16_FLOAT: texel (1, 0) component 0 is 0, expected 15360)

It seems the 16-bit floating point rounding towards zero logic is prematurely truncating or zeroing out the store on RDNA3/RADV. Needs a revision!

@MarcZX10

Copy link
Copy Markdown
Contributor Author

Thanks for running this on RADV. The 16_FLOAT failure is a real regression in the new path; I am tracing why the converted UINT storage view writes zero for the 0x3f801000 input instead of 0x3c00. I cannot reproduce the GPU run on my current host (its CPU lacks required ISA features, so the test exits during initialization). I will update this PR with the fix and validation; the separate image_array_window_past_layer_limit failure is being checked independently.

@MarcZX10

Copy link
Copy Markdown
Contributor Author

I found the cause in the descriptor view path: the converted shader emitted UINT texels, but StorageTexture::StorageView only created UINT-compatible views for signed formats. A float16 descriptor therefore reached the shader through its native SFLOAT view. Commit 268bfc012f now selects the UINT view for the UINT storage-image binding and keeps the native float view for float bindings; the view mapping covers R16, R16G16 and R16G16B16A16 SFLOAT. The focused test target builds on Linux, and conventions plus git diff --check pass. I cannot run the Vulkan test on this host because its CPU lacks LZCNT, BMI1/2, MOVBE, AVX2 and FMA, so the GPU result on the new head is still needed. When convenient, could you rerun the focused test on this head and report results for all three formats? The existing image_array_window_past_layer_limit failure is also still untriaged from the output here; its first failing assertion would help isolate it.

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

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.

Pull request Shared files not compared
PR 862 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 907 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
PR 1368 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 1395 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 4448 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 5021 core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
PR 5371 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
PR 5609 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6108 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6187 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6188 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6192 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6194 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6197 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6202 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6209 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6223 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6249 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6280 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
PR 6412 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 6481 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6488 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
PR 6498 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6539 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6615 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6804 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6808 core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
PR 6820 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6960 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6970 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6973 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6977 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6987 core/libs/prx/libSceAgcDriver/Graphics/include/MultisampleTarget.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6989 core/libs/prx/libSceAgcDriver/Graphics/include/MultisampleTarget.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6995 core/libs/prx/libSceAgcDriver/Graphics/include/MultisampleTarget.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 7002 core/libs/prx/libSceAgcDriver/Graphics/include/MultisampleTarget.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 7048 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 7085 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
PR 7223 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
PR 7256 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 7261 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 7310 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 7395 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
PR 7449 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
PR 7484 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 7514 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 7550 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 7604 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 7618 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 7642 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
PR 7684 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 8077 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 8123 core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
PR 8126 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 8212 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 8223 core/libs/prx/libSceAgcDriver/Graphics/include/MultisampleTarget.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
PR 8484 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 8615 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 8707 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 8716 core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
PR 8756 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 8887 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 8898 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 8911 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 8939 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
PR 8963 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 9012 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 9020 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 9050 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 9176 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 9177 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 9183 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
PR 9186 core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
PR 9260 core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
PR 9287 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 9289 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 9335 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 9400 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 9431 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 9432 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 9443 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 9445 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 9450 core/libs/prx/libSceAgcDriver/Graphics/include/MultisampleTarget.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
PR 9457 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
PR 9508 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
PR 9521 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 9533 core/libs/prx/libSceAgcDriver/Graphics/include/MultisampleTarget.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
PR 9564 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 9592 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 9633 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
PR 9672 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 9673 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 9674 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 9675 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 9676 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 9685 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 9700 core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
PR 9712 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 9717 core/libs/prx/libSceAgcDriver/Graphics/include/MultisampleTarget.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
PR 9742 core/libs/prx/libSceAgcDriver/Graphics/include/MultisampleTarget.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
PR 9748 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 9749 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
PR 9790 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
PR 9842 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 9852 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 9858 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 9879 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 9889 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
PR 9891 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 9892 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 9893 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 9895 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 9897 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 9940 core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
PR 9941 core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
PR 9961 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 9969 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
PR 9999 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 10000 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 10026 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 10044 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 10049 core/libs/prx/libSceAgcDriver/Graphics/include/MultisampleTarget.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 10064 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 10150 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 10159 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 10193 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
PR 10194 core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 10233 core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 10249 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 10256 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 10368 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 10382 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp

@clairtonmichel

Copy link
Copy Markdown

Tested on AMD Ryzen 7 9800X3D and AMD Radeon RX 7900 XTX (Fedora Linux, Mesa 26.2.5):

  • Re-run focused AGC tests with commit 268bfc012fa:
    • agc_driver_image_store_float_rounding: Passed successfully (float16 / R16, R16G16, R16G16B16A16 storage view formats behave correctly with the new UINT selection).
  • Focused isolated test run results and errors observed:
    • agc_driver_guest_memory_lifetime: Failed
    • agc_driver_image_array_window_past_layer_limit: Failed
    • agc_driver_sample_multisample_target: Failed
    • agc_driver_tessellation: SEGFAULT

@MarcZX10

Copy link
Copy Markdown
Contributor Author

The overlap report is valid: #8716 touches the StoreTexel SINT conversion guard, and #6218 changes storage-format materialization in ResourceMaterializer.cpp. Their purposes are separate from this PR's write-only 16-bit-float storage path; #8998 does not depend on either one. If one merges first, I will resolve any textual conflict against the updated main and rerun the focused validation. I have not marked a dependency because neither change is required for this fix.

@MarcZX10

Copy link
Copy Markdown
Contributor Author

Thanks for rerunning the corrected head. The focused pass on the RX 7900 XTX confirms the UINT storage-view fix for all three float16 formats; I updated the PR description with your exact-head result. I recorded the other test failures separately and am not attributing them to this change without their first failing assertions.

@LeandroLP23

LeandroLP23 commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

An AMD proprietary-driver run, with the red control. Radeon 860M (RDNA 3.5, 1002:1114), AMD Windows driver 32.0.13058.8001, Windows 11 26300, WinLibs GCC 15.2.0, Release, ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, full builds, three runs each.

Edit: an earlier version of this comment read the row-1 failure below as a Windows write-back difference. That was wrong; the test's expectation for the masked component is what fails.

As written, the test fails the same way on main and on this PR:

AGC graphics: image_store of 16_16_FLOAT: texel (0, 1) component 1 is 0, expected 23130

Row 1 stores with dmask 0x5. For a two-channel format, component 1 isn't in the mask, and ExpectedComponent expects it to keep the 0x5a5a fill. The hardware writes zero there instead. ACO's visit_image_store says so (Mesa 24.2, src/amd/compiler/aco_instruction_selection.cpp):

/* components not in dmask receive:
 * GFX6-11.5:  zero
 * GFX12+: first component in dmask
 */

ACO relies on this to drop constant-zero components from the store's dmask. main's ImageConvertedUnorm image_store dmask:0x5 case already expects zero for the missing component. StoreTexel also passes 0 for unselected components, so AnyPS5 matches GFX10. So ExpectedComponent should return 0 for a component outside dmask, not 0x5a5a. I can't reconcile that with the RADV pass reported above: ACO zeroes that component as well.

With that one line changed (return 0u; instead of return 0x5a5au;, locally, not pushed):

Tree agc_driver_image_store_float_rounding
main 27fabb6b7d + the test from 268bfc012f passes 3/3
main 27fabb6b7d + this PR at 268bfc012f (clean merge) passes 3/3

So on AMD's Windows driver the host's f32→f16 storage conversion already gives the round-toward-zero results for every edge value in the test, including 65520 → 0x7bff and the NaN payloads. The red control isn't red here, and the PR changes nothing on this driver. It is still needed wherever the host rounds to nearest. A red run on RADV or NVIDIA with the corrected expectation would show that.

@github-actions github-actions Bot added shader core/shader agc libSceAgc* labels Oct 21, 2026
@LeandroLP23

Copy link
Copy Markdown
Contributor

@MarcZX10 I corrected my earlier comment above. The row-1 failure isn't a Windows write-back difference: the test expects the component outside dmask to keep 0x5a5a, but GFX6–11.5 hardware writes zero there (ACO's visit_image_store), as ImageConvertedUnorm's dmask:0x5 case already expects. With that expectation changed to 0, the test passes 3/3 on AMD's Windows driver on main and with this PR, so this driver already rounds toward zero and the red control has to come from a host that rounds to nearest.

@MarcZX10

MarcZX10 commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor Author

Fixed in follow-up commit 3764883: the execution test now expects zero for components omitted by the dmask, matching the behavior documented for this hardware generation and the existing ImageConvertedUnorm case. The focused target builds successfully on my Linux host. I attempted the CTest run, but this machine lacks LZCNT, BMI1, BMI2, MOVBE, AVX2 and FMA, so the test aborts before Vulkan initialization; no local GPU result is claimed. Hosted conventions, eligibility, labels and report checks are pending for the new head.

@thuanquang

Copy link
Copy Markdown
Contributor

RDNA 2 measurement behind 3764883214 (zero for the components outside dmask).

Raw ISA on an RX 6700 XT (gfx1031) through the HIP runtime of AMD's Windows driver 32.0.21045.5002:

  • The image memory was filled with 0x5a.
  • One image_store ran per dmask, from 0x1 to 0xf, with data (0.25, 0.5, 0.75, 1.0) in v[4:7].
  • Each texel was read back through a UINT T# of the same memory.

With the swizzles this test uses (0xfac for one and four channels, 0x22c for two):

  • Components outside dmask read 0, never the 0x5a fill.
  • The enabled components take the data VGPRs in order.
  • Data for a component the format doesn't have is dropped.

This holds for 16_FLOAT, 16_16_FLOAT and 16_16_16_16_FLOAT, and also for 16_16_UNORM, 8_8_8_8_UNORM, 32_FLOAT, 32_32_FLOAT and 32_32_32_32_FLOAT. For example, 16_16_FLOAT with swizzle 0x22c, dmask 0x5 and data (0.25, 0.5) stores 0x00003400. Component 1 is 0, and the 0.5 meant for component 2 is dropped.

A side observation that doesn't affect this test: under 0xfac, a two-channel format writes component 1 from data component 3 (W) and ignores data component 1. 16_16_FLOAT with dmask 0x3 stores 0x00003400, and with dmask 0x9 and data (0.25, 0.5) it stores 0x38003400. StoreTexel takes component 1 from data component 1 for that swizzle.

@gdols

gdols commented Oct 21, 2026

Copy link
Copy Markdown

NVIDIA, Windows. GeForce RTX 3080, driver 616.92, Windows 11 Pro 26300, Ryzen 7 5800X3D, WinLibs GCC 15.2.0 r7, Release, main 80565c5 (+ #8310 to build), this PR at 3764883. ANYPS5_REQUIRE_VULKAN=1 and ANYPS5_NO_SHADER_CACHE=1; the focused runs also under VK_LAYER_KHRONOS_validation (SDK 1.4.363.0, inserted in each run per VK_LOADER_DEBUG=layer).

Build. This PR doesn't build on current main. #8975, merged after this PR's base 27c88a8, added resident->StorageView(0, false) to RunDepthCopyPass, and this PR gives StorageView a third parameter:

Draw.cpp:2979:108: error: no matching function for call to 'AgcDriver::Graphics::StorageTexture::StorageView(int, bool)'

The merge is textually clean, so GitHub shows no conflict. For the runs below I passed false there locally: DecodeDepthCopyPass requires VK_FORMAT_R32_SFLOAT, for which main already returns the native view.

Red control on NVIDIA. main + only ImageStoreFloatRounding.cpp from this PR: agc_driver_image_store_float_rounding passes 3 of 3, with no validation messages. As on AMD's Windows driver, the red control has to come from a host that rounds to nearest.

With this PR: the same test passes 3 of 3, with no validation messages.

Regression. agc_driver_sample_multisample_target fails 10 of 10 with this PR and passes 10 of 10 on main:

AGC graphics: sample 1 of pixel (0, 0) does not hold the stored color into one sample of each pixel of the drawn target

Under the layer it logs 8 VUID-vkCmdDispatch-format-07753 messages, none on main:

vkCmdDispatch(): the storage image descriptor [VkDescriptorSet 0x1ca00000001ca, Set 0, Binding 40, Index 0, variable "image_40"] requires UINT component type, but bound descriptor format is VK_FORMAT_R16G16B16A16_SFLOAT.

From the code: rawFloat16Storage in ResourceMaterializer makes every write-only 16-bit float storage image UINT, whatever its dimension, but a k2DMsaa storage texture gets its view from MultisampleTargetStorageView (ShaderResources.cpp:4716 on main), which this PR doesn't change and which returns the native SFLOAT view. That may also be the agc_driver_sample_multisample_target failure in the RADV run in the description.

^agc_: main 870 passed, 3 skipped, 3 failed (876 tests); this PR 870 passed, 3 skipped, 4 failed (877, with the new test). The three failing on both are agc_driver_sample_order*, fixed by #9056; the fourth is the one above.

AI-assisted: yes

@MaxLikesCode

Copy link
Copy Markdown
Contributor

Confirming @gdols's results on a second NVIDIA card, an RTX 4090 (Ada), at head 376488321 merged onto main cecb540a6, with the same one-argument change at Draw.cpp:2979 (resident->StorageView(0, false, false)) so that it builds:

  • agc_driver_image_store_float_rounding passes 6 of 6 (3 runs without, 3 with the validation layer), no VUID-. agc_driver_image_repacked_float, agc_driver_image_converted_unorm and texture_format_lookup pass 6 of 6 on main and with this PR, and agc_driver_depth_storage, _dispatch and _reuse (the feat(agc): run DB depth copies into a single-sample R32 float target #8975 depth-copy path) pass 3 of 3 under the layer with that false.
  • agc_driver_sample_multisample_target regresses here too: 6 of 6 on main, 0 of 6 with this PR (sample 1 of pixel (0, 0) does not hold the stored color into one sample of each pixel of the drawn target). Each validation run logs the same 8 VUID-vkCmdDispatch-format-07753 messages, requires UINT component type, but bound descriptor format is VK_FORMAT_R16G16B16A16_SFLOAT, and main logs none.

NVIDIA GeForce RTX 4090, driver 617.42, Windows 11 Pro 26200, WinLibs GCC 15.2.0 r7, Release, BUILD_TESTING=ON, ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, ctest --test-dir build -R <tests> -V. Validation runs add VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation (Vulkan-ValidationLayers vulkan-sdk-1.4.363.0, implicit layers disabled); the loader log shows the layer inserted in every Vulkan test process, and no log has was not found but was requested by env var VK_INSTANCE_LAYERS.

AI-assisted: yes (Claude Code)

@MarcZX10
MarcZX10 force-pushed the codex/f32-image-store-rtz-8282 branch from 3764883 to 7081834 Compare October 21, 2026 17:05
@MarcZX10

Copy link
Copy Markdown
Contributor Author

Thanks for the careful repro on both NVIDIA cards. I’ve pushed commit 7081834388 to address both findings: the existing two-argument StorageView call now defaults to the native view, and the multisample storage descriptor uses the UINT-compatible view with storage-only view usage when the binding is in the converted float16 range. The multisample image enables mutable and extended usage and checks UINT storage support at its sample count.

The updated head builds agc_driver_sample_multisample_target_tests on Linux. I attempted the focused CTest run with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and VK_LAYER_KHRONOS_validation, but this host exits before Vulkan initialization because it lacks BMI1, BMI2, LZCNT, MOVBE, AVX2 and FMA. Could you rerun agc_driver_sample_multisample_target and agc_driver_image_store_float_rounding on 7081834388 with validation enabled and share the pass counts and any VUIDs?

@thuanquang

Copy link
Copy Markdown
Contributor

AMD Windows rerun at 7081834388, as asked above, merged onto main b00235dda0 (clean merge). For comparison I also ran main alone and the earlier head 376488321, merged the same way with the one-argument Draw.cpp:2979 change it needs to build (StorageView(0, false, false)).

RX 6700 XT (gfx1031), AMD Windows driver 32.0.21045.5002, Windows 11 26200, MinGW GCC 15.2 Release, ANYPS5_REQUIRE_VULKAN=1.

  • Each set ran 3 times without and 3 times with VK_LAYER_KHRONOS_validation.
  • The layer is built from source, with implicit layers disabled and ANYPS5_NO_SHADER_CACHE=1.
  • VK_LOADER_DEBUG=layer shows the layer inserted in every Vulkan test process, with no "was not found" line.

Each cell gives the plain runs, then the validation runs:

main 376488321 7081834388
agc_driver_sample_multisample_target 3/3, 3/3 fails on the first run, 0/3 3/3, 3/3
agc_driver_image_store_float_rounding not on main 3/3, 3/3 3/3, 3/3
agc_driver_native_msaa_vertex_input, agc_driver_image_repacked_float, agc_driver_image_converted_unorm, texture_format_lookup, agc_driver_depth_storage, _dispatch, _reuse 3/3, 3/3 3/3, 3/3 3/3, 3/3
VUID- lines over the 3 validation runs 0 48 0

At 376488321 the multisample test fails here as on NVIDIA:

AGC graphics: sample 1 of pixel (0, 0) does not hold the stored color into one sample of each pixel of the drawn target

Each validation run logs 16 VUID-vkCmdDispatch-format-07753 (requires UINT component type, but bound descriptor format is VK_FORMAT_R16G16B16A16_SFLOAT). The plain runs stop at the first failure.

At 7081834388 both are gone. The test's store case passes: "stores to one sample of each pixel of a drawn 4x target and to samples of zeroed color memory no draw rendered to reach exactly those samples".

@jotitadev jotitadev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The red control you were missing, from a round-to-nearest host: Apple M2 Max (Metal via MoltenVK).

Machine: Apple M2 Max (vendor=0x106b device=0x1b020208, subgroup 32), macOS 27.2, x86_64 under Rosetta 2. MoltenVK 1.4.2 (Vulkan SDK 1.4.363.0). Release, BUILD_TESTING=ON.

Base/method: PR #8658 feat/macos-port @ 4ebe71f2e5 (current main 0c6a5bd593 + the macOS port), not main. This PR (708183438) applied on top, clean, on its own (not stacked with other image PRs).

With this PR: agc_driver_image_store_float_rounding passes 3/3 (--repeat until-fail:3), image store float rounding tests passed. Because the write-only 16-bit-float store now converts to f16 in the shader and writes through the UINT view, the rounding is done in SPIR-V and is independent of the host's native image-store rounding.

Red control (round-to-nearest host): with only this PR's production files reverted to base and the new test kept — so the store goes back through the native SFLOAT view and Metal rounds the texel — the test fails:

AGC graphics: image_store of 16_16_16_16_FLOAT: texel (3, 0) component 2 is 32256, expected 32265

i.e. Metal stored 0x7e00 where round-toward-zero wants 0x7e09. So on this GPU the native path does not round toward zero, which is the case the RADV and AMD/NVIDIA-Windows runs above could not exercise, and the test does catch the difference.

agc_driver_sample_multisample_target is skipped here (MoltenVK does not expose shaderStorageImageMultisample), so the multisample-view regression seen earlier on NVIDIA does not manifest on this host — it is not re-tested, not fixed, on Apple. agc_shader_memory passes.

GPUs tested: Apple M2 Max (MoltenVK 1.4.2).

Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.

@gdols

gdols commented Oct 22, 2026

Copy link
Copy Markdown

Rerun at 7081834388 on the RTX 3080, as asked. GeForce RTX 3080, driver 616.92, Windows 11 Pro 26300, WinLibs GCC 15.2.0 r7, Release, main d6eafa5, this PR applied on top (clean). ANYPS5_REQUIRE_VULKAN=1 and ANYPS5_NO_SHADER_CACHE=1. Every set ran 3 times without and 3 times with VK_LAYER_KHRONOS_validation (SDK 1.4.363.0); VK_LOADER_DEBUG=layer shows it inserted in every test that opens a device, and no log has was not found but was requested by env var VK_INSTANCE_LAYERS.

It builds as is now: the two-argument StorageView call in RunDepthCopyPass takes the new default.

main main + the test only this PR
agc_driver_sample_multisample_target 3/3, 3/3 3/3, 3/3
agc_driver_image_store_float_rounding 3/3, 3/3 3/3, 3/3
24 related tests: agc_driver_native_msaa_vertex_input, _image_repacked_float, _image_converted_unorm, texture_format_lookup, agc_driver_depth_storage, _dispatch, _reuse, and the other 17 agc_*multisample* tests 3/3, 3/3 each 3/3, 3/3 each
VUID- messages over the validation runs 0 0 0

So the multisample regression from 3764883214 (10 of 10 failures, and 8 VUID-vkCmdDispatch-format-07753 in its validation run) is gone here too, and the other agc_*multisample* tests pass, now that this head changes the creation flags of SINT and 16-bit float multisample targets.

^agc_: main 884 passed, 3 skipped, 3 failed (890 tests); this PR 884 passed, 3 skipped, 4 failed (891). The three on both are agc_driver_sample_order*, fixed by #9056. The fourth, agc_driver_pipelined_dispatch_item, fails before it submits anything, with "the two targets do not share their high address dword": its two VirtualAlloc blocks got different high address dwords. In isolation it fails 1 of 20 with this PR and 1 of 40 on main, with the same message, so it isn't this change.

AI-assisted: yes

@Dextroid17

Copy link
Copy Markdown
Contributor

Linux, lavapipe as in CI's Linux job: Mesa 26.2.4 llvmpipe (LLVM 23.1.1, 256 bits) here, GALLIUM_OVERRIDE_CPU_CAPS=avx as in CI, i9-11900K, CachyOS, GCC 16.2.1, CMake 4.4.3, Ninja, Release, ANYPS5_ENABLE_SPIRV_TOOLS=ON. main 7e2ba73, this PR at 7081834 applied on top (merge a6c0904f4, clean). ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, -j1 --timeout 60; the validation runs under VK_LAYER_KHRONOS_validation 1.4.363, inserted in 25 of the 26 tests per VK_LOADER_DEBUG=layer (texture_format_lookup creates no instance). The 26 tests of @gdols's table above.

Head. 25 of 26 pass in each of 3 plain and 6 validation runs. agc_driver_image_store_float_rounding and agc_driver_sample_multisample_target pass 9 of 9, as do native_msaa_vertex_input, image_repacked_float, image_converted_unorm and the three depth_storage tests.

Red control, on a host where it fires. main sources (the 7 driver/recompiler files at 7e2ba73) + only ImageStoreFloatRounding.cpp from this PR: agc_driver_image_store_float_rounding fails 8 of 8 (3 plain, 3 validation, 2 validation with -V), always at the same texel:

AGC graphics: image_store of 16_16_16_16_FLOAT: texel (3, 0) component 3 is 32265, expected 31753

That slot is EdgeBits[15] = 0x7f812345, a signalling NaN. lavapipe's f32→f16 store (lp_build_float_to_half, F16C vcvtps2ph in truncate mode on this CPU) quiets it to 0x7e09; HalfTowardZero keeps the payload, 0x7c09. Check walks texels in order, so the 15 edge values before it pass on main without the UINT view, among them the 1 + 3·2⁻¹¹ tie (0x3f803000 → 0x3c01), 65520 (0x477ff000 → 0x7bff) and the quiet NaN (0x7fc12345). So lavapipe is red, but not as a host that rounds to nearest, which is what the AMD and NVIDIA red controls above were waiting for: it truncates like HalfTowardZero and differs only on the NaN quiet bit, and since the test stops at that first mismatch, the eight edge values after it (the subnormals among them) are not exercised on main here. The Linux job runs on pushes to main and is skipped on pull_request events, so it has not run on this head; after merge it would fail on a regression of this path, via the NaN slot alone.

Validation. Head and red control alike: one message per run, VUID-VkImageCreateInfo-samples-02258 from agc_driver_depth_storage creating a 2-sample D32_SFLOAT image that lavapipe does not support (sampleCounts 1|4|8). It is the test's own probe (DepthStorage.cpp:358-362, "unsupported two-sample source refused cleanly"), present on the main arm too, and not from this PR's views. No other VUID- lines in the 2,597-line -V logs.

Not this PR. agc_driver_multisample_retirement fails on both arms ("MSAA storage promotion did not retain its source image"), as it did on both arms of my #7747 matrix on main a6dcea9 on this host; it passes in CI's Linux job on main cc00785 (run 39758811123), so it is a difference between this host's lavapipe and CI's, not a regression here; I have not isolated which.

AI-assisted: yes

@EdouardSence

Copy link
Copy Markdown
Contributor

RADV rerun at 7081834388, since the earlier RADV failure was clairtonmichel's RDNA3 run on the previous head.

RX 9070 XT (RDNA4, gfx1201), Mesa 26.2.4 RADV, Linux 7.3.0 (CachyOS), GCC, Release. This PR merged onto main 4777cac (clean). ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, ctest -j1 --timeout 60, 3 runs. The validation layer isn't installed on this machine, so these are plain runs only.

Test this PR
agc_driver_image_store_float_rounding (16_FLOAT, 16_16_FLOAT, 16_16_16_16_FLOAT) 3/3
agc_driver_sample_multisample_target 3/3
agc_driver_native_msaa_vertex_input, _image_repacked_float, _image_converted_unorm, _depth_storage, _depth_storage_dispatch, _depth_storage_reuse 3/3 each
agc_driver_image_array_window_past_layer_limit 0/3, and 0/3 on main 4777cac alone

So the 16-bit float store regression on RADV is gone on this head. image_array_window_past_layer_limit fails the same way with and without this PR (thread 7 component 0 is 107.000000/255, expected 147/255), so it's the existing failure flagged on #6772, not this PR's.

Tested and written by Claude (AI assistant) on a contributor's machine.
AI-assisted: yes

@ryanc2112

Copy link
Copy Markdown

RADV / Polaris run at 708183438 (SteamOS 3.8.28, AMD Radeon RX 570 / Polaris10, Mesa 26.2.5, GCC 16.2.1, Release), merged onto main 4777caca3 (clean, builds without changes) vs main, with ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation (loader confirms the layer is inserted).

AI-assisted: yes.

@adriadam10 adriadam10 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change looks right and the hardware data in #8282 and the host runs above support it, but the branch now conflicts with main after #6218 (packed storage images merged). Please rebase and resolve these three places, then rerun the focused tests:

  • Graphics/src/Texture.cpp (StorageTexture::StorageView): main now picks PackedStorageViewFormat(storageFormat) first and falls back to UintFormatOfSint. Keep the packed route unchanged and apply uintStorage only to the non-packed fallback, so the packed formats keep their view when the binding is outside the converted-float16 range.
  • Optimization/src/ResourceMaterializer.cpp (inspectImageDescriptor): main computes SampledTextureNumericClass(remappedFormat). rawFloat16Storage has to test the same remapped format that main now uses, not the raw format, otherwise a remapped descriptor takes a different path than the one the test covers.
  • Graphics/src/MultisampleTarget.cpp (the storage-support check next to the new twinFormat block): keep both the uintStorageSupported() condition and the twinFormat selection.

After the rebase, please post agc_driver_image_store_float_rounding and agc_driver_sample_multisample_target on the rebased head, plus the existing packed-storage tests from #6218, to show the two view routes still work together.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* needs rebase Conflicts with main, rebase needed shader core/shader

Projects

None yet

Development

Successfully merging this pull request may close these issues.