Skip to content

fix(agc): bind UINT views for float16 stores outside compute shaders - #15741

Merged
oneandonlydean merged 3 commits into
boykopovar:mainfrom
zorde23:fix/agc-fragment-uint-storage-views
Nov 4, 2026
Merged

oneandonlydean merged 3 commits into
boykopovar:mainfrom
zorde23:fix/agc-fragment-uint-storage-views

Conversation

@zorde23

@zorde23 zorde23 commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

What

027c6f0 and 4a25a65 bind a UINT storage view for write-only float16 images, which the recompiler declares as uint. The driver picks that view only when the binding number is in FirstStorageImageBinding + 7 .. + 13 (36..42). Binding numbers are stage * Binding::Count + slot (RuntimeAbi::BindingNumber), so this matches only the main stage. In a pixel, hull or domain shader the same slots are 101..107, 166..172 and 231..237: the shader writes uint texels through a float16 view (undefined behaviour), and on AMD's Windows driver the store writes nothing.

RuntimeAbi::UintStorageImageBinding takes the slot from the binding number within its stage. The three call sites in ShaderResources.cpp (storage images, the compact binding path and multisample storage views) use it. The image table bindings (260, 261) are never uint storage slots. The function only picks the host view, so it is listed in shaderCacheReviewedNames without a cache key change.

Overlap: #7642, #9508, #10193, #13928 and #13929 make the same correction at the same three call sites (a UintStorageBinding helper taking the binding modulo Binding::Count) inside larger image table and descriptor heap work; none is merged and none adds a test for this case. This PR is the fix alone with a GPU test that fails on main, so it can go first and those would use RuntimeAbi::UintStorageImageBinding instead of their own helper. #10743 and #13796 change the same lines without this fix and will need a small rebase.

Tested

  • New agc_driver_pixel_float16_store: a full-screen draw stores each pixel's position and two constants to 16_FLOAT, 16_16_FLOAT and 16_16_16_16_FLOAT images from the pixel shader (wave64 and wave32) and checks every texel. On main it fails (texel (0, 0) component 0 is 0, expected 14336) and the validation layer reports VUID-vkCmdDraw-format-07753 (uint image type through a float16 view); with this change it passes with no VUID- errors.
  • agc_shader_device_profile now checks every stage × binding against the stage-local uint storage slots, plus the two image table bindings.
  • Focused AGC tests (81, run before the new test was added: agc_shader_device_profile, image_store_*, uint*, multisample*, *storage*) on main (5b1d381) and on this branch, same machine, ctest -V -j 1 with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ANYPS5_NO_SHADER_CACHE=1, ANYPS5_REQUIRE_VULKAN=1: 81/81 pass on both. Neither log reports was not found but was requested by env var VK_INSTANCE_LAYERS. 0 VUID- errors on both; the only validation output is the same WARNING-VkImageSubresourceRange-layerCount-compatibility on both (tests 1311, 1565, 2022).
  • A retail title's depth-of-field pass writes a 960x540 R16G16_SFLOAT image from a pixel shader. Before the fix the image stays all zero and dark tiles appear on screen edges; with an equivalent fix in a local build, a captured frame replayed through agc_frame_replay writes 518400/518400 texels, and the artefact is gone in live play. RX 6750 XT, Windows 11.
  • python3 tools/check_conventions.py passes.

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 6750 XT, Adrenalin 26.10.2 (driver 32.0.21045.20006), Windows 11 Pro 25H2 (26200.9711)
  • AI-assisted: yes

Test image of agc_driver_pixel_float16_store (16_16_16_16_FLOAT, wave64; R = x/64, G = y/32, B = 1.0; 8x), dumped by a local uncommitted change to the test.

Main: store lost, all black.

main-pixel-float16

This PR: every texel written.

pr-pixel-float16

