Repository navigation
feat(agc): sample and store unsigned 10_11_11 and 2_10_10_10 images - #15450
oneandonlydean merged 1 commit into
Conversation
✅ AMD GPU test: passedPR head
Unstable on main (2, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (8, not counted against this PR)Validation IDs already present on main (4 IDs in 517 tests)Skipped (57)ReproduceAutomated build and test on a contributor's AMD machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs. |
dc1c698 to
596a855
Compare
✅ NVIDIA GPU test: passedPR head
Unstable on main (2, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (3, not counted against this PR)Validation IDs already present on main (4 IDs in 520 tests)Skipped (48)ReproduceAutomated 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. |
✅ NVIDIA GPU test: passedPR head
Unstable on main (3, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (3, not counted against this PR)Validation IDs already present on main (8 IDs in 535 tests)Skipped (50)ReproduceAutomated 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. |
✅ AMD GPU test: passedPR head
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (7, not counted against this PR)Validation IDs already present on main (8 IDs in 535 tests)Skipped (60)ReproduceAutomated build and test on a contributor's AMD machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs. |
|
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.
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.
|
Route image codes 37/41 and 44/48 through existing R32_UINT packed conversion, preserving integer results and shader UNORM conversion. Extend converted UNORM sampling modes and retain their restrictions. Typed-buffer conversions remain unchanged. Layouts follow Mesa 418c4cfa6708a0e0b1175e72fb8fd27d3ca1615a: https://gitlab.freedesktop.org/mesa/mesa/-/blob/418c4cfa6708a0e0b1175e72fb8fd27d3ca1615a/src/amd/registers/gfx10-rsrc.json https://gitlab.freedesktop.org/mesa/mesa/-/blob/418c4cfa6708a0e0b1175e72fb8fd27d3ca1615a/src/amd/common/gfx10_format_table.py The generator reverses register names into little-endian channel order: 37/41 have widths 10/11/11 at offsets 0/10/21; 44/48 have widths 2/10/10/10 at offsets 0/2/12/22. AMD RDNA2 ISA section 8.2.8, Table 47, printed pages 78-79, lists 44/48 for images and buffers, but omits 37/41 and existing 30/34: https://docs.amd.com/v/u/en-US/rdna2-shader-instruction-set-architecture Record the omission and unverified AMD/PS5 behavior in debt. Execution tests cover every packed bit, boundaries, DMASK, swizzles, UINT point samples, UNORM point/bilinear samples, guest-byte stores and guards. Integer/endpoints are exact; shader UNORM fractions allow 3 ULP and bilinear interpolation uses the existing 1e-5 tolerance. Both requested offset mutations fail at their first affected bit. Linux lavapipe (Mesa 26.0.8, LLVM 21.1.8), Khronos validation enabled: main with final tests: existing case passes, four new cases fail; change: all five focused cases pass, no VUIDs or skips in either log. Wider image/format/buffer/texture suite: 81 passed. Public-header validation and all 64 compilation cases pass. Conventions checks pass. Progress: sampled 81 -> 85, host 68 -> 72, typed buffer stays 80. NVIDIA RTX 3060 and AMD/PS5 hardware verification remain outstanding. AI-assisted: yes
596a855 to
c652dd8
Compare
|
Independent Linux check of head
The four Both devices/revisions used required Vulkan, disabled shader cache, explicit ICDs and I also checked coexistence with our #17623 head From #17623's side, I'm happy with #14628 → #15450 → #17623, matching your existing prerequisite. I'll handle our preserving rebase after those land. Our PR stays draft while the other format overlaps are coordinated. Thanks, Alex. AI-assisted validation and reporting: yes (Codex). |
|
Thanks for the independent check on both devices, and for testing coexistence with #17623. The order #14628, then this PR, then #17623 works on this side; this PR keeps its current scope (unsigned codes 37, 41, 44 and 48 only), so the shared table, helper and mapping lines should stay a keep-both rebase for #17623. |
What
Supports guest image format codes 37 and 41 (unsigned 10_11_11, UNorm and UInt) and 44 and 48 (unsigned 2_10_10_10, UNorm and UInt) for sampling, loads and stores. Before this PR they were unsupported image formats.
Layout. Codes 37 and 41 have X, Y and Z fields 10, 11 and 11 bits wide at bits 0, 10 and 21. Codes 44 and 48 have X, Y, Z and W fields 2, 10, 10 and 10 bits wide at bits 0, 2, 12 and 22.
src/amd/registers/gfx10-rsrc.json), whose namessrc/amd/common/gfx10_format_table.pyreverses into little-endian component order.Mapping.
R32_UINT, the same host format codes 30, 34, 36 and 43 already use. The shader unpacks the bitfields with the existing typed-buffer bitfield conversion.Debt. The
docs/dev/debt/libSceAgcDriver.mdandshader.mdentries say that none of the four codes, nor their store rounding, is measured on AMD or PS5 hardware.The progress scan's format coverage moves from sampled 81 to 85 and host 68 to 72, with typed buffer unchanged at 80.
Tested
agc_driver_image_unsigned_packed32_{37,41,44,48}(tests/execution/ImageConvertedUnorm.cpp). For each code, the test:XYZW, a reversed swizzle andX011;maindoes for 10_11_11. Following fedf3e9, it doesn't pin gathers, border sampling or D16 as refused;Integers and UNorm endpoints must be exact. UNorm fractions allow 3 ULP, and bilinear samples use the existing 1e-5 tolerance.
agc_driver_graphics(tests/TextureFormat.cpp): the converted DCC clear checks now include 37, 41, 44 and 48. This test runs against a mock Vulkan device, so it loads no validation layer.Mutation checks: shifting the field offsets of 37 and of 44 each fails its test at the first affected bit. This was run on the first version; the conversion code is unchanged.
Required focused comparison:
ctest -R "agc_driver_image_unsigned_packed32|agc_driver_image_converted_unorm|^agc_driver_graphics$" -V, onmain(3c2af82) and this PR (c652dd8). Themainruns overlay main's six non-test source files onto this PR. Both runs used the same test sources andANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1andVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation.NVIDIA RTX 3060, Windows 11 (driver 610.88): main passes 1/6.
agc_driver_graphicsfails onunsupported guest texture format 37.unsigned_packed32tests fail onsampled image descriptor uses an unsupported format.This PR passes 6/6. The validation layer is confirmed loaded, and neither log has a missing-layer warning or a
VUID-error. Before the rebase, on 4f41f4c, a wider image and graphics run (74 tests) failed only those same five on main and passed all on this PR.lavapipe, Ubuntu 26.04: main passes 1/6.
agc_driver_graphicsfails onunsupported guest texture format 37.unsigned_packed32tests fail onsampled image descriptor uses an unsupported format.This PR passes 6/6. The validation layer is confirmed loaded, and neither log has a missing-layer warning or a
VUID-error.Same executable, other tests, with the same variables at c652dd8 and with main's six source files:
agc_driver_image_packed16_storage_{133,134,136}andagc_driver_image_depth24_floatpass on both GPUs.agc_driver_image_depth24(added by feat(libSceAgcDriver): sample guest 8_24_UNORM images as D24_UNORM_S8_UINT #16294) passes on the RTX 3060, and on lavapipe it fails the same way with and without this PR (0x3effe004for texel0x007ff001).Wider run on lavapipe at 596a855 (on
main7960a0b), with the same variables: everyagc_driver_image_*test plusagc_driver_graphics(75 tests). 74 pass andagc_driver_image_sample_lod_clampskips, because lavapipe has noVK_EXT_image_view_min_lod. The onlyVUID-errors are fourVkSamplerCreateInfoaddress-mode IDs inagc_driver_image_gather_volume, which logs the same IDs with main's six source files.History: first written on an older
main(348d7f0). On the RTX 3060 then, main passed 1/6 and this change 6/6. When rebased, the 11_11_10 runtime-mode conditions follow currentmain, and the test drops the refusal checks fedf3e9 removed upstream. Rebased again onto 7960a0b:DescriptorBindingBuilder.cppkeeps main's new 3D gather block, which refuses converted images, so a 3D gather of UNorm 37 or 44 throws. Rebased onto 3c2af82:kFormatInfoTablegrows from 83 entries (after feat(libSceAgcDriver): sample guest 8_24_UNORM images as D24_UNORM_S8_UINT #16294) to 87.python3 tools/check_conventions.py --base origin/main: all conventions checks passed.python3 tools/pr_overlap.py:Depends on: #14628.kFormatInfoTablearray size inRdnaDescriptorFormat.cpp; whichever merges second rebases that line.main. None of their diffs touches the new formats orIsConvertedUnormTextureFormat.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)🤖 Generated with Claude Code