fix(agc): back large pixel LDS with the storage buffer on Intel's Windows driver #21683

Merged
androidbaklava merged 2 commits from upstream-pr/21683 into main 2026-11-25 23:07:16 +00:00
androidbaklava commented 2026-11-16 15:08:15 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by androidbaklava on 2026-11-16T15:08:15Z.


What

On Intel's Windows driver, a pixel shader that keeps the full 8192-dword LDS in a per-invocation Function array loses the device: agc_driver_pixel_lds_limit fails every run with vkWaitForFences graphics: Vulkan result -4 on Intel UHD Graphics (#12522). The storage-buffer pool that NVIDIA proprietary already uses for arrays above pixelFunctionStorageDwords needs no vendor data (it sizes itself from maxStorageBufferRange), so this enables it for VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS as well. Without VK_NV_shader_sm_builtins the threshold stays at the default 4096 dwords. The shader debt entry now names the Intel measurement.

Part of #12522: this fixes the pixel_lds_limit device loss only; the other failures listed there are unchanged.

Tested

Windows 11 Home, i7-13620H, Intel UHD Graphics (8086:a7a8), Intel driver 101.7084, WinLibs GCC 15.2.0 r7, Release, BUILD_TESTING=ON.

  • agc_driver_pixel_lds_limit: fails on main with device loss in 3 of 3 runs; passes 3 of 3 with this change, including the overflow case that only runs with the buffer pool (pixel LDS limit overflow passed).
  • All 50 tests matching ^agc_driver_.*(pixel|lds|ps_|fragment) with ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1: main 49 of 50 (only pixel_lds_limit fails), this change 50 of 50.
  • Validation: ctest -R "^agc_driver_pixel_lds" -V on main and on this change with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, VK_LOADER_DEBUG=layer and the LunarG SDK 1.4.363 layer. Each log shows Insert instance layer "VK_LAYER_KHRONOS_validation" for all four tests, neither contains was not found but was requested by env var VK_INSTANCE_LAYERS, and both have 0 VUID- lines.

Not tested on Intel Arc or on Linux (the Mesa ANV driver is unchanged).

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: Intel UHD Graphics (8086:a7a8), Intel driver 101.7084, Windows 11 Home
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5339502332 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/21683). Originally posted by [androidbaklava](https://github.com/androidbaklava) on 2026-11-16T15:08:15Z. --- ### What On Intel's Windows driver, a pixel shader that keeps the full 8192-dword LDS in a per-invocation `Function` array loses the device: `agc_driver_pixel_lds_limit` fails every run with `vkWaitForFences graphics: Vulkan result -4` on Intel UHD Graphics (#12522). The storage-buffer pool that NVIDIA proprietary already uses for arrays above `pixelFunctionStorageDwords` needs no vendor data (it sizes itself from `maxStorageBufferRange`), so this enables it for `VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS` as well. Without `VK_NV_shader_sm_builtins` the threshold stays at the default 4096 dwords. The shader debt entry now names the Intel measurement. Part of #12522: this fixes the `pixel_lds_limit` device loss only; the other failures listed there are unchanged. ### Tested Windows 11 Home, i7-13620H, Intel UHD Graphics (8086:a7a8), Intel driver 101.7084, WinLibs GCC 15.2.0 r7, Release, `BUILD_TESTING=ON`. - `agc_driver_pixel_lds_limit`: fails on `main` with device loss in 3 of 3 runs; passes 3 of 3 with this change, including the overflow case that only runs with the buffer pool (`pixel LDS limit overflow passed`). - All 50 tests matching `^agc_driver_.*(pixel|lds|ps_|fragment)` with `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1`: `main` 49 of 50 (only `pixel_lds_limit` fails), this change 50 of 50. - Validation: `ctest -R "^agc_driver_pixel_lds" -V` on `main` and on this change with `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1`, `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, `VK_LOADER_DEBUG=layer` and the LunarG SDK 1.4.363 layer. Each log shows `Insert instance layer "VK_LAYER_KHRONOS_validation"` for all four tests, neither contains `was not found but was requested by env var VK_INSTANCE_LAYERS`, and both have 0 `VUID-` lines. Not tested on Intel Arc or on Linux (the Mesa ANV driver is unchanged). ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: Intel UHD Graphics (8086:a7a8), Intel driver 101.7084, Windows 11 Home - [x] AI-assisted: yes
MarcZX10 commented 2026-11-19 01:08:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-19T01:08:33Z.

Review: COMMENTED


Reviewed — no blocking findings

Nothing blocks this change; the points below are optional.

What I ran

Reviewed head c622d4de54123f16940016a92980b3668e4e9a78. I read the prepared description, commits, manifest, diff, and the changed VulkanDevice.cpp context through repo_read.py. No commands or tests were run.

Results

Check Result Note
Diff review passed Both changed hunks inspected
Tests not run Author-reported results only

Findings

Blocking

None.

Non-blocking

None.

Not verified

The description reports Windows 11 Intel UHD results, but I did not run or independently verify them. The files.json inventory was unavailable through the reader. The VulkanDevice.cpp full text was excluded from the review folder; I inspected the changed function context only. docs/dev/debt/shader.md full text was listed as included, but I did not retrieve it from the reader. No other repository context, tests, or runtime behavior was verified.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5967798438 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/21683#pullrequestreview-5967798438). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-19T01:08:33Z. **Review:** COMMENTED --- # Reviewed — no blocking findings Nothing blocks this change; the points below are optional. ## What I ran Reviewed head `c622d4de54123f16940016a92980b3668e4e9a78`. I read the prepared description, commits, manifest, diff, and the changed `VulkanDevice.cpp` context through `repo_read.py`. No commands or tests were run. ## Results | Check | Result | Note | |---|---|---| | Diff review | passed | Both changed hunks inspected | | Tests | not run | Author-reported results only | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified The description reports Windows 11 Intel UHD results, but I did not run or independently verify them. The `files.json` inventory was unavailable through the reader. The `VulkanDevice.cpp` full text was excluded from the review folder; I inspected the changed function context only. `docs/dev/debt/shader.md` full text was listed as included, but I did not retrieve it from the reader. No other repository context, tests, or runtime behavior was verified. ## To get this to a good state Nothing is required.
MarcZX10 commented 2026-11-21 01:32:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T01:32:52Z.

Review: APPROVED


Reviewed — looks good

The change enables the existing large pixel LDS buffer path for Intel proprietary Windows drivers; no blocking defect is evident in the inspected code.

What I ran

Reviewed head 92d83ca05c1511f1a7f17820e390ddbb658ebf2b. Read the prepared description, commits, manifest and diff, plus the changed debt note and targeted source context via repo_read.py. No tests were run in this review.

Results

Check Result Note
Diff and targeted code review passed The new driver condition selects the existing buffer fallback.
Tests in this review not run The PR description reports Intel Windows runs; not independently verified here.

Findings

Blocking

None.

Non-blocking

None.

Not verified

Did not run tests or independently verify the author-reported Windows results. Reviewed changed files: core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp (changed line and nearby device setup), docs/dev/debt/changes/fix-agc-intel-pixel-lds-buffer.md (full file). files.json was not available in the prepared bundle; the manifest lists these two changed files, and both were read. No changed files were excluded from review.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6001823928 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/21683#pullrequestreview-6001823928). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-21T01:32:52Z. **Review:** APPROVED --- # Reviewed — looks good The change enables the existing large pixel LDS buffer path for Intel proprietary Windows drivers; no blocking defect is evident in the inspected code. ## What I ran Reviewed head `92d83ca05c1511f1a7f17820e390ddbb658ebf2b`. Read the prepared description, commits, manifest and diff, plus the changed debt note and targeted source context via `repo_read.py`. No tests were run in this review. ## Results | Check | Result | Note | |---|---|---| | Diff and targeted code review | passed | The new driver condition selects the existing buffer fallback. | | Tests in this review | not run | The PR description reports Intel Windows runs; not independently verified here. | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified Did not run tests or independently verify the author-reported Windows results. Reviewed changed files: `core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp` (changed line and nearby device setup), `docs/dev/debt/changes/fix-agc-intel-pixel-lds-buffer.md` (full file). `files.json` was not available in the prepared bundle; the manifest lists these two changed files, and both were read. No changed files were excluded from review. ## To get this to a good state Nothing is required.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!21683
No description provided.