zorde23 and others added 3 commits November 4, 2026 08:22
The UINT storage view for float16 image stores was chosen only when the
global binding number fell in the uint storage image slots of the main
stage. Binding numbers are stage * Binding::Count + slot, so a pixel,
hull or domain shader's slots never matched: its uint writes went to a
float16 view and the store was lost on AMD's Windows driver. The slot is
now taken from the binding number within its stage.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VAPyfZR5GPZaWxRz67e9FT
…r the shader cache key

It only picks the host view for a binding number and does not change
what a recompile produces.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VAPyfZR5GPZaWxRz67e9FT
A full-screen draw stores each pixel's position and two constants to a
16_FLOAT, 16_16_FLOAT and 16_16_16_16_FLOAT image from the pixel shader,
in wave64 and wave32, and checks every texel.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VAPyfZR5GPZaWxRz67e9FT
@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head b70a3fc merged onto main 5b1d381 · tested 2026-11-04 11:22 UTC · 12 min

GPU NVIDIA RTX 2000 Ada Generation, driver 595.99.02, Vulkan 1.4.329
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-38-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 2,793 passed · 3 failed (0 new, 3 also fail on main) · 49 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 2,845 of 3,883 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (982 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 106.8 s
Failing on main too (3, not counted against this PR)
agc_driver_image_table
guest_mmap_executable
guest_socket_options_multicast
Validated but not compared (1, not in the main baseline's validation pass)
agc_driver_pixel_float16_store
Validation IDs already present on main (13 IDs in 545 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (545 tests): agc_driver, agc_driver_address_passes, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, agc_driver_bda_anchor_reads, agc_driver_bda_span_reads, and 537 more
VUID-VkShaderModuleCreateInfo-pCode-08737 (8 tests): agc_driver_dpp16_operands, agc_driver_dpp8_pk_fmac, agc_driver_dx10_clamp, agc_driver_float16_fma_rounding, agc_driver_float16_unused_nan_payloads, agc_driver_packed_alu, agc_driver_packed_f16_denormal_modes, agc_driver_packed_float16_native
VUID-VkShaderModuleCreateInfo-pCode-08739 (8 tests): agc_driver_dpp16_operands, agc_driver_dpp8_pk_fmac, agc_driver_dx10_clamp, agc_driver_float16_fma_rounding, agc_driver_float16_unused_nan_payloads, agc_driver_packed_alu, agc_driver_packed_f16_denormal_modes, agc_driver_packed_float16_native
VUID-VkShaderModuleCreateInfo-pCode-08741 (8 tests): agc_driver_dpp16_operands, agc_driver_dpp8_pk_fmac, agc_driver_dx10_clamp, agc_driver_float16_fma_rounding, agc_driver_float16_unused_nan_payloads, agc_driver_packed_alu, agc_driver_packed_f16_denormal_modes, agc_driver_packed_float16_native
VUID-vkCmdCopyImage-srcImage-01548 (7 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-vkCmdCopyImage-srcImage-01551 (7 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (1 test): agc_driver_srgb8_color_target
VUID-VkPipelineShaderStageCreateInfo-module-parameter (1 test): agc_driver_float16_unused_nan_payloads
VUID-VkPipelineShaderStageCreateInfo-pSpecializationInfo-06849 (1 test): agc_driver_float16_unused_nan_payloads
VUID-VkSamplerCreateInfo-addressModeU-01079 (1 test): agc_driver_image_gather_volume
VUID-VkSamplerCreateInfo-addressModeU-parameter (1 test): agc_driver_image_gather_volume
VUID-VkSamplerCreateInfo-addressModeV-parameter (1 test): agc_driver_image_gather_volume
VUID-VkSamplerCreateInfo-addressModeW-parameter (1 test): agc_driver_image_gather_volume
Skipped (49)
agc_driver_bda_reads_shadowed_results: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_bda_reads_shadowed_results_per_build: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_gcn_display_present: skipped, no display: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
agc_driver_sample_order_grid_reference: skipped, the device does not keep depth drawn at custom sample locations at those locations, even after a transition that names them: the composite of uniform renders holds the guest's depth in 0 of 3005 sloped samples, so no path can be compared with it bit for bit
agc_driver_scattered_runs: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_sparse_dma_buf_import: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_stencil_ref_export: skipped, the device lacks VK_EXT_shader_stencil_export
agc_driver_vertex_elected_atomic_max: skipped, the device runs vertex programs in subgroups, so they keep their cross-lane reductions
agc_host_import_sparse: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_import_settle_initial_dcc: skipped, the device has no deferred settle of host imports: imports under 1 MiB wait for one only on Windows
agc_unit_shadow_completion_store: skipped, the device reports watched host memory written when it imports or reads it
guest_http_uri_locale: 
guest_video_out_color_space: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_hdr: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_high_frame_rate: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_output_mode: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_resolution_status: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_wqhd_detection: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
video_out_flip_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_backtoback: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_controls: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip_in_order: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_dcc: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_deferred: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop_aftergpu: skipped, no display or Vulka
Reproduce
git fetch origin b70a3fc6fc04da5c3bbffcc59e353dec804bab20 5b1d381d5ad5d9f923326b18479c3bd889cdd588
git checkout 5b1d381d5ad5d9f923326b18479c3bd889cdd588 && git merge --no-ff b70a3fc6fc04da5c3bbffcc59e353dec804bab20
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 32 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 4 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ AMD GPU test: passed

PR head b70a3fc merged onto main 5b1d381 · tested 2026-11-04 11:46 UTC · 40 min

GPU AMD Radeon RX 6300 (RADV NAVI24), driver Mesa 25.2.8-0ubuntu0.24.04.4, Vulkan 1.4.318
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-42-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 2,776 passed · 9 failed (0 new, 8 also fail on main, 1 unstable on main) · 60 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 2,845 of 3,883 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (984 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.2 s, ⚠️ public_headers 79.0 s, ⚠️ agc_driver_image_sample_unnormalized 45.2 s, ⚠️ agc_driver_lazy_resolved_abi 40.9 s, ⚠️ agc_driver_sample_multisample_target 34.9 s
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_pipeline_journal: failed in 8 of the last 10 main runs
Failing on main too (8, not counted against this PR)
agc_driver_image_table
agc_driver_native_depth_bda_clear
agc_driver_native_multisample_depth
agc_driver_submit_progress
agc_submit_progress
agc_submit_progress_no_timeline
guest_mmap_executable
guest_socket_options_multicast
Validated but not compared (3, not in the main baseline's validation pass)
agc_driver_pixel_float16_store
guest_job_manager_worker_spin_scale_0.1
guest_job_manager_worker_spin_scale_10
Validation IDs already present on main (8 IDs in 545 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (545 tests): agc_driver, agc_driver_address_passes, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, agc_driver_bda_anchor_reads, agc_driver_bda_span_reads, and 537 more
VUID-vkCmdCopyImage-srcImage-01548 (4 tests): agc_driver_depth_clear_hle, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-vkCmdCopyImage-srcImage-01551 (4 tests): agc_driver_depth_clear_hle, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (1 test): agc_driver_srgb8_color_target
VUID-VkSamplerCreateInfo-addressModeU-01079 (1 test): agc_driver_image_gather_volume
VUID-VkSamplerCreateInfo-addressModeU-parameter (1 test): agc_driver_image_gather_volume
VUID-VkSamplerCreateInfo-addressModeV-parameter (1 test): agc_driver_image_gather_volume
VUID-VkSamplerCreateInfo-addressModeW-parameter (1 test): agc_driver_image_gather_volume
Skipped (60)
agc_driver_bda_reads_shadowed_results: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_bda_reads_shadowed_results_per_build: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_copied_writer_label_order: skipped, the device reports a minStorageBufferOffsetAlignment of 4, so the dispatch binds its record at +0x1004 in place and nothing is written back; the test needs an alignment above 4
agc_driver_float16_unused_nan_payloads: skipped, the device has no native f16 conversions with RTE rounding and kept f16 denormals
agc_driver_gcn_display_present: skipped, no display: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
agc_driver_image_table_vouched_lookups: skipped, the device reports 4 of 4 host-imported pages written after a GPU read, so a watched imported table cannot be vouched for
agc_driver_linear_target_direct_write_completion: skipped, the device does not keep host imports write-watched, so no completion stamp over the target is tracked
agc_driver_ngg_vertex_wave_reduction: skipped, s3 describes a 32-lane wave only on 32-lane subgroups, and the device has 64 lanes
agc_driver_scattered_runs: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_sparse_dma_buf_import: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_unit_shadow: skipped, the device does not import watched host memory for unit shadows
agc_driver_unit_shadow_budget: skipped, the device does not import watched host memory for unit shadows
agc_driver_vertex_elected_atomic_max: skipped, the device runs vertex programs in subgroups, so they keep their cross-lane reductions
agc_host_import_sparse: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_idle_publish_wait: skipped, the device reports 4 of 4 host-imported pages written after a GPU read, so a forced watch of the import reads its submissions as CPU stores
agc_import_settle_initial_dcc: skipped, the device has no deferred settle of host imports: imports under 1 MiB wait for one only on Windows
agc_shadowed_key_stores: skipped, the device imports no watched host memory under a unit shadow
agc_small_tiled_shadow_label: skipped, host imports are unavailable: the test block is not imported and watched
agc_storage_clear_hand_over: skipped, the device imports no watched host memory for the clear-key hand-over
agc_storage_pending_key_refresh: skipped, refreshes over a pending key store are not testable here
agc_unit_shadow: skipped, the device does not import watched host memory for unit shadows
agc_unit_shadow_completion_store: skipped, the device reports watched host memory written when it imports or reads it
guest_http_uri_locale: 
guest_video_out_color_space: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_hdr: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_high_frame_rate: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_output_mode: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_resolution_status: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_wqhd_detection: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
video_out_flip_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_backtoback: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not co
Reproduce
git fetch origin b70a3fc6fc04da5c3bbffcc59e353dec804bab20 5b1d381d5ad5d9f923326b18479c3bd889cdd588
git checkout 5b1d381d5ad5d9f923326b18479c3bd889cdd588 && git merge --no-ff b70a3fc6fc04da5c3bbffcc59e353dec804bab20
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 12 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 16 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's AMD machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@adam25136

Copy link
Copy Markdown

Windows and NVIDIA Blackwell run, for head b70a3fc6fc merged into main b11c7bf84f (git merge --no-ff, clean merge).

GPU NVIDIA GeForce RTX 5080 (10de:2c02), driver 617.42 (32.0.16.1742), Vulkan 1.4.351
Host Windows 10 Pro 22H2 (19045), i9-12900KF, WinLibs GCC 15.2.0 r7, Release, BUILD_TESTING=ON
Selection 2,244 of 4,006 tests, chosen by tools/select_tests.py select for the 5 changed files
Run select_tests.py ctest build --parallel 4 --timeout 120 with ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1; main b11c7bf84f ran its full suite (4,005 tests) the same way on this machine
Result 2,231 passed, 12 skipped, 1 failed, 0 new
Validation The 1,294 agc_* tests of the selection again with VK_LAYER_KHRONOS_validation 1.4.367 (the Khronos nightly built from 3baa2b8), ctest -V --parallel 4, implicit layers disabled; main ran its 1,352 the same way. This change logs the same 155 messages in the same 24 tests as main, and no ID that main doesn't have for the same test

The failure, agc_driver_direct_write_completion, fails on main b11c7bf84f here too, with and without the layer. It is #15564, which #15610 fixes on this machine. The 12 skips also skip on main here. The only selected test over 30 s was agc_driver_pipeline_journal, 30.8 s against 27.9 s on main.

The new agc_driver_pixel_float16_store passed, with no validation message (the description reports VUID-vkCmdDraw-format-07753 for it on main), and agc_shader_device_profile passed.

The retail title's depth-of-field pass was not run.

AI-assisted: yes. Claude Code ran the builds and tests and drafted this comment; the numbers are from the runs on this machine.

@dantdmdarealguy

Copy link
Copy Markdown
Contributor

Cross-test on a title: Demon's Souls PPSA01341 v01.007.000, Windows 11 Pro, RTX 5080 (driver 32.0.16.1742), WinLibs GCC 15.2.0 Release, main 5b1d381d5a and this PR's head b70a3fc6fc (a fast-forward on that main), same relinked executable, only the libraries swapped.

On main, character creation renders every class's live head and skin black, while the Appearance preset thumbnails look right. With VK_LAYER_KHRONOS_validation the layer reports:

vkCmdDraw(): the storage image descriptor [VkDescriptorSet ..., Set 1, Binding 103, Index 0, variable "image_38"] requires UINT component type, but bound descriptor format is VK_FORMAT_R16G16B16A16_SFLOAT.

Binding 103 is a pixel-stage uint storage slot, which is this PR's case. With this PR the VUID-vkCmdDraw-format-07753 and VUID-vkCmdDrawIndexed-format-07753 errors are gone, and the Barbarian's face and skin render correctly. The remaining errors in that run are mipLevels-00958 (#6280) and pAttachments-00605 (#6782).

main this PR
(game-window shot PPSA01341-20261104-080330.png) (game-window shot PPSA01341-20261104-091147.png)

@Superseabas Superseabas left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Head b70a3fc6fc merged onto current main b11c7bf84f (clean merge, local only): code read, red/green check and a run on two Windows GPUs, NVIDIA and AMD's Windows driver.

Windows 11 Home 10.0.26200, WinLibs GCC 16.2.0 (x86_64-ucrt-posix-seh, r3), Release, BUILD_TESTING=ON. ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ctest -R '^(agc_driver_graphics|agc_driver_.*uint.*|agc_driver_pixel_.*|agc_driver_.*float16.*|agc_driver_.*storage_image.*|agc_driver_.*export.*)$', ANYPS5_GPU selecting the device (confirmed by Selected GPU):

GPU Driver main (44 tests) merged (45, with agc_driver_pixel_float16_store)
NVIDIA GeForce RTX 5070 Ti (10de:2c05) 621.01 43 + 1 skip 44 + 1 skip
AMD Radeon Graphics, Ryzen 7 7700X iGPU (1002:164e) AMD 26.10.2 43 + 1 skip 44 + 1 skip
  • The skips are the same on both sides. The only VUID- in either tree is VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (#11990), which is on main too. No new ID appears, and there is no missing-layer line. The new test prints pixel float16 store tests passed on both GPUs.
  • Red check: the merged tree with only this PR's ShaderResources.cpp change reversed fails agc_driver_pixel_float16_store on both GPUs with pixel shader wave64 image_store of 16_FLOAT: texel (0, 0) component 0 is 0, expected 14336. The store writes nothing on NVIDIA's Windows driver too, not only on AMD's.
  • check_conventions.py --base main passes on the merge.

Read through the change:

  • UintStorageImageBinding takes the binding modulo Binding::Count (65) and checks for slots 36..42 (FirstStorageImageBinding + 7 .. + 13) within that stage. It returns false at or above StageCount * 65 = 260, so the image table bindings 260 and 261 stay out, and ShaderDeviceProfile checks exactly that.
  • For the main stage (bindings below 65) the result is the same as the old range check.
  • The three call sites, storage image table entries, compact storage bindings and multisample storage views, now use it.
  • Only the host view changes, which fits the shader-cache review listing.

I found nothing to change.

AI-assisted: yes (Claude Code)

@oneandonlydean oneandonlydean self-assigned this Nov 4, 2026
@oneandonlydean
oneandonlydean merged commit 288f44f into boykopovar:main Nov 4, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* build shader core/shader

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants