Repository navigation
fix(agc): retain offchip LDS enable during shader fusion - #6653
Conversation
jotitadev
left a comment
There was a problem hiding this comment.
Same result on NVIDIA and lavapipe.
Machine: NVIDIA GeForce RTX 3070, driver 595.99.02, Vulkan 1.4.329, plus lavapipe (Mesa 26.0.3, LLVM 21.1.8) on the same machine. Ubuntu 26.04, i7-8700, GCC 15.2, Release, BUILD_TESTING=ON. Head 522696d1c merged into main 5d9dcc42d (clean merge), -j1 --timeout 30.
- Tests only (
ShaderFusion.cpprestored frommain):agc_shader_fusionfails on both devices withsceAgcGetFusedShaderSize_0080: front half requires hardware state the back half does not enable. - With the fix:
agc_shader_fusionpasses 3/3 on the RTX 3070 and 3/3 on lavapipe, with no skip.
GPUs tested: NVIDIA GeForce RTX 3070 (595.99.02), lavapipe (Mesa 26.0.3, LLVM 21.1.8), Ubuntu 26.04
Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
|
Manually reviewed the comparisons the bot could not perform: #5877 at These are shared-file edits, not prerequisites of this fix. AI-assisted: yes. |
|
Windows NVIDIA run, since the description lists RADV only. Windows 11 Pro 26200, NVIDIA GeForce RTX 4080 (driver 617.42), AMD Ryzen 7 5800X, WinLibs GCC 15.2.0 r7, Ninja, Release, bundled dependencies,
No title run. AI-assisted: yes (runs done with Claude Code). |
|
Checked the diff against the description: |
What
GS shader-half fusion rejects Cocoon (PPSA08766, bring-up #6651) when the front half requests
SPI_SHADER_PGM_RSRC2_GS.OC_LDS_ENand the back half does not:The observed resource words are front
0x70004, back0xab0020; the unmatched bit is0x40000. Bit 18 isOC_LDS_ENin AMD's GFX10 register definitions.Preserve this enable when either half requests it, yielding
0xaf0004for that pair. User SGPR allocation still comes from the front half, other state remains with the back half, and other unmatched hardware requirements still throw. The technical debt entry records that this merge is inferred from retaining the halves' requirements; console fusion output has not been measured.This is a later startup stop reached with graphics changes; unmodified main stops Cocoon earlier on geometry output assembly. This PR does not make Cocoon boot or claim a performance gain. The native sequence and full integration stack are recorded in #6651.
Tested
Arch Linux 7.2.9, GCC 16.2.1, Release, Ryzen 9 7950X, Radeon RX 6650 XT, RADV Mesa 26.2.4-arch1.1.
Built
agc_shader_fusion_testson current main5d9dcc42dplus only this commit (522696d1c), with the pinned submodules.ctest -R '^agc_shader_fusion$' --output-on-failurepasses without skipping.Added all four combinations of front/back
OC_LDS_EN, checking the size query and fusion output, plus the exact Cocoon resource pair. Existing rejection of another unmatched hardware-state bit remains tested.Negative control on that same main-based tree: restoring only
MergeRsrc2to main's implementation makes the new test fail with the hardware-state refusal; restoring this change passes.Native Cocoon on the experimental stack in Cocoon (PPSA08766) #6651: without this change, the size query aborts on the resource pair above. With this change, startup passes it and aborts at
VGT_SHADER_STAGES_EN=0x2135: combined tessellation and geometry is unsupported by the reference path. Still no visible menu or gameplay. Other graphics changes are needed to reach this call; their necessity was not ablated individually.Current-main integration recheck: main
2626e5ee7e57df6e952a93a997a8b9fc79d80c08plus refreshed feat(agc): rasterize geometry points with their point size #6801/feat(agc): draw point lists on the vertex path with their point size #6639 reaches the fusion refusal. Adding only this PR's commit gives local integration943ab33635869df874f30110a8b4e3e44bed8400:agc_shader_fusion,agc_driver_meshandrequest_serializerall pass on RX 6650 XT / RADV Mesa 26.2.4, with Vulkan required and no skips. Native Cocoon then reaches the laterVGT_SHADER_STAGES_EN=0x2135combined tessellation/geometry refusal after 24.09 s, with a fresh writable cache and no input. The game PID is gone and the kernel setting restored. No gameplay/rendering/performance claim; this is an integration result, not a standalone-main title run.The device-backed fusion test verifies metadata/layout and registration; it does not establish rendered correctness of the title. Windows/macOS and other GPUs were not tested locally.
Contributor-reported Windows validation by Neithennn: head
522696d1cmerged onto mainf51724078, Windows 11 Pro 26200, NVIDIA GeForce RTX 4080 driver 617.42, Ryzen 7 5800X, WinLibs GCC 15.2.0 r7, Ninja Release, bundled dependencies,BUILD_TESTING=ON,ANYPS5_NO_SHADER_CACHE=1. Full build andagc_shader_fusionpass; fullctest -j8reports 1398/1398 for both this PR and unchanged main. No title run. These results were reported by the contributor, whose testing was AI-assisted with Claude Code; they were not reproduced locally.Checklist
main; no other open PR implements the same functions