gpu: make GPU-side scalar loads resident before the shader runs #1344

Closed
github-bot wants to merge 1 commit from gh-pr/1344/head into gh-pr/1344/base
Owner

@⁠NeySlim on GitHub · 2026-10-10 00:07 UTC · original
NeySlim:fix/gpu-scalar-load-residency → main · +339 −0 · 8 files · 1 commits · closed without merging

Problem

Since 5b68a26c ("shader: keep scalar payload and terminal conditions on the GPU"), an S_LOAD whose result is only used as data stays on the GPU as a BDA load instead of being read into the flattened SRT by the host plan. That keeps the aliased atomic case of that commit correct. BDA, however, only finds pages that already have a buffer in the buffer cache: a load from a page without one reads zero and sets a fault bit, and FaultManager::ProcessFaultBuffer creates the buffer after the submission. The faulting dispatch is not run again.

Nothing gives those pages a buffer before the shader runs, so the first dispatch or draw that reads a CPU-written table through such a load sees zeros. In God of War Ragnarok (PPSA08332), a new game hangs the GPU (ErrorDeviceLost, gfx ring timeout) on the calibration screen. The RADV hang dump points at CS 0x5c046e9ef798f2bc, which builds a loop bound from a user-data table:

s_load_dwordx2 s[6:7], s[0:1], 0x8    ; s[0:1] = user-data pointer
s_add_i32      vcc_lo, s6, s7
s_add_i32      s13, vcc_lo, -1
...                                   ; loop while s14 < s13, one s_barrier per iteration

With zeros the bound is 0xffffffff. The hung pipeline has the BDA page table and fault buffer bound and no flattened SRT; dumps of the same shader from builds before 5b68a26c read this load through the flattened SRT.

The fault path suits addresses that only the GPU knows (vector addresses, GPU-selected descriptors). This address is known before the dispatch: it comes from user data and SRT reads that the host plan already evaluates, the same values the flattened SRT path used for these loads. The renderer already does the same for mesh draws, which register the guest index range with FindBuffer before PrepareGraphicsBindings so that the shader's BDA reads find it.

Change

  • ExtractResourcePlan records each LoadAddressU32 that stays on the GPU as a scalar BDA load (ScalarAddress, not planning-only) when its base and SGPR offset are runtime values built only from user data, the shader address, immediates and planned SRT reads (GpuScalarRead: address terms, instruction offset, block).
  • MaterializeResources evaluates these addresses right after RefreshFlatBuffer, with the same DWORD-aligned terms as the shader's GuestAddress, and stores their byte ranges in ResourceSnapshot::gpu_scalar_reads (contiguous DWORDs merged). Loads in blocks that the refresh did not visit are skipped. The visited ones only depend on SRT reads that the refresh already evaluated, so no address is read that the refresh did not read, and the loaded value itself is never read on the host: the aliased atomic case of 5b68a26c still has no specialization read. An address the host cannot evaluate keeps the fault path.
  • RenderExecutor::FindBuffers passes each stage's ranges to the new RenderContext::FindBdaBuffers, which calls BufferCache::FindBuffer page by page on their mapped parts, like the fault buffer does, so a page that a buffer already holds is not merged with a neighbouring page that has none. PrepareBda then uploads them with the other mapped buffers before the dispatch or draw.

Programs without such loads have an empty list, so other draws only pay an empty check.

Limits: a load whose address depends on memory the shader reads itself (for example a pointer loaded with a register offset) keeps using the fault path. A load behind a branch that the host plan does not decide (its condition is not kept on the host since 5b68a26c) is made resident even when the branch is not taken; that costs a buffer for a mapped page, not a wrong read.

Test

  • ScalarLoadResidency (shader_recompiler_compute_tests, also --scalar-load-residency-only): the GoW load through CommandProcessor::DispatchDirect with the real pipeline and buffer caches. The table sits in a page that no descriptor of the dispatch covers. The test checks that the load is a BDA read (no flattened SRT) from a page without a buffer, then that the first dispatch stores 3 and 2 from the CPU table. Without the FindBdaBuffers call it stores 0 and 0.
  • BdaReadBuffers: a range that crosses from a held buffer into an empty page, and one that leaves the mapping. The held buffer must stay as it is, the empty page gets its own buffer, and nothing is created outside the mapped range.
  • shader_cfg_tests: TestGpuScalarReadSkipsUnreachedBlock (a load in a block the host plan skips gets no range, a taken one does, and the host reads no memory), TestGpuScalarReadNeedsHostAddress (a load offset by another GPU-side load gets no range and is not evaluated on the host), and TestNativeScalarAtomicPayloadStaysOnGpu now checks the reported range while the mutable flag is still not read on the host.
  • CheckResourcePlanHandoff checks the range of its numeric payload load.

Validation

Linux, AMD Radeon 8060S (RADV, Mesa 26.2.3):

  • shader_recompiler_compute_tests, one case per process: 614 cases, the same 10 failures as main 59183dbf on this GPU; the two new cases pass.
  • Mutation checks, one at a time: without the FindBdaBuffers call ScalarLoadResidency reads 0/0; without the plan entries ResourcePlanHandoff and shader_cfg_tests fail too; without the visited-block check, the dependency check or the page-by-page loop, the matching new test fails.
  • ctest: 45 of 53 pass; the 8 others (GpuTilerCpuParity, and image creation with a D24S8 format this GPU lacks) fail the same way on main 59183dbf.
  • Not validated in game yet; I will report back once a new game has run past the calibration screen with it.

Not tested on Windows. The change has no platform-specific code, and the tests use the same fixtures as NativeIndirectDispatch and BdaPageTableUploads.

AI use

I used Claude Code (AI agent) to investigate the hang (RADV hang dump, shader disassembly, a harness reproduction), write the change, the tests and this description, and run the tests above on my machine. A second agent reviewed the diff independently, and its findings are addressed here (non-fatal address evaluation, page-by-page lookups, the negative tests). I have not run the game with this change yet.

**@⁠NeySlim** on GitHub · 2026-10-10 00:07 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1344) `NeySlim:fix/gpu-scalar-load-residency` → `main` · +339 −0 · 8 files · 1 commits · closed without merging ## Problem Since 5b68a26c ("shader: keep scalar payload and terminal conditions on the GPU"), an `S_LOAD` whose result is only used as data stays on the GPU as a BDA load instead of being read into the flattened SRT by the host plan. That keeps the aliased atomic case of that commit correct. BDA, however, only finds pages that already have a buffer in the buffer cache: a load from a page without one reads zero and sets a fault bit, and `FaultManager::ProcessFaultBuffer` creates the buffer after the submission. The faulting dispatch is not run again. Nothing gives those pages a buffer before the shader runs, so the first dispatch or draw that reads a CPU-written table through such a load sees zeros. In God of War Ragnarok (PPSA08332), a new game hangs the GPU (`ErrorDeviceLost`, gfx ring timeout) on the calibration screen. The RADV hang dump points at CS 0x5c046e9ef798f2bc, which builds a loop bound from a user-data table: ``` s_load_dwordx2 s[6:7], s[0:1], 0x8 ; s[0:1] = user-data pointer s_add_i32 vcc_lo, s6, s7 s_add_i32 s13, vcc_lo, -1 ... ; loop while s14 < s13, one s_barrier per iteration ``` With zeros the bound is 0xffffffff. The hung pipeline has the BDA page table and fault buffer bound and no flattened SRT; dumps of the same shader from builds before 5b68a26c read this load through the flattened SRT. The fault path suits addresses that only the GPU knows (vector addresses, GPU-selected descriptors). This address is known before the dispatch: it comes from user data and SRT reads that the host plan already evaluates, the same values the flattened SRT path used for these loads. The renderer already does the same for mesh draws, which register the guest index range with `FindBuffer` before `PrepareGraphicsBindings` so that the shader's BDA reads find it. ## Change - `ExtractResourcePlan` records each `LoadAddressU32` that stays on the GPU as a scalar BDA load (`ScalarAddress`, not planning-only) when its base and SGPR offset are runtime values built only from user data, the shader address, immediates and planned SRT reads (`GpuScalarRead`: address terms, instruction offset, block). - `MaterializeResources` evaluates these addresses right after `RefreshFlatBuffer`, with the same DWORD-aligned terms as the shader's `GuestAddress`, and stores their byte ranges in `ResourceSnapshot::gpu_scalar_reads` (contiguous DWORDs merged). Loads in blocks that the refresh did not visit are skipped. The visited ones only depend on SRT reads that the refresh already evaluated, so no address is read that the refresh did not read, and the loaded value itself is never read on the host: the aliased atomic case of 5b68a26c still has no specialization read. An address the host cannot evaluate keeps the fault path. - `RenderExecutor::FindBuffers` passes each stage's ranges to the new `RenderContext::FindBdaBuffers`, which calls `BufferCache::FindBuffer` page by page on their mapped parts, like the fault buffer does, so a page that a buffer already holds is not merged with a neighbouring page that has none. `PrepareBda` then uploads them with the other mapped buffers before the dispatch or draw. Programs without such loads have an empty list, so other draws only pay an empty check. Limits: a load whose address depends on memory the shader reads itself (for example a pointer loaded with a register offset) keeps using the fault path. A load behind a branch that the host plan does not decide (its condition is not kept on the host since 5b68a26c) is made resident even when the branch is not taken; that costs a buffer for a mapped page, not a wrong read. ## Test - `ScalarLoadResidency` (`shader_recompiler_compute_tests`, also `--scalar-load-residency-only`): the GoW load through `CommandProcessor::DispatchDirect` with the real pipeline and buffer caches. The table sits in a page that no descriptor of the dispatch covers. The test checks that the load is a BDA read (no flattened SRT) from a page without a buffer, then that the first dispatch stores 3 and 2 from the CPU table. Without the `FindBdaBuffers` call it stores 0 and 0. - `BdaReadBuffers`: a range that crosses from a held buffer into an empty page, and one that leaves the mapping. The held buffer must stay as it is, the empty page gets its own buffer, and nothing is created outside the mapped range. - `shader_cfg_tests`: `TestGpuScalarReadSkipsUnreachedBlock` (a load in a block the host plan skips gets no range, a taken one does, and the host reads no memory), `TestGpuScalarReadNeedsHostAddress` (a load offset by another GPU-side load gets no range and is not evaluated on the host), and `TestNativeScalarAtomicPayloadStaysOnGpu` now checks the reported range while the mutable flag is still not read on the host. - `CheckResourcePlanHandoff` checks the range of its numeric payload load. ## Validation Linux, AMD Radeon 8060S (RADV, Mesa 26.2.3): - `shader_recompiler_compute_tests`, one case per process: 614 cases, the same 10 failures as main 59183dbf on this GPU; the two new cases pass. - Mutation checks, one at a time: without the `FindBdaBuffers` call `ScalarLoadResidency` reads 0/0; without the plan entries `ResourcePlanHandoff` and `shader_cfg_tests` fail too; without the visited-block check, the dependency check or the page-by-page loop, the matching new test fails. - `ctest`: 45 of 53 pass; the 8 others (GpuTilerCpuParity, and image creation with a D24S8 format this GPU lacks) fail the same way on main 59183dbf. - Not validated in game yet; I will report back once a new game has run past the calibration screen with it. Not tested on Windows. The change has no platform-specific code, and the tests use the same fixtures as `NativeIndirectDispatch` and `BdaPageTableUploads`. ## AI use I used Claude Code (AI agent) to investigate the hang (RADV hang dump, shader disassembly, a harness reproduction), write the change, the tests and this description, and run the tests above on my machine. A second agent reviewed the diff independently, and its findings are addressed here (non-fatal address evaluation, page-by-page lookups, the negative tests). I have not run the game with this change yet.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:53:57 +00:00
github-bot closed this pull request 2026-11-26 09:53:57 +00:00
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-10-10 00:12 UTC · original

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: KytyPS5/KytyPS5/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 51165fc3-1ae8-4f75-990b-37ed740edbe5

