Repository navigation
Conversation
|
Independent build/test of the standalone PR head
The set is Each leg restricts Ubuntu 24.04, Linux 7.0, Ryzen 9 9950X, GCC 13.3, Release/Ninja, No title run, NVIDIA driver-cache coldness control, full-suite run, Windows/macOS/Intel test, or compile/runtime performance measurement. This adds standalone Linux/NVIDIA/RADV correctness coverage, not validation of the claimed title speedup. |
|
Windows test (MinGW GCC 15.2, Release, Windows 10, RTX 4080 SUPER). Built on main
Not tested: no game run. The batch was built once, not per PR; nothing failed, so no bisect was needed. AI-assisted (Claude Code). |
|
Rebased onto One change beyond the conflict: the span fallback loop no longer keeps its index and result in function-local variables. Tested on the rebased commit (Windows 11, MinGW-w64 GCC 15.2, RX 6700 XT):
Not re-run on this commit: the rest of the suite, and the title (the 140 s link number in the description is from the variable-based loop on AI-assisted: yes. |
a4a0f6c to
e7249d3
Compare
|
Retested the new
The set contains the five Production-only negative control: replaced Coverage detail: lavapipe's No title run, full-suite run, driver-cache coldness control, or compile/runtime speedup measurement. This verifies the rebased implementation's focused Linux correctness, without establishing a fix for the failing Windows configurations in #4975. |
|
First NVIDIA and Intel run, which the description lists as not tested. The BDA read tests pass on both GPUs. That includes NVIDIA 595.97, which lost the device with the read shape from #4759 until #5022. Setup: Windows 11 (26200), WinLibs GCC 15.2.0 r7, Release, CI configure flags, an RTX 4070 Laptop GPU (NVIDIA 595.97) and an Intel Raptor Lake-S iGPU (32.0.101.6790). The head e7249d3 merged cleanly into
I didn't measure compile time or run time. Written with AI assistance. |
e7249d3 to
3ab89c3
Compare
CnRJay
left a comment
There was a problem hiding this comment.
The diagnosis is right. AMD's LLPC/amdvlk (like Mesa's NIR) inlines every SPIR-V function regardless of DontInline, so helper body size is multiplied by the number of call sites, and a 510K-word pixel shader with 34 span reads hits that badly.
One run-time point to check before this lands, since the change trades unrolled straight-line code for a loop with a dynamic index:
OpVectorInsertDynamicwith a loop-variant index. If the driver doesn't unroll the 4-iteration loop (and if it did, the compile-time gain would mostly disappear), a dynamic index into auvec4is lowered either as a select chain or, on some compilers, by spilling the vector to scratch memory and indexing it there. Scratch use in a pixel shader costs memory bandwidth and can reduce occupancy for the whole pipeline, not only for the fallback path. Building the result with a constant-index insert per iteration (OpCompositeInsertinside aswitchon the index), or shifting into scalars and assembling the vector after the loop, keeps the loop and avoids the dynamic index.- To confirm: the pipeline statistics that
LogPipelineStatisticsprints (VK_KHR_pipeline_executable_properties: scratch bytes and VGPRs) for the NHL 27 main-menu pipeline with and without this change on the RX 6700 XT, plus one NVIDIA or RADV device. A frame-time A/B would also show whether the menu frame got slower once it compiles.
The fallback is the rare path (spans not mapped as one aligned piece), so the run-time cost may well be negligible. The point is to show it, since perf( changes to shader emission affect every title's shaders.
|
Refreshed the Linux run for new head Release, GCC 13.3, bundled dependencies, SPIRV-Tools ON. Same 22-test set as my earlier report: the five shader-memory/bindless/SRT/frontend modes, BDA device and span reads, pixel interlock, and flat-aperture modes 0..13.
Each leg pinned its ICD, selected its GPU explicitly, required Vulkan execution and disabled the application shader cache. Serial CTest, unchanged 30-second limit. No internal skips or “not tested” messages in either log. These elapsed times are test-run totals, not a performance comparison. Repeated the production-only negative control against this head's own parent: restoring only Lavapipe was not rerun for this head. No title run or pipeline-performance measurement in this report. |
A dword read that falls back to bytes called the page lookup once per byte, and a span read that falls back to dwords called the dword reader four times. AMD's Windows compiler inlines these helpers at every call site, so a pixel shader with 232 span reads grew past what it can compile: 60 GB of memory within a minute for one NHL 27 menu shader. Both fallbacks are now loops with one call each. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3ab89c3 to
9353192
Compare
|
Closing as a duplicate of merged work: #3655 (merged today, 2d3a970) already puts both changes on
The PR now conflicts in |
What
Follow-up to #4931 (see my correction there): the other half of what a commercial title needs to get past the first main-menu frame on AMD's Windows driver.
AMD's compiler inlines the BDA read helpers at every call site (
DontInlineis not honoured), so the size of a helper body is paid once per read site. Two bodies are unrolled today:read_bda_dword_bytes*loads the four bytes of a dword with four copies of the byte lookup and load.read_bda_span*(the span is not mapped as one aligned piece) callsread_bda_dword_bytes*from four sites, one per dword.Both become one loop over a function-local index: the byte read shifts each loaded byte into the result, the span fallback inserts each dword with
OpVectorInsertDynamicand still stops the invocation when a dword read reports a stop. The in-place path of the span read (f1b2e60) is unchanged. Values, fault records and the order of reads are the same; only the shape of the two helper bodies changes.Measured with the title on an RX 6700 XT (Adrenalin 25.10, amdvlk64),
main7e181fcc3plus the title's other fixes from my fork:[gpu] pipeline link took 140101 ms.I have not measured this change without #4931.
Tested
Windows 11, MinGW-w64 GCC 15.2, AMD RX 6700 XT.
agc_shader_memory, "BDA read functions": the byte read function must contain one byte load (four onmain), and the span read must call the byte read from one site (four onmain). WithSpirvBdaRead.cppfrommainthe test fails with "the looped byte load does not keep the access's coherence"; with the change it passes.ctest -R "^agc_shader|^shader|agc_graphics|agc_driver_bda": 16 of 16 pass (on my fork branch, which is7e181fcc3plus this and other commits).python tools/check_conventions.py --base origin/mainpasses.c2565f014) was not built; the cherry-pick was clean.Not tested: NVIDIA, Intel, Linux, macOS; whether other drivers gain or lose compile time or run time from the loops.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)ShaderMemory.cpp's "BDA read functions" test, so the second to merge needs a rebase)🤖 Generated with Claude Code