Skip to content

fix(libSceAgcDriver): export FP16_ABGR into UINT color targets - #14243

Merged
oneandonlydean merged 2 commits into
boykopovar:mainfrom
Tamalero:fix/agc-fp16-abgr-uint-target
Nov 3, 2026
Merged

oneandonlydean merged 2 commits into
boykopovar:mainfrom
Tamalero:fix/agc-fp16-abgr-uint-target

Conversation

@Tamalero

@Tamalero Tamalero commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

What

main throws color export format 4 into an unsigned integer target is unsupported when a draw exports FP16_ABGR into a UINT color target. This PR gives that pair a defined path, matching what RDNA2 hardware stores (measured in #11513):

  • Behaviour. Each half is widened to the 32-bit float it represents; a NaN gets its quiet bit set (0x7c01 → 0x7fc02000), as on the hardware. Those 32 bits go to the attachment as an unsigned integer, clamped to the channel. A 32-bit channel holds the float's bits. An 8- or 16-bit channel holds 0 for +0.0 and its maximum for every other half, -0.0 included.

  • Widening. For the UINT packings, WidenedHalfWord widens the exported half bits with integer operations, so the result does not depend on how the driver implements UnpackHalf2x16 (which may flush subnormals and need not keep NaN bits). It is selected by the packing specialization constant; float targets keep the UnpackHalf2x16 path unchanged.

  • Output type. The fragment output reaches the attachment as uint4 through the existing unsigned packing: SpecializeFragmentOutputs retypes the float4 output and bitcasts each store, as for the raw 32-bit exports. This answers request 1 of fix(libSceAgcDriver): accept FP16_ABGR exports into unsigned integer targets #12795. 32-bit channels keep Uint.

  • Clamp. Two new packings, UintClamp8 and UintClamp16, cover 8- and 16-bit channels (HalfExportPacking in State.cpp). For FP16_ABGR exports only, SelectExportPacking takes the UMin of each word and a limit chosen by the packing specialization constant (0xff, 0xffff, otherwise 0xffffffff).

  • Identity. The packing is carried in targetExportPacking. That value is already in:

    • the prepared module key and specialization constants (Recompiler.cpp);
    • the draw lookup and draw register key;
    • the serialized request.

    The emitter change also moves the shader cache version, which is hashed from the recompiler sources. The draw test checks that Uint, UintClamp8/UintClamp16 and no packing each give their own pipeline variant.

  • Debt entry. Sentences added for FP16_ABGR (measured behaviour, how the shader implements it, the untested uncompressed case) and FP16_ABGR taken out of the list of exports that throw. The existing sentences about the 32-bit path are unchanged.

UNORM16_ABGR, SNORM16_ABGR and SINT16_ABGR into UINT targets still throw. SINT targets are not touched.

Tested

Head f0170da8b5, based on main 3ee28266a3.

  • Paired validation run (CONTRIBUTING), RTX 4090, NVIDIA 615.78.08, Linux 7.3 (CachyOS): ctest -V -R '^(agc_driver_uint_color_target|agc_driver_graphics)$' with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ANYPS5_NO_SHADER_CACHE=1 and ANYPS5_REQUIRE_VULKAN=1, on main 3ee28266a3 and on this branch. Both pass, neither log reports was not found but was requested by env var VK_INSTANCE_LAYERS, and both report the same single VUID, VUID-vkCreateDevice-ppEnabledExtensionNames-01387 at device creation (VK_KHR_present_mode_fifo_latest_ready without VK_KHR_swapchain), so the change adds none. The logs are in the comment below.

  • agc_driver_uint_color_target_tests:

    • FP16_ABGR draws into R32_UINT, R32G32B32A32_UINT, R16_UINT, R16G16B16A16_UINT, R8_UINT and R8G8B8A8_UINT, tiled and linear, and through UintClamp8 and UintClamp16 into R32_UINT. A 32-bit channel cannot saturate, so those draws show the shader's clamp itself, whatever the driver does with out-of-range integers.
    • The halves come from user data at run time: one pixel program moves s0/s1 into the exported registers, and the test requires every input of a target to use the same pipeline variant, so the values are not folded into the shader.
    • Thirteen halves rotate through the channels: ±0, ±1, 0.5, the smallest and largest subnormals, a negative subnormal, 65504, ±inf and two NaNs (0x7c01, 0xfe00). Every channel is read back and compared with the measured result.
    • The existing raw 32-bit cases are unchanged.
  • Negative controls (each one a local edit of SpirvModuleEmitter.cpp, built and run on its own):

    Variant RTX 4090, NVIDIA 615.78.08 Radeon PRO V620, RADV Mesa 25.2.8 llvmpipe, Mesa 25.2.8 (LLVM 20.1.2)
    this branch passes passes passes
    clamp removed fails: 0x80000000 stored, 0xff expected fails, same fails, same
    8-bit limit changed to 0x1ff fails: 0x1ff stored fails, same fails, same
    UnpackHalf2x16 instead of the integer widening fails: NaN 0x7c01 stored as 0x7fffffff fails: stored as 0x7f802000 passes (llvmpipe already quiets the NaN)

    The V620 and llvmpipe runs are on Ubuntu 24.04 without a validation layer.

  • agc_driver_graphics_tests:

    • uintTargetTests now decodes FP16_ABGR into R32_UINT, R8_UINT, R8G8B8A8_UINT, R16_UINT and R16G16B16A16_UINT to Uint, UintClamp8 and UintClamp16 with blending dropped. This replaces the check that pinned the refusal.
    • The invalid-packing check now uses 7, because 5 is now UintClamp8.
  • Marvel's Guardians of the Galaxy (PPSA01748), RTX 4090 (first commit; the second changes only the widening and the tests):

    • Control (that commit with only the State.cpp refusal restored): aborts after 72 s, at frame 672 of the loading screen, with color export format 4 into an unsigned integer target is unsupported (exit 134).
    • This PR: gets past that point with no error and reaches the main menu about 6 minutes in. A played run went on through the farm prologue to the Milano (see the comment below).
  • tools/check_conventions.py: 0 errors. One debt-length warning on the UINT entry, which was already over the limit on main (1,391 characters, now 2,119).

Checklist

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

🤖 Generated with Claude Code

@oneandonlydean

Copy link
Copy Markdown
Collaborator

@Tamalero At 91eb8504f6e6f0ab0cc743b19ed815ebd3b976a8, the newly accepted UINT path still gets its bits from the direct UnpackHalf2x16 in ExportVector (SpirvModuleEmitter.cpp:676–688). That instruction is allowed to flush half subnormals to zero. For example, the posted RDNA2 result for 0x0001 is 0x33800000 in a 32-bit channel and the maximum in an 8- or 16-bit channel; an allowed flush produces zero instead. The separate EmitF16BitsToF32 helper's preservation/decoding logic is not used by this export path. See the extended-instruction specification.

Could you make the integer export widening preserve the measured bits independently of that host choice? Please also address the measured NaN quiet/payload behavior for 32-bit UINT outputs, or retain that unresolved difference explicitly in debt rather than describing the whole pair as defined.

The new draws use literal half values, so conversion can be constant-folded, and the description says they also pass with the clamp removed. Please add coverage using runtime half inputs and a regression that rejects removing or changing the shader clamp, independently of the driver's attachment saturation. The hardware results and the three driver runs are useful evidence; this asks for the remaining portable conversion and clamp contract.

@MarcZX10 MarcZX10 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.

Reviewed — changes requested

The format mapping and shader clamp path look consistent on source inspection, but the required paired validation-layer evidence for AGC and shader changes is missing.

What I ran

Reviewed head 91eb8504f6e6f0ab0cc743b19ed815ebd3b976a8 against PR base 6135e61f4538611fc82aeb69dbf73f36221b1aec; the merge preview against current main 8728104b26178cd05433390b79d3e71fde7a2b1c was clean. Environment: Linux x86_64, Python 3.11.2, GCC 12.2.0, Git 2.39.5. I did not build or run CTest locally.

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 14243
python3 tools/pr_stack_check.py 14243 --repo boykopovar/AnyPS5
python3 tools/pr_test_quality.py --root /marc/AnyPS5 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp core/libs/prx/libSceAgcDriver/tests/Graphics.cpp core/libs/prx/libSceAgcDriver/tests/execution/UintColorTarget.cpp core/shader/recompiler/ControlFlow/src/RequestSerializer.cpp core/shader/recompiler/FragmentOutputSpecialization.hpp core/shader/recompiler/Recompiler.hpp core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp docs/dev/debt/libSceAgcDriver.md
gh run view 41269714892 --repo boykopovar/AnyPS5 --job 124740237313 --log-failed
gh pr view 14243 --repo boykopovar/AnyPS5 --json headRefOid,updatedAt,statusCheckRollup

Results

Check Result
Diff check, conventions and PR template Passed in precheck.
Source review FP16_ABGR gets Uint, UintClamp8, or UintClamp16 by target width; the emitter clamps widened half bits with UMin for narrow UINT channels. I found no source-level mismatch in the inspected paths.
Test registration heuristic It flagged the C++ test files, but the graphics test is explicitly included and execution tests are collected from tests/execution/*.cpp by the AGC CMake configuration. These are heuristic false positives.
Merge preview Clean against current main 8728104b26178cd05433390b79d3e71fde7a2b1c.
Hosted CI Eligibility, conventions, portability, intake, labels, report, Linux relinker, macOS relinker, macOS x86_64 relinker, ASAN relinker, and the Windows product job passed. Linux product and specialized jobs were skipped. The Windows relinker job failed: annotate_module timed out; 549/550 CTests passed. The timeout is in an unrelated test, and its cause is not established here.
Author-reported GPU tests The description reports the new execution test passing on RTX 4090, Radeon PRO V620 and llvmpipe. Only the RTX run reports a validation layer; no matched main run or paired VUID comparison is provided.
Local build and GPU tests Not run.
Raw output excerpts

Precheck conventions output:

All conventions checks passed.

Windows relinker CTest output:

99% tests passed, 1 tests failed out of 550
The following tests FAILED:
	 33 - annotate_module (Timeout)

Negative control

Assertion Change under test Result
Narrow UINT output remains clamped when the shader emits widened half bits The author reports disabling the shader clamp The execution test still passes on all three reported drivers, so this control does not detect removal of the new clamp. I did not run this control.

Findings

Blocking

CONTRIBUTING.md requires the same focused tests on main and the change with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ANYPS5_NO_SHADER_CACHE=1, and ANYPS5_REQUIRE_VULKAN=1, with both logs checked for the requested-layer marker and compared for new VUIDs. This PR changes AGC state decoding and shader emission, but its report supplies only change-side results and no paired main log or VUID comparison. Please attach the matched logs and comparison for the focused UINT color-target test before approval.

Non-blocking

The PR says the execution test also passes when the newly added clamp is disabled on each tested driver. That means its pixel readback assertions do not pin the clamp itself. A focused SPIR-V/emitter assertion or another safe control that fails when the UMin path is removed would make this central behavior regression-testable.

Sources

Not verified

I did not run the paired main/PR validation tests, inspect raw GPU logs, or test on a PS5. The hosted Linux product job was skipped. The author-reported GPU results were not independently repeated.

To get this to a good state

Attach the required same-machine, same-GPU main and PR validation logs and VUID comparison for the focused UINT color-target test. I will rerun applicable checks on the updated head.

@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 12568 docs/dev/debt/libSceAgcDriver.md L130-131

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 1395 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 2434 docs/dev/debt/libSceAgcDriver.md
PR 4040 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 5609 core/shader/recompiler/Recompiler.hpp
PR 5925 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
core/shader/recompiler/Recompiler.hpp
docs/dev/debt/libSceAgcDriver.md
PR 6186 docs/dev/debt/libSceAgcDriver.md
PR 6188 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/shader/recompiler/Recompiler.hpp
PR 6194 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6223 docs/dev/debt/libSceAgcDriver.md
PR 6235 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
core/shader/recompiler/ControlFlow/src/RequestSerializer.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
PR 6273 docs/dev/debt/libSceAgcDriver.md
PR 6280 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6412 core/shader/recompiler/Recompiler.hpp
docs/dev/debt/libSceAgcDriver.md
PR 6481 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6548 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6804 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6808 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6970 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
core/shader/recompiler/Recompiler.hpp
PR 6987 docs/dev/debt/libSceAgcDriver.md
PR 6989 docs/dev/debt/libSceAgcDriver.md
PR 6995 docs/dev/debt/libSceAgcDriver.md
PR 7002 docs/dev/debt/libSceAgcDriver.md
PR 7085 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7256 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7410 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
core/shader/recompiler/ControlFlow/src/RequestSerializer.cpp
core/shader/recompiler/Recompiler.hpp
PR 7449 docs/dev/debt/libSceAgcDriver.md
PR 7604 docs/dev/debt/libSceAgcDriver.md
PR 7642 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7668 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7689 core/shader/recompiler/Recompiler.hpp
PR 8004 core/shader/recompiler/ControlFlow/src/RequestSerializer.cpp
core/shader/recompiler/Recompiler.hpp
PR 8246 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 8592 docs/dev/debt/libSceAgcDriver.md
PR 8707 docs/dev/debt/libSceAgcDriver.md
PR 9020 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
core/shader/recompiler/ControlFlow/src/RequestSerializer.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
docs/dev/debt/libSceAgcDriver.md
PR 9318 docs/dev/debt/libSceAgcDriver.md
PR 9335 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
core/shader/recompiler/ControlFlow/src/RequestSerializer.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
docs/dev/debt/libSceAgcDriver.md
PR 9356 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
core/shader/recompiler/ControlFlow/src/RequestSerializer.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
docs/dev/debt/libSceAgcDriver.md
PR 9387 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
core/shader/recompiler/ControlFlow/src/RequestSerializer.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
docs/dev/debt/libSceAgcDriver.md
PR 9592 docs/dev/debt/libSceAgcDriver.md
PR 9672 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
docs/dev/debt/libSceAgcDriver.md
PR 9673 docs/dev/debt/libSceAgcDriver.md
PR 9675 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 9700 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 9712 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 9748 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
core/shader/recompiler/ControlFlow/src/RequestSerializer.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
docs/dev/debt/libSceAgcDriver.md
PR 9852 core/shader/recompiler/Recompiler.hpp
PR 9895 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 9897 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
core/shader/recompiler/Recompiler.hpp
PR 9898 docs/dev/debt/libSceAgcDriver.md
PR 9915 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 9950 docs/dev/debt/libSceAgcDriver.md
PR 10049 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
core/shader/recompiler/Recompiler.hpp
docs/dev/debt/libSceAgcDriver.md
PR 10193 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
docs/dev/debt/libSceAgcDriver.md
PR 10233 docs/dev/debt/libSceAgcDriver.md
PR 10249 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
PR 10256 docs/dev/debt/libSceAgcDriver.md
PR 10359 core/shader/recompiler/ControlFlow/src/RequestSerializer.cpp
core/shader/recompiler/Recompiler.hpp
docs/dev/debt/libSceAgcDriver.md
PR 10743 docs/dev/debt/libSceAgcDriver.md
PR 10757 core/shader/recompiler/Recompiler.hpp
PR 11351 core/shader/recompiler/ControlFlow/src/RequestSerializer.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
PR 11483 core/shader/recompiler/ControlFlow/src/RequestSerializer.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
PR 11825 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 11998 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 12120 docs/dev/debt/libSceAgcDriver.md
PR 12565 docs/dev/debt/libSceAgcDriver.md
PR 12567 docs/dev/debt/libSceAgcDriver.md
PR 12828 core/shader/recompiler/Recompiler.hpp
PR 12944 core/shader/recompiler/Recompiler.hpp
PR 13599 docs/dev/debt/libSceAgcDriver.md
PR 13707 docs/dev/debt/libSceAgcDriver.md
PR 13863 docs/dev/debt/libSceAgcDriver.md
PR 13920 docs/dev/debt/libSceAgcDriver.md
PR 13928 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
docs/dev/debt/libSceAgcDriver.md
PR 13929 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
docs/dev/debt/libSceAgcDriver.md
PR 13963 docs/dev/debt/libSceAgcDriver.md
PR 13994 docs/dev/debt/libSceAgcDriver.md
PR 14005 docs/dev/debt/libSceAgcDriver.md
PR 14032 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
core/shader/recompiler/Recompiler.hpp
PR 14212 docs/dev/debt/libSceAgcDriver.md
PR 14217 core/shader/recompiler/Recompiler.hpp
PR 14218 core/shader/recompiler/Recompiler.hpp
PR 14302 docs/dev/debt/libSceAgcDriver.md
PR 14311 docs/dev/debt/libSceAgcDriver.md
PR 14344 docs/dev/debt/libSceAgcDriver.md
PR 14561 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
core/shader/recompiler/ControlFlow/src/RequestSerializer.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
docs/dev/debt/libSceAgcDriver.md
PR 14621 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 14943 docs/dev/debt/libSceAgcDriver.md
PR 14944 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
core/shader/recompiler/Recompiler.hpp
docs/dev/debt/libSceAgcDriver.md
PR 14976 docs/dev/debt/libSceAgcDriver.md
PR 15059 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp

@Tamalero

Tamalero commented Nov 1, 2026

Copy link
Copy Markdown
Contributor Author

Follow-up on Guardians (PPSA01748): one played run on this branch, RTX 4090.

Start-up, New Game, the farm prologue, then the Milano up to the conversation with Rocket, for 32 minutes. The run stopped there because at this frame rate the puzzles that follow are not practical. No errors in the log, and the game shut down cleanly (exit 0). Frame rate was about 0.8–1.3 FPS in the prologue and about 1 FPS on the Milano. That matches earlier runs on main with #9789 reverted, which is how this title has played until now. Nothing looked different on screen: the same reduced detail as the game's performance mode, and no missing or broken effects.

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

Tamalero and others added 2 commits October 31, 2026 23:17
An FP16_ABGR export into a UINT target now stores the 32-bit float each
half widens to, read as an unsigned integer and clamped to the channel,
which is what a Navi21 stores with SPI_SHADER_COL_FORMAT forced to
FP16_ABGR. The fragment output is retyped to uint4 through the existing
unsigned packing path; the new UintClamp8 and UintClamp16 packings clamp
the words for 8- and 16-bit channels and key their own specialization.

Fixes boykopovar#11513

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
UINT packings now widen each exported half with integer operations, so
subnormals keep their value and a NaN gets its quiet bit as on Navi21,
whatever UnpackHalf2x16 does on the host. The execution test reads the
halves from user data at run time, adds NaN and the largest subnormal,
and draws through each clamping packing into R32_UINT, where the driver
cannot saturate for the shader.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Tamalero
Tamalero force-pushed the fix/agc-fp16-abgr-uint-target branch from 91eb850 to f0170da Compare November 1, 2026 06:30
@Tamalero

Tamalero commented Nov 1, 2026

Copy link
Copy Markdown
Contributor Author

@oneandonlydean @MarcZX10 thanks, both addressed in f0170da8b5 (rebased on main 3ee28266a3); the description is updated.

Widening. For the UINT packings the exported half bits are now widened with integer operations (WidenedHalfWord), selected by the packing specialization constant, instead of taking UnpackHalf2x16's result. Subnormals keep their value and a NaN gets its quiet bit, matching the measured 0x7c01 → 0x7fc02000, 0x7e00 → 0x7fc00000, 0x7fff → 0x7fffe000 and 0xfe00 → 0xffc00000. This mattered in practice: with UnpackHalf2x16, NVIDIA stores 0x7fffffff for 0x7c01 and RADV stores 0x7f802000. The NaN cases are now in the test, so the debt entry has no NaN exception. It now names one remaining gap: an uncompressed FP16_ABGR export into a UINT target keeps its 32-bit words, which is not measured.

Runtime inputs and a test of the clamp itself. The halves now come from user data through a single pixel program, and the test requires all inputs of a target to share one pipeline variant. Each clamping packing is also drawn into R32_UINT, which cannot saturate. The negative controls now fail on all three drivers when the clamp is removed or its limit is changed, and on NVIDIA and RADV when the widening is replaced by UnpackHalf2x16; the table is in the description.

Correction to the first description. The V620 and llvmpipe "passes" reported there were not valid for this PR. The test executable loads libSceAgcDriver.prx from the build directory, and the clamp-off build came last, so those runs used the clamp-off library. The new V620 and llvmpipe results were each built and run in turn.

Paired validation run (RTX 4090, NVIDIA 615.78.08, Linux 7.3), ctest -V with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ANYPS5_NO_SHADER_CACHE=1, ANYPS5_REQUIRE_VULKAN=1:

main 3ee28266a3 this PR f0170da8b5
agc_driver_uint_color_target passed passed
agc_driver_graphics passed passed
was not found but was requested by env var VK_INSTANCE_LAYERS absent absent
VUID- errors VUID-vkCreateDevice-ppEnabledExtensionNames-01387 (device creation) same, no new VUID

The only differences between the two logs are timestamps and timings. Local paths are replaced with /path/to/AnyPS5.

main 3ee2826: ctest -V log
UpdateCTestConfiguration  from :/path/to/AnyPS5/build/DartConfiguration.tcl
Test project /path/to/AnyPS5/build
Constructing a list of tests
Done constructing a list of tests
Updating test list for fixtures
Added 0 tests to meet fixture requirements
Checking test dependency graph...
Checking test dependency graph end
test 1258
    Start 1258: agc_driver_uint_color_target

1258: Test command: /path/to/AnyPS5/build/tests/agc_driver_uint_color_target_tests
1258: Working Directory: /path/to/AnyPS5
1258: Environment variables: 
1258:  ANYPS5_NO_SHADER_CACHE=1
1258:  APS5_NO_PIPELINE_JOURNAL=1
1258: Test timeout computed to be: 10000000
1258: [src/HostCpu.cpp:220 operator()] host CPU Intel(R) Core(TM) i9-14900K: has SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, LZCNT, BMI1, BMI2, MOVBE, CMPXCHG16B, LAHF/SAHF, AVX, AVX2, FMA, F16C, AES, PCLMULQDQ, RDRAND, RDSEED, ADX, SHA, CLFLUSHOPT, CLWB, RDPID, XSAVEOPT, XSAVEC, PREFETCHW, OS AVX state (XCR0); lacks SSE4A, CLZERO
1258: [src/VulkanDevice.cpp:1177 VulkanDevice] VulkanDevice constructor window=(nil)
1258: [src/VulkanDevice.cpp:1186 VulkanDevice] Vulkan loader loaded library=0x557947fdb280
1258: [2026-10-31 23:24:44.697] [MANGOHUD] [info] [gpu.cpp:90] Set renderD128 as active GPU (driver=nvidia id=10de:2684 pci_dev=0000:01:00.0)
1258: [2026-10-31 23:24:44.709] [MANGOHUD] [info] [cpu.cpp:636] hwmon: using input: /sys/class/hwmon/hwmon8/temp1_input
1258: [src/VulkanDevice.cpp:1226 VulkanDevice] Vulkan instance created instance=0x557947fdc270
1258: [src/VulkanDevice.cpp:1237 VulkanDevice] Physical device count=1
1258: [src/VulkanDevice.cpp:1271 VulkanDevice] Physical device candidate=0x557948431ce0 name=NVIDIA GeForce RTX 4090 api=0x40415f type=2
1258: [src/VulkanDevice.cpp:1319 VulkanDevice] Physical device selected physical=0x557948431ce0 queueFamily=0
1258: [src/VulkanDevice.cpp:1333 VulkanDevice] Selected GPU name=NVIDIA GeForce RTX 4090 vendor=0x10de device=0x2684 subgroup=32
1258: [src/VulkanDevice.cpp:1335 VulkanDevice] Memory heap 0 size=24564.0 MiB flags=0x1
1258: [src/VulkanDevice.cpp:1335 VulkanDevice] Memory heap 1 size=48081.2 MiB flags=0x0
1258: [src/VulkanDevice.cpp:1336 VulkanDevice] Memory type 0 heap=1 flags=0x0
1258: [src/VulkanDevice.cpp:1336 VulkanDevice] Memory type 1 heap=0 flags=0x1
1258: [src/VulkanDevice.cpp:1336 VulkanDevice] Memory type 2 heap=1 flags=0x6
1258: [src/VulkanDevice.cpp:1336 VulkanDevice] Memory type 3 heap=1 flags=0xe
1258: [src/VulkanDevice.cpp:1336 VulkanDevice] Memory type 4 heap=0 flags=0x7
1258: [src/VulkanDevice.cpp:1434 VulkanDevice] Shader clock driver=4 narrowSubgroupClock=0
1258: [gpu] largest sample location grids (vkGetPhysicalDeviceMultisamplePropertiesEXT): 1 samples 4x4, 2 samples 2x4, 4 samples 2x2, 8 samples 1x2; maxSampleLocationGridSize for every count 1x1
1258: [src/VulkanDevice.cpp:1808 VulkanDevice] Vulkan features tessellationAvailable=1 mesh=1 depthClip=1 depthRangeUnrestricted=1 pipelineLibrary=1
1258: [src/VulkanDevice.cpp:2070 VulkanDevice] Wave32 programs run on subgroups of 32: compute 1, mesh 1
1258: Validation Error: [ VUID-vkCreateDevice-ppEnabledExtensionNames-01387 ] | MessageID = 0x12537a2c
1258: vkCreateDevice(): pCreateInfo->ppEnabledExtensionNames[43] Missing extension required to enable device extension VK_KHR_present_mode_fifo_latest_ready:
1258:  - VK_KHR_swapchain
1258: The Vulkan spec states: All required device extensions for each extension in the VkDeviceCreateInfo::ppEnabledExtensionNames list must also be present in that list (https://docs.vulkan.org/spec/latest/chapters/devsandqueues.html#VUID-vkCreateDevice-ppEnabledExtensionNames-01387)
1258: Objects: 1
1258:     [0] VkInstance 0x557947fdc270
1258: 
1258: [src/VulkanDevice.cpp:2223 VulkanDevice] Vulkan device ready device=0x557948742e90 queue=0x55794897e810 family=0
1258: [write-watch] host imports resolve write protection: no (0 of 4 scratch pages written after a GPU read, 0 after a GPU write, 4 after the import); imported ranges stay watched
1258: [float-controls] f32 denormal flush: hardware (0 of 5472 probe results differ from the emulated flush, 31 ms)
1258: UINT color target tests passed
1/2 Test #1258: agc_driver_uint_color_target .....   Passed    0.94 sec
test 1461
    Start 1461: agc_driver_graphics

1461: Test command: /path/to/AnyPS5/build/tests/agc_driver_graphics_tests
1461: Working Directory: /path/to/AnyPS5
1461: Environment variables: 
1461:  ANYPS5_NO_SHADER_CACHE=1
1461:  APS5_NO_PIPELINE_JOURNAL=1
1461: Test timeout computed to be: 10000000
1461: [src/HostCpu.cpp:220 operator()] host CPU Intel(R) Core(TM) i9-14900K: has SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, LZCNT, BMI1, BMI2, MOVBE, CMPXCHG16B, LAHF/SAHF, AVX, AVX2, FMA, F16C, AES, PCLMULQDQ, RDRAND, RDSEED, ADX, SHA, CLFLUSHOPT, CLWB, RDPID, XSAVEOPT, XSAVEC, PREFETCHW, OS AVX state (XCR0); lacks SSE4A, CLZERO
1461: [gpu] always-pass depth/stencil state is rendered without a depth target (DB_DEPTH_CONTROL=0x007007b3)
1461: [gpu] viewport depth clamp bounds [-1, 2] on a float depth target are clipped to [0, 1]: the device has no VK_EXT_depth_range_unrestricted
1461: [gpu] layer/viewport index vertex exports are ignored (PA_CL_VS_OUT_CNTL=0x01240000)
1461: [gpu] DCC keys of mipmapped array and 3D color targets are ignored
1461: [gpu] no 2x2 sample location grid at sample count 2 on this device: sample locations varying between pixels take pixel (0,0)'s in every pixel (the device lacks sampleRateShading)
1461: [gpu] no 2x2 sample location grid at sample count 1 on this device: sample locations varying between pixels take pixel (0,0)'s in every pixel (its pixels hold different locations)
1461: [gpu] no 2x2 sample location grid at sample count 2 on this device: pixel (0,0)'s sample locations stand in for every pixel, and each pixel's samples are put in the guest's order at the bounds of its render passes
1461: [gpu] host import of 0x557df4ff0000+0x20000 failed at vkAllocateMemory (-2); falling back to copies, requested by access
1461: [gpu] host import of 0x557df4ff0000+0x20000 failed at vkAllocateMemory (-2); falling back to copies, requested by access
1461: [gpu] host import of 0x557df4ff0000+0x20000 failed at vkAllocateMemory (-2); falling back to copies, requested by access
1461: [gpu] host import budget: 0 MiB live of 0 MiB (APS5_HOST_IMPORT_MIB); 1 imports (0 MiB) refused so far, 0 of them remembered, last 0x557df6850000+0x30000 by build
1461: [gpu] host import of 0x557df6800000+0x60000 failed at vkAllocateMemory (-2); falling back to copies, requested by join
1461: [gpu] host import budget lowered to the 0.0 MiB live after vkAllocateMemory failed within an eighth of the budget
1461: [gpu] host import of 0x557df67f0000+0x20000 failed at vkAllocateMemory (-1000072003); falling back to copies, requested by map
1461: [gpu] host import of 0x557df67f0000+0x20000 failed at vkAllocateMemory (-1000072003); falling back to copies, requested by access
1461: [gpu] host import of 0x557df7fe0000+0x10000 failed at vkAllocateMemory (-2); falling back to copies, requested by access
1461: [gpu] host import of 0x7f8adf000000+0x800000 failed at vkAllocateMemory (-2); falling back to copies, requested by build
1461: [gpu] host import of 0x7f8adf000000+0x800000 failed at vkAllocateMemory (-2); falling back to copies, requested by access
1461: [gpu] host import of 0x557e00770000+0x10000 failed at vkAllocateMemory (-2); falling back to copies, requested by access
1461: [gpu] host import of 0x557e007b0000+0x10000 failed at vkAllocateMemory (-2); falling back to copies, requested by access
1461: [gpu] host import of 0x557e007d0000+0x10000 failed at vkAllocateMemory (-2); falling back to copies, requested by access
1461: [gpu] host import of 0x557e007f0000+0x10000 failed at vkAllocateMemory (-2); falling back to copies, requested by access
1461: [gpu] host import budget lowered to the 0.1 MiB live after vkAllocateMemory failed 3 times in a row
1461: [gpu] host import of 0x557e00770000+0x10000 failed at vkAllocateMemory (-2); falling back to copies, requested by access
1461: [gpu] host import budget lowered to the 0.1 MiB live after vkAllocateMemory failed within an eighth of the budget
1461: [gpu] host import of 0x557e00770000+0x10000 failed at vkAllocateMemory (-1); falling back to copies, requested by access
1461: [gpu] host import of 0x557e00790000+0x10000 failed at vkAllocateMemory (-1); falling back to copies, requested by access
1461: [gpu] host import of 0x557e007b0000+0x10000 failed at vkAllocateMemory (-1); falling back to copies, requested by access
1461: [gpu] host import budget lowered to the 0.1 MiB live after vkAllocateMemory failed 3 times in a row
1461: [gpu] host import of 0x557e00770000+0x10000 failed at vkAllocateMemory (-1); falling back to copies, requested by access
1461: [gpu] host import budget lowered to the 0.1 MiB live after vkAllocateMemory failed within an eighth of the budget
1461: [gpu] host import of 0x557e00770000+0x10000 failed at vkAllocateMemory (-2); falling back to copies, requested by access
1461: [gpu] host import of 0x557e00790000+0x10000 failed at vkAllocateMemory (-2); falling back to copies, requested by access
1461: [gpu] host import of 0x557e007b0000+0x10000 failed at vkAllocateMemory (-2); falling back to copies, requested by access
1461: [gpu] host import budget lowered to the 0.1 MiB live after vkAllocateMemory failed 3 times in a row
1461: [gpu] host import of 0x557e00770000+0x10000 failed at vkAllocateMemory (-2); falling back to copies, requested by access
1461: [gpu] host import budget lowered to the 0.1 MiB live after vkAllocateMemory failed within an eighth of the budget
1461: [gpu] host import of 0x557e00770000+0x10000 failed at vkAllocateMemory (-1000072003); falling back to copies, requested by access
1461: [gpu] host import of 0x557e00790000+0x10000 failed at vkAllocateMemory (-1000072003); falling back to copies, requested by access
1461: [gpu] host import of 0x557e007b0000+0x10000 failed at vkAllocateMemory (-1000072003); falling back to copies, requested by access
1461: [gpu] host import of 0x557e00890000+0x10000 failed at vkAllocateMemory (-1000072003); falling back to copies, requested by access
1461: [gpu] host import of 0x557e008b0000+0x10000 failed at vkAllocateMemory (-1000072003); falling back to copies, requested by access
1461: [gpu] host import of 0x557e008d0000+0x10000 failed at vkAllocateMemory (-1000072003); falling back to copies, requested by access
1461: [gpu] host import of 0x557e00890000+0x10000 failed at vkAllocateMemory (-13); falling back to copies, requested by access
1461: [gpu] host import of 0x557e008b0000+0x10000 failed at vkAllocateMemory (-13); falling back to copies, requested by access
1461: [gpu] host import of 0x557e008d0000+0x10000 failed at vkAllocateMemory (-13); falling back to copies, requested by access
1461: [gpu] host import of 0x557e00890000+0x10000 failed at vkAllocateMemory (-13); falling back to copies, requested by access
1461: [gpu] host import of 0x557e008b0000+0x10000 failed at vkAllocateMemory (-13); falling back to copies, requested by access
1461: [gpu] host import of 0x557e008d0000+0x10000 failed at vkAllocateMemory (-13); falling back to copies, requested by access
1461: [gpu] host import budget: host heap 1 reports a VK_EXT_memory_budget budget of 8 MiB and a usage of 8 MiB with 0 MiB of imports live, which leaves imports 0 MiB of the 4 MiB APS5_HOST_IMPORT_MIB sets; the setting stays, as the report never lowers it
1461: [gpu] host import of 0x557e008d0000+0x10000 failed at vkAllocateMemory (-1); falling back to copies, requested by access
1461: [gpu] host import budget: host heap 1 reports a VK_EXT_memory_budget budget of 8 MiB and a usage of 8 MiB with 0 MiB of imports live, which leaves imports 0 MiB of the 8192 MiB of the default; the default stays until an import's vkAllocateMemory fails
1461: [gpu] host import of 0x557e008d0000+0x10000 failed at vkAllocateMemory (-1); falling back to copies, requested by access
1461: [gpu] host import budget: host heap 1 reports a VK_EXT_memory_budget budget of 8 MiB and a usage of 8 MiB with 0 MiB of imports live, which leaves imports 0 MiB of the 8192 MiB of the default; imports are held to it since an import's vkAllocateMemory failed
1461: [gpu] host import budget: host heap 1 reports a VK_EXT_memory_budget budget of 8 MiB and a usage of 8 MiB with 0 MiB of imports live, which leaves imports 0 MiB of the 4 MiB APS5_HOST_IMPORT_MIB sets; the setting stays, as the report never lowers it
1461: [gpu] host import of 0x557e008d0000+0x10000 failed at vkAllocateMemory (-2); falling back to copies, requested by access
1461: [gpu] host import budget: host heap 1 reports a VK_EXT_memory_budget budget of 8 MiB and a usage of 8 MiB with 0 MiB of imports live, which leaves imports 0 MiB of the 8192 MiB of the default; the default stays until an import's vkAllocateMemory fails
1461: [gpu] host import of 0x557e00bf0000+0x10000 failed at vkAllocateMemory (-2); falling back to copies, requested by access
1461: [gpu] host import budget: host heap 1 reports a VK_EXT_memory_budget budget of 8 MiB and a usage of 8 MiB with 0 MiB of imports live, which leaves imports 0 MiB of the 8192 MiB of the default; imports are held to it since an import's vkAllocateMemory failed
1461: [gpu] host import budget: host heap 1 reports a VK_EXT_memory_budget budget of 8 MiB and a usage of 8 MiB with 0 MiB of imports live, which leaves imports 0 MiB of the 4 MiB APS5_HOST_IMPORT_MIB sets; the setting stays, as the report never lowers it
1461: [gpu] host import of 0x557e00bf0000+0x10000 failed at vkAllocateMemory (-1000072003); falling back to copies, requested by access
1461: [gpu] host import budget: host heap 1 reports a VK_EXT_memory_budget budget of 8 MiB and a usage of 8 MiB with 0 MiB of imports live, which leaves imports 0 MiB of the 8192 MiB of the default; the default stays until an import's vkAllocateMemory fails
1461: [gpu] host import of 0x557e00bf0000+0x10000 failed at vkAllocateMemory (-1000072003); falling back to copies, requested by access
1461: [gpu] host import budget: host heap 1 reports a VK_EXT_memory_budget budget of 8 MiB and a usage of 8 MiB with 0 MiB of imports live, which leaves imports 0 MiB of the 8192 MiB of the default; imports are held to it since an import's vkAllocateMemory failed
1461: [gpu] host import budget: host heap 1 reports a VK_EXT_memory_budget budget of 8 MiB and a usage of 8 MiB with 0 MiB of imports live, which leaves imports 0 MiB of the 4 MiB APS5_HOST_IMPORT_MIB sets; the setting stays, as the report never lowers it
1461: [gpu] host import of 0x557e00bf0000+0x10000 failed at vkAllocateMemory (-13); falling back to copies, requested by access
1461: [gpu] host import budget: host heap 1 reports a VK_EXT_memory_budget budget of 8 MiB and a usage of 8 MiB with 0 MiB of imports live, which leaves imports 0 MiB of the 8192 MiB of the default; the default stays until an import's vkAllocateMemory fails
1461: [gpu] host import of 0x557e00bf0000+0x10000 failed at vkAllocateMemory (-13); falling back to copies, requested by access
1461: [gpu] host import budget: host heap 1 reports a VK_EXT_memory_budget budget of 8 MiB and a usage of 8 MiB with 0 MiB of imports live, which leaves imports 0 MiB of the 8192 MiB of the default; imports are held to it since an import's vkAllocateMemory failed
1461: [gpu] host import budget: host heap 1 reports a VK_EXT_memory_budget budget of 8 MiB and a usage of 8 MiB with 0 MiB of imports live, which leaves imports 0 MiB of the 8192 MiB of the default; the default stays until an import's vkAllocateMemory fails
1461: [gpu] host import of 0x557e00b90000+0x10000 failed at vkAllocateMemory (-2); falling back to copies, requested by access
1461: [gpu] host import budget: host heap 1 reports a VK_EXT_memory_budget budget of 8 MiB and a usage of 8 MiB with 0 MiB of imports live, which leaves imports 0 MiB of the 8192 MiB of the default; imports are held to it since an import's vkAllocateMemory failed
1461: [gpu] texture 0x7fffed51af00 (format 74) has single DCC keys at 0x7fffed51ae80; its texels are read as stored
1461: [gpu] texture 0x7fffed51af00 (format 56) has mixed DCC keys at 0x7fffed51ae80; its texels are read as stored
1461: [gpu] texture streaming feedback (LOD warning / mip statistics) is not reported
1461: [gpu] texture 0x27c000000 (format 22) has unreadable DCC keys at 0x91b002040000; its texels are read as stored
1461: [gpu] texture DCC color transform is ignored (word6=0x01980000 word7=0x00000000)
1461: [gpu] depth plane 0xa0000000+0x40000 was unmapped with GPU results pending; they are dropped
1461: content-key count=0 data=0 movable=0 words=70 capacity=70 hash=12276112778106431680
1461: content-key count=0 data=0 movable=1 words=70 capacity=70 hash=16547703523611771548
1461: content-key count=0 data=1 movable=0 words=327 capacity=327 hash=18195637788575597601
1461: content-key count=0 data=1 movable=1 words=70 capacity=70 hash=6884676608767608045
1461: content-key count=1 data=0 movable=0 words=89 capacity=89 hash=3582826753038562111
1461: content-key count=1 data=0 movable=1 words=89 capacity=89 hash=9518511843953525419
1461: content-key count=1 data=1 movable=0 words=346 capacity=346 hash=3684355951081846730
1461: content-key count=1 data=1 movable=1 words=89 capacity=89 hash=8486460719680651956
1461: content-key count=31 data=0 movable=0 words=389 capacity=389 hash=2872353339945041207
1461: content-key count=31 data=0 movable=1 words=389 capacity=389 hash=11292844791518677155
1461: content-key count=31 data=1 movable=0 words=646 capacity=646 hash=16275665856175105250
1461: content-key count=31 data=1 movable=1 words=389 capacity=389 hash=4084850990441387724
1461: content-key count=32 data=0 movable=0 words=399 capacity=399 hash=9001008430028590267
1461: content-key count=32 data=0 movable=1 words=399 capacity=399 hash=5471292191449946447
1461: content-key count=32 data=1 movable=0 words=656 capacity=656 hash=9565516749443825062
1461: content-key count=32 data=1 movable=1 words=399 capacity=399 hash=15118118974702537264
1461: content-key count=33 data=0 movable=0 words=418 capacity=418 hash=10382587997612106155
1461: content-key count=33 data=0 movable=1 words=418 capacity=418 hash=11706275810969384511
1461: content-key count=33 data=1 movable=0 words=675 capacity=675 hash=1776364597915029880
1461: content-key count=33 data=1 movable=1 words=418 capacity=418 hash=13690582611633829486
1461: content-key count=16384 data=0 movable=0 words=168518 capacity=168518 hash=15297671208421994211
1461: content-key count=16384 data=0 movable=1 words=168518 capacity=168518 hash=8322610684387165047
1461: content-key count=16384 data=1 movable=0 words=168775 capacity=168775 hash=13444188082477402620
1461: content-key count=16384 data=1 movable=1 words=168518 capacity=168518 hash=6566449801145079954
1461: Unused stencil reference sample equivalence passed: 22 accepted states, 12 dependent countermodels
1461: Stencil logic operations matched AND, OR, XOR and XNOR under the write mask for 310 register states
1461: All 256 MSAA CMASK byte classifications passed
1461: Sparse imported heap tests passed
1461: guest arena unavailable or not write-watched: heap mirrors not tested
1461: guest arena unavailable or not write-watched: heap mirrors of imported ranges not tested
1461: Graphics validation tests passed
2/2 Test #1461: agc_driver_graphics ..............   Passed    9.38 sec

The following tests passed:
	agc_driver_uint_color_target
	agc_driver_graphics

100% tests passed out of 2

Total Test time (real) =  11.27 sec
this PR f0170da: ctest -V log
UpdateCTestConfiguration  from :/path/to/AnyPS5/build/DartConfiguration.tcl
Test project /path/to/AnyPS5/build
Constructing a list of tests
Done constructing a list of tests
Updating test list for fixtures
Added 0 tests to meet fixture requirements
Checking test dependency graph...
Checking test dependency graph end
test 1258
    Start 1258: agc_driver_uint_color_target

1258: Test command: /path/to/AnyPS5/build/tests/agc_driver_uint_color_target_tests
1258: Working Directory: /path/to/AnyPS5
1258: Environment variables: 
1258:  ANYPS5_NO_SHADER_CACHE=1
1258:  APS5_NO_PIPELINE_JOURNAL=1
1258: Test timeout computed to be: 10000000
1258: [src/HostCpu.cpp:220 operator()] host CPU Intel(R) Core(TM) i9-14900K: has SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, LZCNT, BMI1, BMI2, MOVBE, CMPXCHG16B, LAHF/SAHF, AVX, AVX2, FMA, F16C, AES, PCLMULQDQ, RDRAND, RDSEED, ADX, SHA, CLFLUSHOPT, CLWB, RDPID, XSAVEOPT, XSAVEC, PREFETCHW, OS AVX state (XCR0); lacks SSE4A, CLZERO
1258: [src/VulkanDevice.cpp:1177 VulkanDevice] VulkanDevice constructor window=(nil)
1258: [src/VulkanDevice.cpp:1186 VulkanDevice] Vulkan loader loaded library=0x55b0ea0881f0
1258: [2026-10-31 23:26:01.970] [MANGOHUD] [info] [gpu.cpp:90] Set renderD128 as active GPU (driver=nvidia id=10de:2684 pci_dev=0000:01:00.0)
1258: [2026-10-31 23:26:01.994] [MANGOHUD] [info] [cpu.cpp:636] hwmon: using input: /sys/class/hwmon/hwmon8/temp1_input
1258: [src/VulkanDevice.cpp:1226 VulkanDevice] Vulkan instance created instance=0x55b0ea0891e0
1258: [src/VulkanDevice.cpp:1237 VulkanDevice] Physical device count=1
1258: [src/VulkanDevice.cpp:1271 VulkanDevice] Physical device candidate=0x55b0ea4dbdf0 name=NVIDIA GeForce RTX 4090 api=0x40415f type=2
1258: [src/VulkanDevice.cpp:1319 VulkanDevice] Physical device selected physical=0x55b0ea4dbdf0 queueFamily=0
1258: [src/VulkanDevice.cpp:1333 VulkanDevice] Selected GPU name=NVIDIA GeForce RTX 4090 vendor=0x10de device=0x2684 subgroup=32
1258: [src/VulkanDevice.cpp:1335 VulkanDevice] Memory heap 0 size=24564.0 MiB flags=0x1
1258: [src/VulkanDevice.cpp:1335 VulkanDevice] Memory heap 1 size=48081.2 MiB flags=0x0
1258: [src/VulkanDevice.cpp:1336 VulkanDevice] Memory type 0 heap=1 flags=0x0
1258: [src/VulkanDevice.cpp:1336 VulkanDevice] Memory type 1 heap=0 flags=0x1
1258: [src/VulkanDevice.cpp:1336 VulkanDevice] Memory type 2 heap=1 flags=0x6
1258: [src/VulkanDevice.cpp:1336 VulkanDevice] Memory type 3 heap=1 flags=0xe
1258: [src/VulkanDevice.cpp:1336 VulkanDevice] Memory type 4 heap=0 flags=0x7
1258: [src/VulkanDevice.cpp:1434 VulkanDevice] Shader clock driver=4 narrowSubgroupClock=0
1258: [gpu] largest sample location grids (vkGetPhysicalDeviceMultisamplePropertiesEXT): 1 samples 4x4, 2 samples 2x4, 4 samples 2x2, 8 samples 1x2; maxSampleLocationGridSize for every count 1x1
1258: [src/VulkanDevice.cpp:1808 VulkanDevice] Vulkan features tessellationAvailable=1 mesh=1 depthClip=1 depthRangeUnrestricted=1 pipelineLibrary=1
1258: [src/VulkanDevice.cpp:2070 VulkanDevice] Wave32 programs run on subgroups of 32: compute 1, mesh 1
1258: Validation Error: [ VUID-vkCreateDevice-ppEnabledExtensionNames-01387 ] | MessageID = 0x12537a2c
1258: vkCreateDevice(): pCreateInfo->ppEnabledExtensionNames[43] Missing extension required to enable device extension VK_KHR_present_mode_fifo_latest_ready:
1258:  - VK_KHR_swapchain
1258: The Vulkan spec states: All required device extensions for each extension in the VkDeviceCreateInfo::ppEnabledExtensionNames list must also be present in that list (https://docs.vulkan.org/spec/latest/chapters/devsandqueues.html#VUID-vkCreateDevice-ppEnabledExtensionNames-01387)
1258: Objects: 1
1258:     [0] VkInstance 0x55b0ea0891e0
1258: 
1258: [src/VulkanDevice.cpp:2223 VulkanDevice] Vulkan device ready device=0x55b0ea7efdb0 queue=0x55b0eaa2b800 family=0
1258: [write-watch] host imports resolve write protection: no (0 of 4 scratch pages written after a GPU read, 0 after a GPU write, 4 after the import); imported ranges stay watched
1258: [float-controls] f32 denormal flush: hardware (0 of 5472 probe results differ from the emulated flush, 36 ms)
1258: UINT color target tests passed
1/2 Test #1258: agc_driver_uint_color_target .....   Passed    1.91 sec
test 1461
    Start 1461: agc_driver_graphics

1461: Test command: /path/to/AnyPS5/build/tests/agc_driver_graphics_tests
1461: Working Directory: /path/to/AnyPS5
1461: Environment variables: 
1461:  ANYPS5_NO_SHADER_CACHE=1
1461:  APS5_NO_PIPELINE_JOURNAL=1
1461: Test timeout computed to be: 10000000
1461: [src/HostCpu.cpp:220 operator()] host CPU Intel(R) Core(TM) i9-14900K: has SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, LZCNT, BMI1, BMI2, MOVBE, CMPXCHG16B, LAHF/SAHF, AVX, AVX2, FMA, F16C, AES, PCLMULQDQ, RDRAND, RDSEED, ADX, SHA, CLFLUSHOPT, CLWB, RDPID, XSAVEOPT, XSAVEC, PREFETCHW, OS AVX state (XCR0); lacks SSE4A, CLZERO
1461: [gpu] always-pass depth/stencil state is rendered without a depth target (DB_DEPTH_CONTROL=0x007007b3)
1461: [gpu] viewport depth clamp bounds [-1, 2] on a float depth target are clipped to [0, 1]: the device has no VK_EXT_depth_range_unrestricted
1461: [gpu] layer/viewport index vertex exports are ignored (PA_CL_VS_OUT_CNTL=0x01240000)
1461: [gpu] DCC keys of mipmapped array and 3D color targets are ignored
1461: [gpu] no 2x2 sample location grid at sample count 2 on this device: sample locations varying between pixels take pixel (0,0)'s in every pixel (the device lacks sampleRateShading)
1461: [gpu] no 2x2 sample location grid at sample count 1 on this device: sample locations varying between pixels take pixel (0,0)'s in every pixel (its pixels hold different locations)
1461: [gpu] no 2x2 sample location grid at sample count 2 on this device: pixel (0,0)'s sample locations stand in for every pixel, and each pixel's samples are put in the guest's order at the bounds of its render passes
1461: [gpu] host import of 0x55e9b1290000+0x20000 failed at vkAllocateMemory (-2); falling back to copies, requested by access
1461: [gpu] host import of 0x55e9b1290000+0x20000 failed at vkAllocateMemory (-2); falling back to copies, requested by access
1461: [gpu] host import of 0x55e9b1290000+0x20000 failed at vkAllocateMemory (-2); falling back to copies, requested by access
1461: [gpu] host import budget: 0 MiB live of 0 MiB (APS5_HOST_IMPORT_MIB); 1 imports (0 MiB) refused so far, 0 of them remembered, last 0x55e9b2af0000+0x30000 by build
1461: [gpu] host import of 0x55e9b2aa0000+0x60000 failed at vkAllocateMemory (-2); falling back to copies, requested by join
1461: [gpu] host import budget lowered to the 0.0 MiB live after vkAllocateMemory failed within an eighth of the budget
1461: [gpu] host import of 0x55e9b2a90000+0x20000 failed at vkAllocateMemory (-1000072003); falling back to copies, requested by map
1461: [gpu] host import of 0x55e9b2a90000+0x20000 failed at vkAllocateMemory (-1000072003); falling back to copies, requested by access
1461: [gpu] host import of 0x55e9b4280000+0x10000 failed at vkAllocateMemory (-2); falling back to copies, requested by access
1461: [gpu] host import of 0x7f3273800000+0x800000 failed at vkAllocateMemory (-2); falling back to copies, requested by build
1461: [gpu] host import of 0x7f3273800000+0x800000 failed at vkAllocateMemory (-2); falling back to copies, requested by access
1461: [gpu] host import of 0x55e9bca10000+0x10000 failed at vkAllocateMemory (-2); falling back to copies, requested by access
1461: [gpu] host import of 0x55e9bca50000+0x10000 failed at vkAllocateMemory (-2); falling back to copies, requested by access
1461: [gpu] host import of 0x55e9bca70000+0x10000 failed at vkAllocateMemory (-2); falling back to copies, requested by access
1461: [gpu] host import of 0x55e9bca90000+0x10000 failed at vkAllocateMemory (-2); falling back to copies, requested by access
1461: [gpu] host import budget lowered to the 0.1 MiB live after vkAllocateMemory failed 3 times in a row
1461: [gpu] host import of 0x55e9bca10000+0x10000 failed at vkAllocateMemory (-2); falling back to copies, requested by access
1461: [gpu] host import budget lowered to the 0.1 MiB live after vkAllocateMemory failed within an eighth of the budget
1461: [gpu] host import of 0x55e9bca10000+0x10000 failed at vkAllocateMemory (-1); falling back to copies, requested by access
1461: [gpu] host import of 0x55e9bca30000+0x10000 failed at vkAllocateMemory (-1); falling back to copies, requested by access
1461: [gpu] host import of 0x55e9bca50000+0x10000 failed at vkAllocateMemory (-1); falling back to copies, requested by access
1461: [gpu] host import budget lowered to the 0.1 MiB live after vkAllocateMemory failed 3 times in a row
1461: [gpu] host import of 0x55e9bca10000+0x10000 failed at vkAllocateMemory (-1); falling back to copies, requested by access
1461: [gpu] host import budget lowered to the 0.1 MiB live after vkAllocateMemory failed within an eighth of the budget
1461: [gpu] host import of 0x55e9bca10000+0x10000 failed at vkAllocateMemory (-2); falling back to copies, requested by access
1461: [gpu] host import of 0x55e9bca30000+0x10000 failed at vkAllocateMemory (-2); falling back to copies, requested by access
1461: [gpu] host import of 0x55e9bca50000+0x10000 failed at vkAllocateMemory (-2); falling back to copies, requested by access
1461: [gpu] host import budget lowered to the 0.1 MiB live after vkAllocateMemory failed 3 times in a row
1461: [gpu] host import of 0x55e9bca10000+0x10000 failed at vkAllocateMemory (-2); falling back to copies, requested by access
1461: [gpu] host import budget lowered to the 0.1 MiB live after vkAllocateMemory failed within an eighth of the budget
1461: [gpu] host import of 0x55e9bca10000+0x10000 failed at vkAllocateMemory (-1000072003); falling back to copies, requested by access
1461: [gpu] host import of 0x55e9bca30000+0x10000 failed at vkAllocateMemory (-1000072003); falling back to copies, requested by access
1461: [gpu] host import of 0x55e9bca50000+0x10000 failed at vkAllocateMemory (-1000072003); falling back to copies, requested by access
1461: [gpu] host import of 0x55e9bcb30000+0x10000 failed at vkAllocateMemory (-1000072003); falling back to copies, requested by access
1461: [gpu] host import of 0x55e9bcb50000+0x10000 failed at vkAllocateMemory (-1000072003); falling back to copies, requested by access
1461: [gpu] host import of 0x55e9bcb70000+0x10000 failed at vkAllocateMemory (-1000072003); falling back to copies, requested by access
1461: [gpu] host import of 0x55e9bcb30000+0x10000 failed at vkAllocateMemory (-13); falling back to copies, requested by access
1461: [gpu] host import of 0x55e9bcb50000+0x10000 failed at vkAllocateMemory (-13); falling back to copies, requested by access
1461: [gpu] host import of 0x55e9bcb70000+0x10000 failed at vkAllocateMemory (-13); falling back to copies, requested by access
1461: [gpu] host import of 0x55e9bcb30000+0x10000 failed at vkAllocateMemory (-13); falling back to copies, requested by access
1461: [gpu] host import of 0x55e9bcb50000+0x10000 failed at vkAllocateMemory (-13); falling back to copies, requested by access
1461: [gpu] host import of 0x55e9bcb70000+0x10000 failed at vkAllocateMemory (-13); falling back to copies, requested by access
1461: [gpu] host import budget: host heap 1 reports a VK_EXT_memory_budget budget of 8 MiB and a usage of 8 MiB with 0 MiB of imports live, which leaves imports 0 MiB of the 4 MiB APS5_HOST_IMPORT_MIB sets; the setting stays, as the report never lowers it
1461: [gpu] host import of 0x55e9bcb70000+0x10000 failed at vkAllocateMemory (-1); falling back to copies, requested by access
1461: [gpu] host import budget: host heap 1 reports a VK_EXT_memory_budget budget of 8 MiB and a usage of 8 MiB with 0 MiB of imports live, which leaves imports 0 MiB of the 8192 MiB of the default; the default stays until an import's vkAllocateMemory fails
1461: [gpu] host import of 0x55e9bcb70000+0x10000 failed at vkAllocateMemory (-1); falling back to copies, requested by access
1461: [gpu] host import budget: host heap 1 reports a VK_EXT_memory_budget budget of 8 MiB and a usage of 8 MiB with 0 MiB of imports live, which leaves imports 0 MiB of the 8192 MiB of the default; imports are held to it since an import's vkAllocateMemory failed
1461: [gpu] host import budget: host heap 1 reports a VK_EXT_memory_budget budget of 8 MiB and a usage of 8 MiB with 0 MiB of imports live, which leaves imports 0 MiB of the 4 MiB APS5_HOST_IMPORT_MIB sets; the setting stays, as the report never lowers it
1461: [gpu] host import of 0x55e9bcb70000+0x10000 failed at vkAllocateMemory (-2); falling back to copies, requested by access
1461: [gpu] host import budget: host heap 1 reports a VK_EXT_memory_budget budget of 8 MiB and a usage of 8 MiB with 0 MiB of imports live, which leaves imports 0 MiB of the 8192 MiB of the default; the default stays until an import's vkAllocateMemory fails
1461: [gpu] host import of 0x55e9bce90000+0x10000 failed at vkAllocateMemory (-2); falling back to copies, requested by access
1461: [gpu] host import budget: host heap 1 reports a VK_EXT_memory_budget budget of 8 MiB and a usage of 8 MiB with 0 MiB of imports live, which leaves imports 0 MiB of the 8192 MiB of the default; imports are held to it since an import's vkAllocateMemory failed
1461: [gpu] host import budget: host heap 1 reports a VK_EXT_memory_budget budget of 8 MiB and a usage of 8 MiB with 0 MiB of imports live, which leaves imports 0 MiB of the 4 MiB APS5_HOST_IMPORT_MIB sets; the setting stays, as the report never lowers it
1461: [gpu] host import of 0x55e9bce90000+0x10000 failed at vkAllocateMemory (-1000072003); falling back to copies, requested by access
1461: [gpu] host import budget: host heap 1 reports a VK_EXT_memory_budget budget of 8 MiB and a usage of 8 MiB with 0 MiB of imports live, which leaves imports 0 MiB of the 8192 MiB of the default; the default stays until an import's vkAllocateMemory fails
1461: [gpu] host import of 0x55e9bce90000+0x10000 failed at vkAllocateMemory (-1000072003); falling back to copies, requested by access
1461: [gpu] host import budget: host heap 1 reports a VK_EXT_memory_budget budget of 8 MiB and a usage of 8 MiB with 0 MiB of imports live, which leaves imports 0 MiB of the 8192 MiB of the default; imports are held to it since an import's vkAllocateMemory failed
1461: [gpu] host import budget: host heap 1 reports a VK_EXT_memory_budget budget of 8 MiB and a usage of 8 MiB with 0 MiB of imports live, which leaves imports 0 MiB of the 4 MiB APS5_HOST_IMPORT_MIB sets; the setting stays, as the report never lowers it
1461: [gpu] host import of 0x55e9bce90000+0x10000 failed at vkAllocateMemory (-13); falling back to copies, requested by access
1461: [gpu] host import budget: host heap 1 reports a VK_EXT_memory_budget budget of 8 MiB and a usage of 8 MiB with 0 MiB of imports live, which leaves imports 0 MiB of the 8192 MiB of the default; the default stays until an import's vkAllocateMemory fails
1461: [gpu] host import of 0x55e9bce90000+0x10000 failed at vkAllocateMemory (-13); falling back to copies, requested by access
1461: [gpu] host import budget: host heap 1 reports a VK_EXT_memory_budget budget of 8 MiB and a usage of 8 MiB with 0 MiB of imports live, which leaves imports 0 MiB of the 8192 MiB of the default; imports are held to it since an import's vkAllocateMemory failed
1461: [gpu] host import budget: host heap 1 reports a VK_EXT_memory_budget budget of 8 MiB and a usage of 8 MiB with 0 MiB of imports live, which leaves imports 0 MiB of the 8192 MiB of the default; the default stays until an import's vkAllocateMemory fails
1461: [gpu] host import of 0x55e9bce30000+0x10000 failed at vkAllocateMemory (-2); falling back to copies, requested by access
1461: [gpu] host import budget: host heap 1 reports a VK_EXT_memory_budget budget of 8 MiB and a usage of 8 MiB with 0 MiB of imports live, which leaves imports 0 MiB of the 8192 MiB of the default; imports are held to it since an import's vkAllocateMemory failed
1461: [gpu] texture 0x7ffdb0f14b00 (format 74) has single DCC keys at 0x7ffdb0f14a80; its texels are read as stored
1461: [gpu] texture 0x7ffdb0f14b00 (format 56) has mixed DCC keys at 0x7ffdb0f14a80; its texels are read as stored
1461: [gpu] texture streaming feedback (LOD warning / mip statistics) is not reported
1461: [gpu] texture 0x27c000000 (format 22) has unreadable DCC keys at 0x91b002040000; its texels are read as stored
1461: [gpu] texture DCC color transform is ignored (word6=0x01980000 word7=0x00000000)
1461: [gpu] depth plane 0xa0000000+0x40000 was unmapped with GPU results pending; they are dropped
1461: content-key count=0 data=0 movable=0 words=70 capacity=70 hash=12276112778106431680
1461: content-key count=0 data=0 movable=1 words=70 capacity=70 hash=16547703523611771548
1461: content-key count=0 data=1 movable=0 words=327 capacity=327 hash=18195637788575597601
1461: content-key count=0 data=1 movable=1 words=70 capacity=70 hash=6884676608767608045
1461: content-key count=1 data=0 movable=0 words=89 capacity=89 hash=3582826753038562111
1461: content-key count=1 data=0 movable=1 words=89 capacity=89 hash=9518511843953525419
1461: content-key count=1 data=1 movable=0 words=346 capacity=346 hash=3684355951081846730
1461: content-key count=1 data=1 movable=1 words=89 capacity=89 hash=8486460719680651956
1461: content-key count=31 data=0 movable=0 words=389 capacity=389 hash=2872353339945041207
1461: content-key count=31 data=0 movable=1 words=389 capacity=389 hash=11292844791518677155
1461: content-key count=31 data=1 movable=0 words=646 capacity=646 hash=16275665856175105250
1461: content-key count=31 data=1 movable=1 words=389 capacity=389 hash=4084850990441387724
1461: content-key count=32 data=0 movable=0 words=399 capacity=399 hash=9001008430028590267
1461: content-key count=32 data=0 movable=1 words=399 capacity=399 hash=5471292191449946447
1461: content-key count=32 data=1 movable=0 words=656 capacity=656 hash=9565516749443825062
1461: content-key count=32 data=1 movable=1 words=399 capacity=399 hash=15118118974702537264
1461: content-key count=33 data=0 movable=0 words=418 capacity=418 hash=10382587997612106155
1461: content-key count=33 data=0 movable=1 words=418 capacity=418 hash=11706275810969384511
1461: content-key count=33 data=1 movable=0 words=675 capacity=675 hash=1776364597915029880
1461: content-key count=33 data=1 movable=1 words=418 capacity=418 hash=13690582611633829486
1461: content-key count=16384 data=0 movable=0 words=168518 capacity=168518 hash=15297671208421994211
1461: content-key count=16384 data=0 movable=1 words=168518 capacity=168518 hash=8322610684387165047
1461: content-key count=16384 data=1 movable=0 words=168775 capacity=168775 hash=13444188082477402620
1461: content-key count=16384 data=1 movable=1 words=168518 capacity=168518 hash=6566449801145079954
1461: Unused stencil reference sample equivalence passed: 22 accepted states, 12 dependent countermodels
1461: Stencil logic operations matched AND, OR, XOR and XNOR under the write mask for 310 register states
1461: All 256 MSAA CMASK byte classifications passed
1461: Sparse imported heap tests passed
1461: guest arena unavailable or not write-watched: heap mirrors not tested
1461: guest arena unavailable or not write-watched: heap mirrors of imported ranges not tested
1461: Graphics validation tests passed
2/2 Test #1461: agc_driver_graphics ..............   Passed    9.43 sec

The following tests passed:
	agc_driver_uint_color_target
	agc_driver_graphics

100% tests passed out of 2

Total Test time (real) =  13.08 sec

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

@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head 91eb850 merged onto main 3741ca9 · tested 2026-11-01 06:33 UTC · 32 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,427 passed · 6 failed (0 new, 3 also fail on main, 3 unstable on main) · 44 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,477 of 3,121 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 (930 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_lookup_log_fits_build 75.9 s, ⚠️ agc_driver_pipeline_journal 62.2 s, ⚠️ agc_driver_graphics_maps_fallback 40.3 s
Unstable on main (3, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_job_manager_compute_capacity: failed in 1 of the last 10 main runs
agc_submit_progress: failed in 6 of the last 10 main runs
agc_submit_progress_no_timeline: failed in 8 of the last 10 main runs
Failing on main too (3, not counted against this PR)
agc_driver_image_table
guest_mmap_executable
guest_socket_options_multicast
Validation IDs already present on main (5 IDs in 480 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (480 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 472 more
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_prepared_exports
VUID-VkShaderModuleCreateInfo-pCode-08737 (1 test): agc_driver_image_sample_derivatives
Skipped (44)
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_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_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_net_ctl: skipped, the host has no IPv4 address
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 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_main: 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_fresh: 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_f
Reproduce
git fetch origin 91eb8504f6e6f0ab0cc743b19ed815ebd3b976a8 3741ca9327246d0df81638726a986cef862b6db5
git checkout 3741ca9327246d0df81638726a986cef862b6db5 && git merge --no-ff 91eb8504f6e6f0ab0cc743b19ed815ebd3b976a8
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.

@MarcZX10 MarcZX10 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.

Re-checked — new head, paired validation evidence posted

The paired main and PR validation-layer runs requested in the earlier review are now in the thread at f0170da8b5, and the new half-float widening matches the binary16 layout for the cases I checked; I did not re-run the GPU tests.

What I ran

  • Head f0170da8b54b28f09530a01688a4298253a6f0f7 (commits 949abf859b and f0170da8b5). The earlier changes-requested review was at 91eb8504f6e6f0ab0cc743b19ed815ebd3b976a8, which is no longer on the branch.
  • Precheck base: b5f72708e5221b14ed5328eb2a51797eb2a4b1f9, the PR's base at review time. The live stack check reports the PR as mergeable.
  • No build, configure or compile.
python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 14243 --output-dir /dev/shm/reviewer-run-20261101-14243
python3 tools/pr_abi_audit.py --repo . --base b5f72708e5221b14ed5328eb2a51797eb2a4b1f9 --head f0170da8b54b28f09530a01688a4298253a6f0f7 --json
git archive f0170da8b54b28f09530a01688a4298253a6f0f7 core/libs | tar -x -C <scratch dir>
python3 -I tools/pr_test_quality.py --root <scratch dir> --json core/libs/prx/libSceAgcDriver/tests/Graphics.cpp core/libs/prx/libSceAgcDriver/tests/execution/UintColorTarget.cpp
gh pr diff 14243 --repo boykopovar/AnyPS5   (source read of the non-test hunks)

The precheck's ABI and test-quality helpers failed because the head tree has no tools/ directory, so both were run by hand as listed above.

Results

Check Result
Diff check Passed (precheck)
Conventions and PR template Passed (precheck)
Live dependency and mergeability Passed (precheck); mergeable
ABI audit (manual) Not applicable; 0 symbols, 0 findings
Test-quality heuristic (manual) Two possible-unregistered-cpp-test findings, both false positives. UintColorTarget.cpp is collected by the file(GLOB ... tests/execution/*.cpp) in core/libs/prx/libSceAgcDriver/CMakeLists.txt line 551; Graphics.cpp is an existing test source included by the AGC test build
Source check of WidenedHalfWord Consistent with IEEE binary16 for zero, subnormal, normal, infinity and NaN. The author's measured pairs (0x7c01 to 0x7fc02000, 0x7e00 to 0x7fc00000, 0x7fff to 0x7fffe000, 0xfe00 to 0xffc00000) match the formula
Hosted CI at f0170da8b5 Success: eligibility, conventions (second run), library-portability, labels, report, relinker (ubuntu, windows, both macOS), relinker-asan, windows. The first conventions run was cancelled. Skipped: register-context, write-watch, linux
Build and C++ tests Not run (no-build rule)

Author-reported, not re-run by me: a paired validation run on an RTX 4090 with NVIDIA 615.78.08, ctest -V with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, for agc_driver_uint_color_target and agc_driver_graphics on main 3ee28266a3 and on this PR. The comment reports both as passing, the requested-layer marker absent in both logs, and only the same VUID-vkCreateDevice-ppEnabledExtensionNames-01387 in both. It also reports the clamp-removal and widening-replacement negative controls failing on all three drivers.

Findings

Blocking: none found in the source paths I read.

Non-blocking:

  • The clamp is now exercised through FormatTests with UintClamp8 and UintClamp16 (tests/execution/UintColorTarget.cpp, lines 377-381 at head). I read the call sites but did not read the full test body, so the negative-control claims remain author-reported.

Sources

  • Widening, SpirvModuleEmitter.cpp line 672:
    std::uint32_t WidenedHalfWord(SpirvEmitterState& state, std::uint32_t half) {
    const auto u32 = TypeU32(state);
    const auto op = [&](spv::Op opcode, std::uint32_t lhs, std::uint32_t rhs) { return Binary(state, opcode, u32, lhs, rhs); };
    const auto is = [&](std::uint32_t value, std::uint32_t constant) { return Binary(state, spv::OpIEqual, TypeBool(state), value, ConstantU32(state, constant)); };
    const auto sign = op(spv::OpShiftLeftLogical, op(spv::OpBitwiseAnd, half, ConstantU32(state, 0x8000u)), ConstantU32(state, 16u));
    const auto exponent = op(spv::OpBitwiseAnd, op(spv::OpShiftRightLogical, half, ConstantU32(state, 10u)), ConstantU32(state, 0x1fu));
    const auto mantissa = op(spv::OpBitwiseAnd, half, ConstantU32(state, 0x3ffu));
    const auto fraction = op(spv::OpShiftLeftLogical, mantissa, ConstantU32(state, 13u));
    const auto normal = op(spv::OpBitwiseOr, op(spv::OpShiftLeftLogical, op(spv::OpIAdd, exponent, ConstantU32(state, 127u - 15u)), ConstantU32(state, 23u)), fraction);
    const auto quiet = Select(state, u32, is(mantissa, 0u), ConstantU32(state, 0u), ConstantU32(state, 0x400000u));
    const auto special = op(spv::OpBitwiseOr, op(spv::OpBitwiseOr, ConstantU32(state, 0x7f800000u), fraction), quiet);
    const auto msb = state.module.AllocateId();
    state.module.AddFunction(spv::OpExtInst, u32, msb, GlslStd450(state), GLSLstd450FindUMsb, op(spv::OpBitwiseOr, mantissa, ConstantU32(state, 1u)));
    const auto subnormal = op(spv::OpBitwiseOr, op(spv::OpShiftLeftLogical, op(spv::OpIAdd, msb, ConstantU32(state, 127u - 24u)), ConstantU32(state, 23u)), op(spv::OpBitwiseAnd, op(spv::OpShiftLeftLogical, mantissa, op(spv::OpISub, ConstantU32(state, 23u), msb)), ConstantU32(state, 0x7fffffu)));
    const auto small = Select(state, u32, is(mantissa, 0u), ConstantU32(state, 0u), subnormal);
    return op(spv::OpBitwiseOr, sign, Select(state, u32, is(exponent, 0u), small, Select(state, u32, is(exponent, 0x1fu), special, normal)));
    }
  • Format mapping, State.cpp lines 1023 and 1870:
    ShaderRecompiler::ColorExportPacking HalfExportPacking(VkFormat format) {
    if (format == VK_FORMAT_R8_UINT || format == VK_FORMAT_R8G8_UINT || format == VK_FORMAT_R8G8B8A8_UINT) return ShaderRecompiler::ColorExportPacking::UintClamp8;
    if (format == VK_FORMAT_R16_UINT || format == VK_FORMAT_R16G16_UINT || format == VK_FORMAT_R16G16B16A16_UINT) return ShaderRecompiler::ColorExportPacking::UintClamp16;
    return ShaderRecompiler::ColorExportPacking::Uint;
    }
    and
    if (slotExport == 4) color.packing = HalfExportPacking(color.format);

Not verified

  • No GPU run, validation-layer run or C++ test by me at f0170da8b5. The paired logs and negative controls above are author-reported.
  • The full body of UintColorTarget.cpp was not read line by line.
  • Hosted Linux and the specialized jobs were skipped on this head.

My earlier changes-requested review on 91eb8504f6 stays in place until a re-review of this head is complete.

@TechLevelZero

Copy link
Copy Markdown
Contributor

❌ NVIDIA GPU test: failed

PR head f0170da merged onto main e6f5730 · tested 2026-11-01 15:41 UTC · 28 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,435 passed · 7 failed (0 new, 3 also fail on main, 4 unstable on main) · 45 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,487 of 3,148 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ❌ 1 new validation ID(s) vs main (932 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.5 s, ⚠️ agc_driver_graphics_maps_fallback 32.3 s, ⚠️ agc_driver_graphics 32.2 s, ⚠️ agc_driver_lazy_resolved_abi_switch_set 30.8 s

New validation errors

This PR changes test files, so each test below was also run on main with only the PR's test changes applied; 0 there means the PR's other changes cause the error.

ID Test main e6f5730 main + this PR's test changes only PR PR, test re-run alone
VUID-vkCmdCopyBuffer-commonparent agc_driver_depth_clear_hle 0 not compared: tests do not build on main 6 6 (in 2 runs)
agc_driver_depth_clear_hle: new validation messages
VUID-vkCmdCopyBuffer-commonparent(ERROR / SPEC): msgNum: -1223163212 - Validation Error: [ VUID-vkCmdCopyBuffer-commonparent ] Object 0: handle = 0x7b658c0176e0, type = VK_OBJECT_TYPE_INSTANCE; | MessageID = 0xb71802b4 | vkCmdCopyBuffer(): srcBuffer (VkBuffer 0x3d900000003d9) was created, allocated or retrieved from VkDevice 0x5f489010d090[], but command is using (or its dispatchable parameter is associated with) VkDevice 0x7b658c16f1a0[]. The Vulkan spec states: Each of commandBuffer, dstBuffer, and srcBuffer must have been created, allocated, or retrieved from the same VkDevice (https://www.
VUID-vkCmdCopyBuffer-commonparent(ERROR / SPEC): msgNum: -1223163212 - Validation Error: [ VUID-vkCmdCopyBuffer-commonparent ] Object 0: handle = 0x7b658c0176e0, type = VK_OBJECT_TYPE_INSTANCE; | MessageID = 0xb71802b4 | vkCmdCopyBuffer(): dstBuffer (VkBuffer 0x3dd00000003dd) was created, allocated or retrieved from VkDevice 0x5f489010d090[], but command is using (or its dispatchable parameter is associated with) VkDevice 0x7b658c16f1a0[]. The Vulkan spec states: Each of commandBuffer, dstBuffer, and srcBuffer must have been created, allocated, or retrieved from the same VkDevice (https://www.
Unstable on main (4, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_depth_clear_hle: failed in 2 of the last 10 main runs
agc_driver_pipeline_journal: failed in 1 of the last 10 main runs
agc_submit_progress: failed in 6 of the last 10 main runs
agc_submit_progress_no_timeline: failed in 8 of the last 10 main runs
Failing on main too (3, not counted against this PR)
agc_driver_image_table
guest_mmap_executable
guest_socket_options_multicast
Validation IDs already present on main (5 IDs in 484 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (484 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 476 more
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_prepared_exports
VUID-VkShaderModuleCreateInfo-pCode-08737 (1 test): agc_driver_image_sample_derivatives
Skipped (45)
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_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_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_net_ctl: skipped, the host has no IPv4 address
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 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_main: 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_fps_limit: 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_o
Reproduce
git fetch origin f0170da8b54b28f09530a01688a4298253a6f0f7 e6f57307fa7f47165d7fc1bee945abdb2f6816e7
git checkout e6f57307fa7f47165d7fc1bee945abdb2f6816e7 && git merge --no-ff f0170da8b54b28f09530a01688a4298253a6f0f7
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
# the failing tests, on this merge and on main:
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc_driver_depth_clear_hle)$' --parallel 1 -V

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.

@Tamalero

Tamalero commented Nov 1, 2026

Copy link
Copy Markdown
Contributor Author

@TechLevelZero about the one new validation ID in the NVIDIA run at f0170da8b5: VUID-vkCmdCopyBuffer-commonparent in agc_driver_depth_clear_hle, a buffer used with a different VkDevice than the one that created it.

I could not reproduce it. On an RTX 4090 (NVIDIA 615.78.08, Linux 7.3) I ran ctest -V -R '^agc_driver_depth_clear_hle$' ten or twenty times per build, with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ANYPS5_NO_SHADER_CACHE=1 and ANYPS5_REQUIRE_VULKAN=1:

Build Passed VUID-vkCmdCopyBuffer-commonparent
main e6f57307fa (the bot's base) 20 of 20 0
this PR merged onto e6f57307fa 20 of 20 0
main 3ee28266a3 (the PR's base) 10 of 10 0
this PR f0170da8b5 10 of 10 0

Every run reports only VUID-vkCreateDevice-ppEnabledExtensionNames-01387, at device creation, on both sides.

The PR does not touch depth clears or buffer copies. Its shader change only applies to FP16_ABGR color exports. The bot's report also lists this test as unstable on main on that machine (2 of the last 10 runs). That points to an intermittent cross-device problem in the test, not to this change, but I can't rule out something specific to that GPU (RTX 2000 Ada, driver 595.99.02). A rerun there would settle it.

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

@BunnyFl BunnyFl 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.

Reads right, and I checked the widening exhaustively. I modelled WidenedHalfWord (core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp) instruction for instruction in Python and compared it, for all 65,536 half bit patterns, with an IEEE binary16-to-binary32 conversion that sets the NaN quiet bit: 0 mismatches. That includes subnormals (0x0001 -> 0x33800000), both zeros, both infinities and every NaN (0x7c01 -> 0x7fc02000, your example). The UMin clamp then gives what the description says: as unsigned words, +0.0 is 0 and every other half's pattern exceeds 0xffff, so 8- and 16-bit channels hold 0 or their maximum.

Tested on Windows 11, WinLibs GCC 15.2.0, with this head merged onto current main: agc_driver_graphics and agc_driver_uint_color_target pass, nothing skipped, the second on this machine's GPU. A negative control can't build: with main's recompiler and State.cpp the tests stop compiling at ColorExportPacking::UintClamp8, which only this PR adds.

@XairRrR XairRrR 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.

Reviewed — approved

FP16_ABGR exports into UINT targets now go through the Uint/UintClamp8/UintClamp16 packings with integer half widening. The change builds, its focused tests pass, the validation comparison shows no new VUIDs, and a partial negative control (emitter only) fails as expected.

What I ran

Head f0170da8b54b28f09530a01688a4298253a6f0f7, main 5cb015caaaaf83f8ee431414ee6a457b5b307d49, merged with --no-ff into tree c00dcd4c809fbce38f0647c802254ccf865c6e23. Debian 13 VM (Xeon Gold 6136, AVX2/FMA), GCC 14.2.0, Release/Ninja, Vulkan on lavapipe (Mesa 26.1.6, LLVM 19), no GPU.

git diff --check 5cb015caaaaf83f8ee431414ee6a457b5b307d49...f0170da8b54b28f09530a01688a4298253a6f0f7
python3 tools/check_conventions.py --base 5cb015caaaaf83f8ee431414ee6a457b5b307d49
ctest --test-dir build -j3 --output-on-failure -R "agc_driver_(image_sample_lod_clamp_shader_lane|uint_color_target|graphics)$"
# control 1: State.cpp, RequestSerializer.cpp, FragmentOutputSpecialization.hpp, Recompiler.hpp, SpirvModuleEmitter.cpp from main
ninja -C build -j32 -l32 libs agc_driver_image_sample_lod_clamp_tests
ctest --test-dir build --output-on-failure -R "agc_driver_image_sample_lod_clamp_shader_lane$"
ninja -C build -j32 -l32 agc_driver_uint_color_target_tests
# control 2: only SpirvModuleEmitter.cpp from main, the rest merged
ninja -C build -j32 -l32 libs agc_driver_uint_color_target_tests
ctest --test-dir build --output-on-failure -R "agc_driver_uint_color_target$"
build/tests/agc_driver_uint_color_target_tests
# restore the merged files, rebuild, re-run
ninja -C build -j32 -l32 libs agc_driver_uint_color_target_tests agc_driver_graphics_tests agc_driver_image_sample_lod_clamp_tests
ctest --test-dir build -j2 --output-on-failure -R "agc_driver_(uint_color_target|graphics)$"
git status --porcelain

Results

Check Result
git diff --check clean
check_conventions.py 0 errors, 1 debt-length warning on the UINT color targets entry (2,119 characters; it was already over the limit on main, as the description says)
Configure / build / libs (script) ok
agc_driver_uint_color_target passed (8.7 s)
agc_driver_graphics passed (33.6 s and 34.9 s here)
Validation-layer comparison with main (script, 759 tests) layer loaded in 758, missing in none, 0 tests with new VUIDs
New failure agc_driver_image_sample_lod_clamp_shader_lane comes from main, not this PR: it still fails with all five production files restored from main
New failure unwrap_self_..._destination_directory_group environment problem (os.chown → EINVAL in the sandbox's /tmp) in a tools/ Python test that this PR does not touch
fixed: unwrap_self listed by the script; not related to this change (the PR touches no tools/ file), most likely a baseline difference (baseline_sha 096c4557 ≠ main)
lod-clamp failure, same with main's production files
AGC graphics: image_sample_lz through the S# that holds the LOD at 0 with T# MIN_LOD 768 over BASE_LEVEL 0 with a second S# of words 1 0 and 2 5242880, and a second T# of MIN_LOD 0 and LAST_LEVEL 0: thread 0 component 1 is 0.000000, expected 0.062500

Negative control

  • All production files from main: the changed tests no longer compile ('UintClamp8' is not a member of 'ShaderRecompiler::ColorExportPacking', UintColorTarget.cpp:321). This matches what BunnyFl reported.
  • Only SpirvModuleEmitter.cpp from main, with the enum, serializer, specialization check and State.cpp from the PR: agc_driver_uint_color_target builds and fails on the first clamped draw. This matches the author's "clamp removed" row on llvmpipe:
output
a FP16_ABGR export of 0x38008000 0x7bff83ff 0x00000000 0x00000000 into a tiled R32_UINT target with packing 5: channel 0 of pixel (0, 0) written holds 0x80000000, expected 0x000000ff

I did not run a control for the widening alone (integer widening vs. UnpackHalf2x16). The author reports that llvmpipe passes either way, so on this machine that control could not tell the two apart.

After the controls I restored the merged files and rebuilt; git status --porcelain is empty and both tests pass again.

Findings

Blocking

None.

Non-blocking

  • Integer widening is emitted into every compressed FP16 pixel export (core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp:699, used with WidenedHalfWord at :676). words is created for every mode == 4 export, including those into float targets. Each enabled component then carries the full widening chain plus an OpSelect, and SelectExportPacking adds a UMin against 0xffffffff (:468). The specialization constant makes this dead code for float targets, so the results are correct. But it enlarges the SPIR-V of the most common export format, and how much the host compiler folds depends on the driver. Optional: note it, or check that pipeline-build time for FP16 float shaders does not regress.
  • R8G8_UINT and R16G16_UINT are not covered. They get UintClamp8/UintClamp16 (core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp:1024-1025), but neither the decode test nor the execution test uses them. They take the same path as the 1- and 4-channel formats, so this is minor.
  • agc_driver_graphics runs over 30 s here (33.6 s and 34.9 s on lavapipe), and the NVIDIA bot reported 32.2 s. This PR only adds five DecodeState calls to it, so the overrun is not caused here. It is still worth a separate split, per CONTRIBUTING's 30 s rule.

Other points I checked and found fine:

  • The enum values (Uint = 4, UintClamp8 = 5, UintClamp16 = 6) agree with the serializer bound, the SpecializeFragmentOutputs bound and the >= Uint comparison.
  • The blend is dropped before the packing is refined, at State.cpp:1881.
  • No other production check compares only against ColorExportPacking::Uint where the clamp variants would be missed.
  • There are no new code comments, and the debt entry was updated.
  • The checklist lines are present: Depends on, Fixes #11513, Unblocks, GPUs tested, AI-assisted.
  • The semantics name their source: RDNA2 measurements in #11513, with the console not measured, as the debt entry records.

On earlier reviews: I confirm oneandonlydean's request (the clamp test must hold whatever the driver does). With the shader clamp removed, the R32_UINT draws through UintClamp8 fail here. MarcZX10's non-blocking point about the clamp is resolved at this head.

Not verified

  • I did not run the widening-only control. llvmpipe cannot tell the two widenings apart, and there is no RADV or NVIDIA here.
  • I did not repeat the hardware measurements or test on a console. I did not re-run the paired validation run on NVIDIA; the script's lavapipe comparison shows no new VUIDs.
  • I did not investigate the agc_driver_depth_clear_hle VUID from the NVIDIA bot. The PR does not touch that path, and lavapipe shows no new VUIDs.
  • I did not measure the cost of the extra SPIR-V for FP16 float-target shaders.

@oneandonlydean oneandonlydean self-assigned this Nov 3, 2026
@oneandonlydean
oneandonlydean merged commit 6e08dc3 into boykopovar:main Nov 3, 2026
15 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* docs fix error Closes an issue (Fixes #N) shader core/shader unblocks title Names a title ID on the Unblocks line

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GTA V (PPSA04264) stops before the menu: color export format 4 into an unsigned integer target is unsupported

6 participants