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

Merged
Tamalero merged 2 commits from upstream-pr/14243 into main 2026-11-03 08:08:32 +00:00
Tamalero commented 2026-11-01 03:34:20 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Tamalero on 2026-11-01T03:34:20Z.


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 #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

  • Based on current main; no other open PR implements the same functions (#6235 carries the attachment numeric type for the raw 32-bit modes; it does not cover FP16_ABGR)
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: Fixes #11513
  • Unblocks: PPSA01748 start-up. PPSA04264, PPSA17221 and PPSA05496 stop on the same check (#11513) but were not run here
  • GPUs tested: NVIDIA GeForce RTX 4090 (615.78.08, Linux 7.3 CachyOS); AMD Radeon PRO V620 (RADV Mesa 25.2.8, Ubuntu 24.04); llvmpipe (Mesa 25.2.8, Ubuntu 24.04)
  • AI-assisted: yes

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

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5104040971 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14243). Originally posted by [Tamalero](https://github.com/Tamalero) on 2026-11-01T03:34:20Z. --- ### 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 #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 - [x] Based on current `main`; no other open PR implements the same functions (#6235 carries the attachment numeric type for the raw 32-bit modes; it does not cover `FP16_ABGR`) - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: Fixes #11513 - [x] Unblocks: PPSA01748 start-up. PPSA04264, PPSA17221 and PPSA05496 stop on the same check (#11513) but were not run here - [x] GPUs tested: NVIDIA GeForce RTX 4090 (615.78.08, Linux 7.3 CachyOS); AMD Radeon PRO V620 (RADV Mesa 25.2.8, Ubuntu 24.04); llvmpipe (Mesa 25.2.8, Ubuntu 24.04) - [x] AI-assisted: yes *Tested and written by Claude (AI assistant) on a contributor's machine.* 🤖 Generated with [Claude Code](https://claude.com/claude-code)
MarcZX10 commented 2026-11-01 04:03:13 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-01T04:03:13Z.

Review: CHANGES_REQUESTED


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.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5726327163 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14243#pullrequestreview-5726327163). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-01T04:03:13Z. **Review:** CHANGES_REQUESTED --- # 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. ```sh 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. | <details><summary>Raw output excerpts</summary> Precheck conventions output: ```text All conventions checks passed. ``` Windows relinker CTest output: ```text 99% tests passed, 1 tests failed out of 550 The following tests FAILED: 33 - annotate_module (Timeout) ``` </details> ## 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 - [Paired validation requirement at the PR base](https://github.com/boykopovar/AnyPS5/blob/6135e61f4538611fc82aeb69dbf73f36221b1aec/CONTRIBUTING.md#L73) - [Packing selection at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/91eb8504f6e6f0ab0cc743b19ed815ebd3b976a8/core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp#L1014-L1025) - [Shader clamp at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/91eb8504f6e6f0ab0cc743b19ed815ebd3b976a8/core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp#L453-L475) - [Changed execution assertions at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/91eb8504f6e6f0ab0cc743b19ed815ebd3b976a8/core/libs/prx/libSceAgcDriver/tests/execution/UintColorTarget.cpp#L297-L375) - [PR description with the author-reported GPU runs and clamp control](https://github.com/boykopovar/AnyPS5/pull/14243) ## 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.
MarcZX10 commented 2026-11-01 09:17:31 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-01T09:17:31Z.

Review: COMMENTED


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

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.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5727347386 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14243#pullrequestreview-5727347386). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-01T09:17:31Z. **Review:** COMMENTED --- # 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. ```sh 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: https://github.com/boykopovar/AnyPS5/blob/f0170da8b54b28f09530a01688a4298253a6f0f7/core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp#L672-L689 - Format mapping, `State.cpp` lines 1023 and 1870: https://github.com/boykopovar/AnyPS5/blob/f0170da8b54b28f09530a01688a4298253a6f0f7/core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp#L1023-L1027 and https://github.com/boykopovar/AnyPS5/blob/f0170da8b54b28f09530a01688a4298253a6f0f7/core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp#L1870 ## 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.
BunnyFl commented 2026-11-02 22:36:25 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by BunnyFl on 2026-11-02T22:36:25Z.

Review: APPROVED


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.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5744410027 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14243#pullrequestreview-5744410027). Originally posted by [BunnyFl](https://github.com/BunnyFl) on 2026-11-02T22:36:25Z. **Review:** APPROVED --- 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 commented 2026-11-02 23:08:12 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-02T23:08:12Z.

Review: APPROVED


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.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5744721055 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14243#pullrequestreview-5744721055). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-11-02T23:08:12Z. **Review:** APPROVED --- # 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. ```sh 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`) | <details><summary>lod-clamp failure, same with main's production files</summary> ``` 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 ``` </details> ## 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: <details><summary>output</summary> ``` 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 ``` </details> 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. <!-- anyps5-bots job=2678 head=f0170da8b54b28f09530a01688a4298253a6f0f7 -->
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!14243
No description provided.