Skip to content

fix(agc): match the measured CB conversion of 11_11_10 float color targets - #23206

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
Colewiz7:fix/agc-11-11-10-float-cb-conversion
Nov 29, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
Colewiz7:fix/agc-11-11-10-float-cb-conversion

Conversation

@Colewiz7

Copy link
Copy Markdown
Contributor

What

Two changes to 11_11_10 float color targets, both from one measurement of the CB on RDNA2:

  • A target with CB_COLOR_INFO.ROUND_MODE clear decodes like one with it set. The refusal rounding (ROUND_MODE 0) 11_11_10 float color targets are unsupported (a518a90) assumed the bit makes the CB round. It doesn't.
  • The packed export writes 0x3f0 (10-bit field) or 0x7e0 (11-bit field) for every NaN. PackExport used to keep the top payload bits, as F32BitsToSmallFloatRtz does for image stores, which this PR leaves unchanged.

Measured on a 7800X3D iGPU (gfx1036) with a local Mesa 26.0.6 RADV patched to force COLOR_11_11_10, RB+ off (gfx1013 has none) and 32_ABGR exports:

export ROUND_MODE 0 ROUND_MODE 1
65,536 random floats per channel, 2^-20 to 2^16 truncated, all truncated, all
65024 to 1e10 0x3df / 0x7bf same
+inf 0x3e0 / 0x7c0 same
-inf, -1, -0, 1e-30 0 same
NaN 0x7f800001, 0x7fa00000, 0x7fe00000, 0x7fffffff, 0xff800001 and 4 more 0x3f0 / 0x7e0 same

The same NaNs drawn into an R32_SFLOAT target come back unchanged, so the CB is what rewrites them. SIMPLE_FLOAT and BLEND_BYPASS change nothing. On a 4_4_4_4 UNORM target in the same setup ROUND_MODE 0 rounds and 1 truncates, so the bit itself works. The resolve of this format, measured with the same probe, is in #11362.

Tested

Linux 7.3.4, GCC 16.2.1 Release, Mesa 26.2.6 RADV, main 533edafcac.

  • agc_driver_packed_float_color_target gains two NaN payload cases and a ROUND_MODE 0 pass. agc_graphics_profile_draw now decodes the ROUND_MODE 0 target instead of expecting the refusal.
  • With main's sources both fail on both GPUs: a 32_ABGR export of (nan, nan, nan) into a tiled 11_11_10 float target: pixel (0, 0) inside the scissor holds 0xfa1f07ff, expected 0xfc1f83f0, and rounding (ROUND_MODE 0) 11_11_10 float color targets are unsupported.
  • Those two and agc_driver_packed_float_blend, run with ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer and ctest -V: 3/3 on both GPUs, layer 1.4.363.1 inserted, 0 VUID- lines on this PR and on main f15df3256c.
  • ctest -R '^agc' (1936 tests): the failures match main's exactly on each GPU.

Not tested: gfx1013, Windows, NVIDIA, and NaN through a blend or partial write, which goes through the same PackExport.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt and the licence notice of code adapted from upstream (see AGENTS.md)
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: AMD Radeon RX 7900 XT (RADV NAVI31) and AMD Ryzen 7 7800X3D iGPU (RADV RAPHAEL_MENDOCINO), Mesa 26.2.6, Linux 7.3.4
  • AI-assisted: yes

@tablefrogpillow

Copy link
Copy Markdown
Contributor

Real-AMD coverage — the 11_11_10 float CB conversion (including the new NaN-payload cases and the ROUND_MODE 0 pass) holds across GCN5, RDNA2 and RDNA3. agc_driver_packed_float_color_target, head 5bdd418f, Khronos validation 1.4.363, ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1:

GPU arch result
RX Vega 56 (RADV VEGA10, gfx900, Wave64) GCN5 Pass, 0 VUID
Ryzen 7000 iGPU (RADV RAPHAEL, gfx1036) RDNA2 Pass
RX 7900 GRE (RADV NAVI31, gfx1100) RDNA3 Pass, 0 VUID
lavapipe SW Pass

You measured the CB conversion on RDNA2; this confirms the same decode (ROUND_MODE 0 == set, and the NaN payloads) on GCN5 and RDNA3 too. On Vega the float-controls probes were clean (f32→f16 NaN native, 0 differing probe results). Worth having since float-format packing and NaN handling is a spot GCN5 can diverge from RDNA.

AI-assisted: yes

@CIS-C0

CIS-C0 commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Windows and NVIDIA, which the description lists as not tested.

Setup: Windows 11 Enterprise 10.0.28000, i5-11400F, NVIDIA GeForce RTX 2060 (Turing, device 0x1f08), driver 610.88, WinLibs GCC 15.2.0 r7, Ninja, Release, BUILD_TESTING=ON. Base main 4bc85f4dd9; this PR's head 5bdd418f61 applied with git apply.

Environment: ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation (layer 1.4.363.1), VK_LOADER_DEBUG=layer, ctest -V. Every run selected the RTX 2060, and every log shows the loader inserting the layer with no was not found line.

agc_driver_packed_float_color_target, agc_graphics_profile_draw, agc_driver_packed_float_blend:

build runs result VUID
main 3 3/3 pass each run 0
main sources + this PR's tests only 2 packed_float_blend passes; the other two fail each run 0
this PR 3 3/3 pass each run 0

The two failures on main sources are the ones in the description, word for word:

  • a 32_ABGR export of (nan, nan, nan) into a tiled 11_11_10 float target: pixel (0, 0) inside the scissor holds 0xfa1f07ff, expected 0xfc1f83f0
  • rounding (ROUND_MODE 0) 11_11_10 float color targets are unsupported

So on NVIDIA's Windows driver the CB writes the NaN pattern PackExport now produces, and the ROUND_MODE 0 target decodes, with no validation messages.

Not run: the full suite, NaN through a blend or partial write.

AI-assisted: yes

@github-actions github-actions Bot added shader core/shader docs agc libSceAgc* labels Nov 18, 2026

@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 — looks good

Nothing blocks this change; the implementation and added test cases are consistent with the stated measured behavior.

What I ran

Reviewed head 5bdd418f61a2f809ddb5272ccc5aa099ccbc41fc against the prepared diff. I did not run programmatic checks. The author reports running GPU tests and the agc suite; those results were not independently verified.

Results

Check Result Note
Diff and changed code passed Reviewed all changed lines
Tests not run Author-reported results only

Findings

Blocking

None.

Non-blocking

None.

Not verified

I read core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp, core/libs/prx/libSceAgcDriver/tests/Graphics.cpp, core/libs/prx/libSceAgcDriver/tests/execution/PackedFloatColorTarget.cpp, core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp, and docs/dev/debt/changes/agc-11-11-10-float-cb-conversion.md. The included changed lines and targeted context were inspected. files.json was not available from the reader; the manifest/listing identify core/libs/prx/libSceAgcDriver/tests/Graphics.cpp as excluded from the review folder, so I read its changed hunk through the pinned reader. GPU behavior, other vendors and platforms, and the reported test runs were not independently verified. No negative control was run.

To get this to a good state

Nothing is required.

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 1395 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 4040 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 5925 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6188 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
PR 6235 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
PR 6280 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6481 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6808 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 7256 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 7642 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
PR 8246 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 9335 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 9356 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
PR 9387 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
PR 9508 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
PR 9712 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 9895 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 9897 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 9915 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 10193 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
PR 10351 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
PR 11483 core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
PR 11551 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
PR 11825 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 12944 core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
PR 13928 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
PR 13929 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
PR 14032 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 14473 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 14944 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 15570 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 17056 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 17611 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
PR 19821 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
PR 20010 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
PR 20153 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 20728 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 20845 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 21960 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 22424 core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
PR 22514 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
PR 23243 core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
PR 23244 core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
PR 23252 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 23553 core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
PR 23818 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 24083 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 24327 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 24704 core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
PR 24781 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 25010 core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
PR 25534 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 25557 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 25684 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
PR 26084 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 26197 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 26630 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
PR 26706 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 27698 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 28142 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp

@Colewiz7

Copy link
Copy Markdown
Contributor Author

The overlap with #23225 is only in the PackedFloatColorTarget.cpp fixture: both PRs change DecodeTarget and main there, for unrelated new cases. Either can merge first, and I'll rebase this one if #23225 lands before it. #23258 and #23281 build on this PR.

AI-assisted: yes

@zarmstrong

Copy link
Copy Markdown
Contributor

Ran it on NVIDIA and Windows, which the description lists as not tested: head 5bdd418f61 merged onto main 3ead3ea870, with main itself as the baseline. NVIDIA GeForce RTX 5090, driver 621.01, Windows 11 Pro 26200, WinLibs GCC 15.2.0 r7, Ninja, Release, with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation (1.4.363) and VK_LOADER_DEBUG=layer.

  • agc_driver_packed_float_color_target, agc_driver_packed_float_blend, agc_graphics_profile_draw and the three agc_driver_packed_unorm4444_* tests pass on both sides, and 3/3 on this PR with --repeat until-fail:3.
  • Red check: with only SpirvModuleEmitter.cpp reverted to main, agc_driver_packed_float_color_target fails with the message in the description: a 32_ABGR export of (nan, nan, nan) into a tiled 11_11_10 float target: pixel (0, 0) inside the scissor holds 0xfa1f07ff, expected 0xfc1f83f0.
  • The layer was inserted in every Vulkan test, there were no was not found but was requested lines, and neither side logged VUID- or SYNC-HAZARD-.

AI-assisted: yes (Claude Code)

@domx4q

domx4q commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Ran the three tests from the Tested section with the Khronos validation layer on Linux and an NVIDIA GPU, which the description lists as not tested.

Setup: Arch Linux (kernel 7.3.4), GCC 16.2.1, Release, NVIDIA GeForce RTX 4090 (vendor 0x10de, device 0x2684, Ada), proprietary driver 620.70.06, Vulkan 1.4.357, Khronos validation layer 1.4.363.1. Head 5bdd418f61 merged onto main ded746ea12 with --no-ff, clean merge. Main baseline is a Release build of ded746ea12 on the same machine.

ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer \
ctest --test-dir build -R '^agc_(driver_packed_float_color_target|graphics_profile_draw|driver_packed_float_blend)$' -V
main ded746ea12 this PR
Result 3 of 3 passed 3 of 3 passed
Insert instance layer "VK_LAYER_KHRONOS_validation" 2 2
was not found but was requested by env var VK_INSTANCE_LAYERS 0 0
VUID- none none

The two packed-float tests create a device on the 4090 (Selected GPU name=NVIDIA GeForce RTX 4090 vendor=0x10de device=0x2684 subgroup=32); agc_graphics_profile_draw creates none, so it inserts no layer on either side. The new NaN payload cases and the ROUND_MODE 0 pass of agc_driver_packed_float_color_target pass on the 4090.

Negative control: this PR's tests with State.cpp and SpirvModuleEmitter.cpp from main fail 0 of 2, with the same messages as in the Tested section:

a 32_ABGR export of (nan, nan, nan) into a tiled 11_11_10 float target: pixel (0, 0) inside the scissor holds 0xfa1f07ff, expected 0xfc1f83f0
AGC graphics: rounding (ROUND_MODE 0) 11_11_10 float color targets are unsupported

No new VUID- errors; all focused tests pass on Ada.

AI-assisted: yes (Claude Code)

@Gruzzberry

Copy link
Copy Markdown
Contributor