📥 Commits

Reviewing files that changed from the base of the PR and between 59183dbfa8 and 637f278b0a.


📒 Files selected for processing (8)
  • src/graphics/host_gpu/renderer/pipeline/descriptors.cpp
  • src/graphics/host_gpu/renderer/renderContext.cpp
  • src/graphics/host_gpu/renderer/renderContext.h
  • src/graphics/shader/recompiler/ir/ResourceSnapshot.h
  • src/graphics/shader/recompiler/ir/ShaderIR.h
  • src/graphics/shader/recompiler/ir/passes/ResourceMaterialization.cpp
  • tests/ShaderRecompilerComputeTests.cpp
  • tests/shaderCfgTests.cpp

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.



📝 Walkthrough

Walkthrough

The change records eligible GPU-side scalar reads during resource planning, refreshes their address ranges during materialization, and exposes those ranges to the renderer. The renderer finds buffers for mapped portions of the ranges in caching-page-sized chunks. Tests cover address evaluation, control flow, buffer ownership, and scalar-load residency.

Priority: ⬆️ High

Estimated code review effort:

Suggested reviewers: nmzik

Change: Bug fix


Merge Risk: ⚪ Minimal · up to 637f2

No confirmed issue remains that should hold this change from normal merge checks.

Pre-merge checks | Passed 4 | Inconclusive 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage Inconclusive Docstring coverage is 14.29% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 14 functions across 6 files. (2 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: making GPU-side scalar loads resident before shader execution.
Description check Passed The description is directly related to the changeset. It explains the residency problem, implementation, limitations, tests, and validation results.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.

Full details: Docstring Coverage

Explanation

Docstring coverage is 14.29% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 14 functions across 6 files. (2 skipped: 2 too large.)



  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

**@⁠coderabbitai[bot]** on GitHub · 2026-10-10 00:12 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1344#issuecomment-6091459535) <!-- This is an auto-generated comment: summarize by coderabbit.ai --> <!-- review_stack_entry_start --> <a href="https://app.coderabbit.ai/change-stack/KytyPS5/KytyPS5/pull/1344?scope=ghh_OusAJGA4HG8ljoOV0wJvVx8NmnZIjc2DdjmxOu0xZWA&amp;cs_source=review_comment"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui-dark.svg?v=2" alt="Review in Change Stack →" width="220" height="32"></a> <!-- review_stack_entry_end --> <!-- recent_review_start --> No actionable comments were generated in the recent review. 🎉 <details> <summary><strong>ℹ️ Recent review info</strong></summary> <details> <summary><strong>⚙️ Run configuration</strong></summary> - **Configuration used**: Repository: KytyPS5/KytyPS5/.coderabbit.yaml - **Review profile**: CHILL - **Plan**: Advanced - **Run ID**: `51165fc3-1ae8-4f75-990b-37ed740edbe5` <hr> </details> <details> <summary><strong>📥 Commits</strong></summary> Reviewing files that changed from the base of the PR and between 59183dbfa81ed7efdff6069177fed50de0552725 and 637f278b0aed4ad064b6255632e81fffcbae201a. <hr> </details> <details> <summary><strong>📒 Files selected for processing (8)</strong></summary> * `src/graphics/host_gpu/renderer/pipeline/descriptors.cpp` * `src/graphics/host_gpu/renderer/renderContext.cpp` * `src/graphics/host_gpu/renderer/renderContext.h` * `src/graphics/shader/recompiler/ir/ResourceSnapshot.h` * `src/graphics/shader/recompiler/ir/ShaderIR.h` * `src/graphics/shader/recompiler/ir/passes/ResourceMaterialization.cpp` * `tests/ShaderRecompilerComputeTests.cpp` * `tests/shaderCfgTests.cpp` <hr> </details> **Included review availability:** This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review. <hr> </details> --- <!-- recent_review_end --> <!-- walkthrough_start --> <details> <summary><strong>📝 Walkthrough</strong></summary> ## Walkthrough The change records eligible GPU-side scalar reads during resource planning, refreshes their address ranges during materialization, and exposes those ranges to the renderer. The renderer finds buffers for mapped portions of the ranges in caching-page-sized chunks. Tests cover address evaluation, control flow, buffer ownership, and scalar-load residency. <!-- change_assessment_start --> **Priority:** ⬆️ High **Estimated code review effort:** **Suggested reviewers:** `nmzik` <!-- change_assessment_commit:"637f278b0aed4ad064b6255632e81fffcbae201a" --> **Change:** Bug fix <!-- change_assessment_end --> <hr> </details> <!-- walkthrough_end --> <!-- final_review_risk_start --> **Merge Risk:** **⚪ Minimal** · up to `637f2` <!-- final_review_risk_coverage:{"sourceCommitId":"637f278b0aed4ad064b6255632e81fffcbae201a","coveredCommitId":"637f278b0aed4ad064b6255632e81fffcbae201a","kind":"reviewed"} --> No confirmed issue remains that should hold this change from normal merge checks. <!-- final_review_risk_end --> <!-- pre_merge_checks_walkthrough_start --> <details> <summary><strong>Pre-merge checks | <sup><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-counter-passed-14-v1.svg" width="14" height="17" align="middle" alt="Passed" title="Passed"></picture></sup> 4 | <sup><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-counter-inconclusive-14-v1.svg" width="14" height="17" align="middle" alt="Inconclusive" title="Inconclusive"></picture></sup> 1</strong></summary> ### ❌ Failed checks (1 inconclusive) | Check name | Status | Explanation | Resolution | | :---------------- | :--------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------- | | Docstring Coverage | ![Inconclusive](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-inconclusive.svg) | Docstring coverage is 14.29% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 14 functions across 6 files. (2 skipped: … | Write docstrings for the functions missing them to satisfy the coverage threshold. | <details> <summary><strong>✅ Passed checks (4 passed)</strong></summary> | Check name | Status | Explanation | | :------------------------ | :--------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------------------- | | Title check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | The title clearly and concisely describes the main change: making GPU-side scalar loads resident before shader execution. | | Description check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | The description is directly related to the changeset. It explains the residency problem, implementation, limitations, tests, and validation results. | | Linked Issues check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | Check skipped because no linked issues were found for this pull request. | | Out of Scope Changes check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | Check skipped because no linked issues were found for this pull request. | <hr> </details> <details> <summary><strong>Full details: Docstring Coverage</strong></summary> **Explanation** Docstring coverage is 14.29% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 14 functions across 6 files. (2 skipped: 2 too large.) <hr> </details> <hr> </details> <!-- pre_merge_checks_walkthrough_end --> <!-- autopilot:start --> - [ ] <!-- {"checkboxId":"2708ad07-9f24-4260-9c11-7dc76a49f2e3"} --> <strong title="Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts">Autofix</strong> · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts <!-- autopilot:end --> <!-- tips_start --> --- Thanks for using [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=KytyPS5/KytyPS5&utm_content=1344)! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. <details> <summary><strong>❤️ Share</strong></summary> - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code) <hr> </details> <sub>Comment `@coderabbitai help` to get the list of available commands.</sub> <!-- tips_end -->
Author
Owner

@⁠NeySlim on GitHub · 2026-10-10 01:55 UTC · original

Upstream reverted 5b68a26c in 1c301c9a, so the hang this PR fixes no longer happens on main: scalar loads from user data are read on the CPU again. I am leaving this PR open in case the GPU-side scalar loads come back; it would then be needed as is (the test covers the non-resident page case). Feel free to close it if that change is not planned to return.

**@⁠NeySlim** on GitHub · 2026-10-10 01:55 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1344#issuecomment-6092419859) Upstream reverted 5b68a26c in 1c301c9a, so the hang this PR fixes no longer happens on main: scalar loads from user data are read on the CPU again. I am leaving this PR open in case the GPU-side scalar loads come back; it would then be needed as is (the test covers the non-resident page case). Feel free to close it if that change is not planned to return.
Author
Owner

@⁠theantipopau on GitHub · 2026-10-10 02:39 UTC · original

Evidence from a Windows fork build (AMD RX-series host, clang-cl): 637f278b applies on top of current fork main (ccfb55d9 + our SPIRV-IR merge f3836bb8) as pick 58b2295c.

  • Sole conflict was in tests/shaderCfgTests.cpp; we took the upstream test body (TestNativeScalarAtomicPayloadStaysOnGpu, the SAROS b62b494c program) verbatim on top of the fork's existing cover-art pieces of that file — all other 7 files merged clean.
  • Full build zero errors; targeted Windows ctest set after the pick: kernel_file_system, controller_settings, resource_materialization, memory_tracker, page_manager, archive_file, windows_file_read, shader_cfg — 8/8 pass (shader_cfg includes the newly-added payload test).
  • Real-game smoke running after this pick: Hollow Knight Silksong (PPSA12544) survives the usual timeout run; will report back if the resident-scalar-load path flips anything in our AMD driver logs.

Goal for us: with #1346 (barycentric optional) plus resident scalar loads, our RX-class GPU should finally reach the Vulkan harness rasterization features path that has been failing locally.

**@⁠theantipopau** on GitHub · 2026-10-10 02:39 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1344#issuecomment-6092875808) Evidence from a Windows fork build (AMD RX-series host, clang-cl): `637f278b` applies on top of current fork main (`ccfb55d9` + our SPIRV-IR merge f3836bb8) as pick `58b2295c`. - Sole conflict was in `tests/shaderCfgTests.cpp`; we took the upstream test body (TestNativeScalarAtomicPayloadStaysOnGpu, the SAROS b62b494c program) verbatim on top of the fork's existing cover-art pieces of that file — all other 7 files merged clean. - Full build zero errors; targeted Windows ctest set after the pick: kernel_file_system, controller_settings, resource_materialization, memory_tracker, page_manager, archive_file, windows_file_read, shader_cfg — 8/8 pass (shader_cfg includes the newly-added payload test). - Real-game smoke running after this pick: Hollow Knight Silksong (PPSA12544) survives the usual timeout run; will report back if the resident-scalar-load path flips anything in our AMD driver logs. Goal for us: with #1346 (barycentric optional) plus resident scalar loads, our RX-class GPU should finally reach the Vulkan harness rasterization features path that has been failing locally.
Author
Owner

@⁠NeySlim on GitHub · 2026-10-10 02:43 UTC · original

Thanks for testing it on Windows and AMD, that is useful.

One note: main reverted 5b68a26c in 1c301c9a, so on current main scalar loads from user data are read on the CPU again and this change has nothing to act on there. It only matters on a tree that keeps the GPU-side scalar loads, as yours seems to. If your tree keeps them, this fix (or reverting 5b68a26c as main did) is what avoids the zero reads and the loop hang.

**@⁠NeySlim** on GitHub · 2026-10-10 02:43 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1344#issuecomment-6092923036) Thanks for testing it on Windows and AMD, that is useful. One note: main reverted 5b68a26c in 1c301c9a, so on current main scalar loads from user data are read on the CPU again and this change has nothing to act on there. It only matters on a tree that keeps the GPU-side scalar loads, as yours seems to. If your tree keeps them, this fix (or reverting 5b68a26c as main did) is what avoids the zero reads and the loop hang.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.