Repository navigation
fix(agc): match the measured CB conversion of 11_11_10 float color targets - #23206
oneandonlydean merged 1 commit into
Conversation
|
Real-AMD coverage — the 11_11_10 float CB conversion (including the new NaN-payload cases and the
You measured the CB conversion on RDNA2; this confirms the same decode ( AI-assisted: yes |
|
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 Environment:
The two failures on
So on NVIDIA's Windows driver the CB writes the NaN pattern Not run: the full suite, NaN through a blend or partial write. AI-assisted: yes |
MarcZX10
left a comment
There was a problem hiding this comment.
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.
|
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.
|
|
Ran it on NVIDIA and Windows, which the description lists as not tested: head
AI-assisted: yes (Claude Code) |
|
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
The two packed-float tests create a device on the 4090 ( Negative control: this PR's tests with No new AI-assisted: yes (Claude Code) |
|
Hardware test report: RTX 4070 (Windows)
AI-assisted: yes. Results are from one machine and one GPU only. |
…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.
5bdd418 to
8b49658
Compare
|
Rebased onto At the new heads, on the RX 7900 XT and the 7800X3D iGPU:
AI-assisted: yes |
MarcZX10
left a comment
There was a problem hiding this comment.
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.
|
AMD's Windows driver (LLPC) gives the measured values too. Setup: Windows 10 22H2, AMD Radeon RX 9070 XT (RDNA4,
AI-assisted: yes (Claude Code) |
|
Tested head Setup: Windows 11 Pro 10.0.26200, Ryzen 7 9800X3D, WinLibs GCC 15.2.0 r7, Release,
Whole batch: the full This is one combined tree, not a run of this PR alone. AI-assisted: yes (Claude Code) |
malekaifa
left a comment
There was a problem hiding this comment.
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
What
Two changes to 11_11_10 float color targets, both from one measurement of the CB on RDNA2:
CB_COLOR_INFO.ROUND_MODEclear decodes like one with it set. The refusalrounding (ROUND_MODE 0) 11_11_10 float color targets are unsupported(a518a90) assumed the bit makes the CB round. It doesn't.0x3f0(10-bit field) or0x7e0(11-bit field) for every NaN.PackExportused to keep the top payload bits, asF32BitsToSmallFloatRtzdoes 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:ROUND_MODE0ROUND_MODE10x3df/0x7bf0x3e0/0x7c00x7f800001,0x7fa00000,0x7fe00000,0x7fffffff,0xff800001and 4 more0x3f0/0x7e0The same NaNs drawn into an
R32_SFLOATtarget come back unchanged, so the CB is what rewrites them.SIMPLE_FLOATandBLEND_BYPASSchange nothing. On a 4_4_4_4 UNORM target in the same setupROUND_MODE0 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,
main533edafcac.agc_driver_packed_float_color_targetgains two NaN payload cases and aROUND_MODE0 pass.agc_graphics_profile_drawnow decodes theROUND_MODE0 target instead of expecting the refusal.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, androunding (ROUND_MODE 0) 11_11_10 float color targets are unsupported.agc_driver_packed_float_blend, run withANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layerandctest -V: 3/3 on both GPUs, layer 1.4.363.1 inserted, 0VUID-lines on this PR and onmainf15df3256c.ctest -R '^agc'(1936 tests): the failures matchmain'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
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)