Hardware test report: RTX 4070 (Windows)

  • GPU: NVIDIA GeForce RTX 4070 (10de:2786), driver 610.88, Vulkan 1.4.341
  • OS/toolchain: Windows 11 build 26200, WinLibs GCC 15.2.0 r7, Release, -DBUILD_TESTING=ON
  • Base: main at fbaae8a79d; PR head 5bdd418f61 merged onto it
  • Env: ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, VK_LOADER_DEBUG=layer
  • Validation layer: 1.4.363 (>= 1.4.335). The OBS and Overwolf implicit layers were disabled for these runs.
  • Each log shows Insert instance layer "VK_LAYER_KHRONOS_validation" and none contains was not found but was requested by env var VK_INSTANCE_LAYERS.

ctest -R ^agc_driver_packed_float_color_target$ -V: passed on main and on this PR, 0 VUID- lines in both.

agc_driver_graphics also passes on both, but its log shows no layer insertion, so it is not counted as validation evidence here.

AI-assisted: yes. Results are from one machine and one GPU only.

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Nov 19, 2026
…rgets

Measured on RDNA2 (gfx1036 under RADV, COLOR_11_11_10, RB+ off, 32_ABGR
exports), the CB truncates an 11_11_10 float export toward zero whether
CB_COLOR_INFO.ROUND_MODE is set or clear, and writes 0x3f0 or 0x7e0 for
every NaN whatever its payload. ROUND_MODE 0 targets are no longer
refused, and the packed export writes those NaN fields instead of the
payload's top bits.
@Colewiz7
Colewiz7 force-pushed the fix/agc-11-11-10-float-cb-conversion branch from 5bdd418 to 8b49658 Compare November 20, 2026 02:15
@Colewiz7

Copy link
Copy Markdown
Contributor Author

Rebased onto main d50640e264 after #23225 merged. The one conflict was in PackedFloatColorTarget.cpp: DecodeTarget now takes both the ROUND_MODE flag from this stack and #23225's sample count, and the test runs both ResolveTests and the ROUND_MODE 0 pass.

At the new heads, on the RX 7900 XT and the 7800X3D iGPU:

  • agc_driver_packed_float_color_target, agc_driver_packed_unorm4444_color_target, agc_driver_packed_unorm_color_target and agc_graphics_profile_draw, plus the resolve tests, pass with the Khronos validation layer, 0 VUID- lines.
  • ctest -R '^agc' (1965 tests): the only failure is agc_driver_image_table_packed_guards, which fails on main too.

AI-assisted: yes

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 20, 2026

@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 — looks good

Nothing blocks this change; the author’s measurements and the inspected implementation support the stated behavior.

What I ran

Reviewed head 8b49658de9df5881f6e599ddd3ef55258e99fdbd using repo_read.py. No commands or tests were run.

Results

Check Result Note
Change review passed Inspected all changed files
Tests not run Results in the PR description are author reported

Findings

Blocking

None.

Non-blocking

None.

Not verified

Did not run tests or independently verify the reported GPU measurements. The PR reports testing on two AMD GPUs; gfx1013, Windows, NVIDIA, and NaN through blending or partial writes were not tested by the author. Read: State.cpp, Graphics.cpp (changed lines), PackedFloatColorTarget.cpp, SpirvModuleEmitter.cpp, and agc-11-11-10-float-cb-conversion.md. No changed files were excluded from review; Graphics.cpp was read at its changed lines only. files.json was not available as a review-folder document.

To get this to a good state

Nothing is required.

@AbuMshMsh24

Copy link
Copy Markdown
Contributor

AMD's Windows driver (LLPC) gives the measured values too. Setup: Windows 10 22H2, AMD Radeon RX 9070 XT (RDNA4, 0x1002:0x7550), AMD Software 26.11.2 (32.0.32029.2010), WinLibs GCC 15.2.0 r7, Release, ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1, Khronos validation layer 1.4.363.1 inserted. Head 8b49658de9 merged onto main 42f6354612 with --no-ff (clean).

  • agc_driver_packed_float_color_target, agc_driver_graphics and the other packed-float tests from the description pass on main and on this PR, 0 VUID-.
  • With the PR's production files from main and its tests, agc_driver_packed_float_color_target fails 3 of 3: a 32_ABGR export of (nan, nan, nan) into a tiled 11_11_10 float target: pixel (0, 0) inside the scissor holds 0xfa1f07ff, expected 0xfc1f83f0. So the shader-side conversion is what produces the measured values on this driver as well.

AI-assisted: yes (Claude Code)

@kiwe147

kiwe147 commented Nov 21, 2026

Copy link
Copy Markdown

Tested head 8b49658de9, applied with git apply on main fd4aeed483 together with the other 26 PRs of one batch (#24498, #24665, #17297, #21499, #21726, #22534, #12900, #17843, #22051, #22075, #23087, #23222, #23227, #13147, #17482, #21935, #17477, #18272, #22858, #22929, #23028, #23295, #23916, #24179, #24706, #12619). All applied without conflicts and the whole tree built.

Setup: Windows 11 Pro 10.0.26200, Ryzen 7 9800X3D, WinLibs GCC 15.2.0 r7, Release, BUILD_TESTING=ON. GPUs: NVIDIA GeForce RTX 3080 (driver 621.24) and the AMD Radeon iGPU of the CPU (gfx1036, driver 32.0.21036.18). No validation layer. iGPU run: ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 ANYPS5_GPU="AMD Radeon", agc_/video tests only.

tests RTX 3080 iGPU
agc_driver_graphics, agc_driver_graphics_dump_graphics, agc_driver_packed_float_color_target and 6 more (9 tests, matched by name to the test file this PR changes) all pass all pass

Whole batch: the full ctest -j 12 (6525 tests) on the RTX 3080 has 8 failing tests; the 4 that also fail on main fd4aeed483 are agc_driver_stencil_plane_memory, agc_driver_msaa_dcc_unwatch, agc_storage_write_back_host_retile, and pr_overlap_names, which needs a newer Python than my 3.10. Intermittent in this run (pass when rerun alone, or known flaky): agc_driver_store_over_untracked. Traced to other PRs of the batch, each by reverting it and testing again: #18272 (guest_audio_out), #12900 (guest_user_service_initial_user_bounds); none is in this PR's area. Failing tests I could not trace to a single PR (reverting the likely candidates did not clear them): guest_content_search. The 2125 agc_/video tests on the iGPU have 2 failing: agc_driver_stencil_plane_memory, agc_driver_store_over_untracked (agc_driver_stencil_plane_memory also fails on main).

This is one combined tree, not a run of this PR alone.

AI-assisted: yes (Claude Code)

@malekaifa malekaifa 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 exact head 8b49658de9df5881f6e599ddd3ef55258e99fdbd.

The production delta is narrowly scoped and matches the measured CB behavior. Removing the ROUND_MODE 0 refusal is backed by the same truncating conversion on both bit values, while the shader-side NaN canonicalization is restricted to Format10_11_11Float color exports: the unsigned-NaN test uses abs(bits) > 0x7f800000, so positive and negative NaNs both select the canonical field, and (0x1f << mantissaBits) | (1 << (mantissaBits - 1)) produces the measured 0x3f0 10-bit and 0x7e0 11-bit encodings. Image-store conversion remains unchanged.

The regression covers multiple NaN payload/sign patterns and the formerly rejected ROUND_MODE 0 path. Independent AMD evidence exists on Linux/RADV and Windows/LLPC, including an old-production negative control for the NaN result; the focused packed-float tests pass on the exact head, and all hosted exact-head checks are terminal/successful (with the unrelated matrix jobs intentionally skipped). MarcZX10 also approved this exact head.

No blocking finding from me.

AI-assisted: yes

@oneandonlydean
oneandonlydean merged commit e89b87a into boykopovar:main Nov 29, 2026
16 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* docs shader core/shader

Projects

None yet

Development

Successfully merging this pull request may close these issues.