fix(libSceAgcDriver): normalize reserved bit 30 in guest buffer descriptors #7089

Merged
pushkarreddyy merged 1 commit from upstream-pr/7089 into main 2026-10-18 11:51:56 +00:00
pushkarreddyy commented 2026-10-17 11:01:32 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by pushkarreddyy on 2026-10-17T11:01:32Z.


What

Normalizes reserved bit 30 of word 1 (words[1] & 0x40000000u) to zero when building ShaderBufferResource in ShaderResources::addGuestBuffer, instead of requiring it to be clear.

On RDNA hardware, bit 30 in word 1 of a buffer resource descriptor is reserved and ignored by buffer sampling/resource hardware. While PR #5049 normalized bit 30 for scalar-only buffer resources before binding, non-scalar and compute buffers reaching ShaderResources::addGuestBuffer previously threw with buffer descriptor has reserved bits set.

Unblocks Code Violet (PPSA26528, Unreal Engine 5.5) which aborts at compute shader 0x147b9e400 with reserved bit 30 set (#7051).

Tested

  • Unit test in core/libs/prx/libSceAgcDriver/tests/execution/BufferDescriptorRuntime.cpp updated: verifies that vector and mixed buffer accesses with bit 30 set in word 1 are accepted and produce identical dispatch outputs as untouched descriptors.
  • Conventions check: python tools/check_conventions.py --base origin/main passed cleanly with 0 findings.
  • Technical debt documented in docs/dev/debt/libSceAgcDriver.md.

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: #7051
  • Unblocks: PPSA26528 #6256
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4899516944 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7089). Originally posted by [pushkarreddyy](https://github.com/pushkarreddyy) on 2026-10-17T11:01:32Z. --- ### What Normalizes reserved bit 30 of word 1 (`words[1] & 0x40000000u`) to zero when building `ShaderBufferResource` in `ShaderResources::addGuestBuffer`, instead of requiring it to be clear. On RDNA hardware, bit 30 in word 1 of a buffer resource descriptor is reserved and ignored by buffer sampling/resource hardware. While PR #5049 normalized bit 30 for scalar-only buffer resources before binding, non-scalar and compute buffers reaching `ShaderResources::addGuestBuffer` previously threw with `buffer descriptor has reserved bits set`. Unblocks Code Violet (PPSA26528, Unreal Engine 5.5) which aborts at compute shader `0x147b9e400` with reserved bit 30 set (#7051). ### Tested - Unit test in `core/libs/prx/libSceAgcDriver/tests/execution/BufferDescriptorRuntime.cpp` updated: verifies that vector and mixed buffer accesses with bit 30 set in word 1 are accepted and produce identical dispatch outputs as untouched descriptors. - Conventions check: `python tools/check_conventions.py --base origin/main` passed cleanly with 0 findings. - Technical debt documented in `docs/dev/debt/libSceAgcDriver.md`. ### Checklist - [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: #7051 - [x] Unblocks: PPSA26528 #6256 - [x] GPUs tested: n/a - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-17 11:21:58 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-17T11:21:58Z.


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.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 6636 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp L3802-3803

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.

Pull request Shared files not compared
PR 1395 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 2434 docs/dev/debt/libSceAgcDriver.md
PR 4040 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 4448 docs/dev/debt/libSceAgcDriver.md
PR 4650 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 5058 docs/dev/debt/libSceAgcDriver.md
PR 5372 docs/dev/debt/libSceAgcDriver.md
PR 5441 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 5499 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 5500 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 5925 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 5998 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 5999 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6054 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6082 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6177 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6188 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6192 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6194 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6222 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6223 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6235 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6273 docs/dev/debt/libSceAgcDriver.md
PR 6292 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6297 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6300 docs/dev/debt/libSceAgcDriver.md
PR 6320 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6373 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6412 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6414 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6472 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6481 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6529 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6535 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6548 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6563 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6612 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6615 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6727 docs/dev/debt/libSceAgcDriver.md
PR 6741 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6783 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6786 docs/dev/debt/libSceAgcDriver.md
PR 6801 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6808 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6867 docs/dev/debt/libSceAgcDriver.md
PR 6868 docs/dev/debt/libSceAgcDriver.md
PR 6946 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6947 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6972 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6977 docs/dev/debt/libSceAgcDriver.md
PR 7250 docs/dev/debt/libSceAgcDriver.md
PR 7332 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7426 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7432 docs/dev/debt/libSceAgcDriver.md
PR 7505 docs/dev/debt/libSceAgcDriver.md
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6233296644 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7089#issuecomment-6233296644). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-17T11:21:58Z. --- <!-- pr-overlap --> 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**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | [PR 6636](https://www.github.com/boykopovar/AnyPS5/pull/6636) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp` [L3802-3803](https://github.com/boykopovar/AnyPS5/blob/3e3e8b905018be3c0daf318511a260ddd1124893/core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp#L3802-L3803) | | | 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. | Pull request | Shared files not compared | |---|---| | [PR 1395](https://www.github.com/boykopovar/AnyPS5/pull/1395) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 2434](https://www.github.com/boykopovar/AnyPS5/pull/2434) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 4040](https://www.github.com/boykopovar/AnyPS5/pull/4040) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 4448](https://www.github.com/boykopovar/AnyPS5/pull/4448) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 4650](https://www.github.com/boykopovar/AnyPS5/pull/4650) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 5058](https://www.github.com/boykopovar/AnyPS5/pull/5058) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 5372](https://www.github.com/boykopovar/AnyPS5/pull/5372) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 5441](https://www.github.com/boykopovar/AnyPS5/pull/5441) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 5499](https://www.github.com/boykopovar/AnyPS5/pull/5499) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 5500](https://www.github.com/boykopovar/AnyPS5/pull/5500) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 5925](https://www.github.com/boykopovar/AnyPS5/pull/5925) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 5998](https://www.github.com/boykopovar/AnyPS5/pull/5998) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp` | | [PR 5999](https://www.github.com/boykopovar/AnyPS5/pull/5999) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6054](https://www.github.com/boykopovar/AnyPS5/pull/6054) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6082](https://www.github.com/boykopovar/AnyPS5/pull/6082) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp` | | [PR 6177](https://www.github.com/boykopovar/AnyPS5/pull/6177) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp` | | [PR 6188](https://www.github.com/boykopovar/AnyPS5/pull/6188) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6192](https://www.github.com/boykopovar/AnyPS5/pull/6192) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp` | | [PR 6194](https://www.github.com/boykopovar/AnyPS5/pull/6194) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6222](https://www.github.com/boykopovar/AnyPS5/pull/6222) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6223](https://www.github.com/boykopovar/AnyPS5/pull/6223) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6235](https://www.github.com/boykopovar/AnyPS5/pull/6235) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6273](https://www.github.com/boykopovar/AnyPS5/pull/6273) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6292](https://www.github.com/boykopovar/AnyPS5/pull/6292) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp` | | [PR 6297](https://www.github.com/boykopovar/AnyPS5/pull/6297) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6300](https://www.github.com/boykopovar/AnyPS5/pull/6300) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6320](https://www.github.com/boykopovar/AnyPS5/pull/6320) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6373](https://www.github.com/boykopovar/AnyPS5/pull/6373) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp` | | [PR 6412](https://www.github.com/boykopovar/AnyPS5/pull/6412) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6414](https://www.github.com/boykopovar/AnyPS5/pull/6414) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp` | | [PR 6472](https://www.github.com/boykopovar/AnyPS5/pull/6472) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6481](https://www.github.com/boykopovar/AnyPS5/pull/6481) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6529](https://www.github.com/boykopovar/AnyPS5/pull/6529) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6535](https://www.github.com/boykopovar/AnyPS5/pull/6535) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6548](https://www.github.com/boykopovar/AnyPS5/pull/6548) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6563](https://www.github.com/boykopovar/AnyPS5/pull/6563) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6612](https://www.github.com/boykopovar/AnyPS5/pull/6612) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6615](https://www.github.com/boykopovar/AnyPS5/pull/6615) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp` | | [PR 6727](https://www.github.com/boykopovar/AnyPS5/pull/6727) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6741](https://www.github.com/boykopovar/AnyPS5/pull/6741) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6783](https://www.github.com/boykopovar/AnyPS5/pull/6783) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6786](https://www.github.com/boykopovar/AnyPS5/pull/6786) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6801](https://www.github.com/boykopovar/AnyPS5/pull/6801) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6808](https://www.github.com/boykopovar/AnyPS5/pull/6808) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6867](https://www.github.com/boykopovar/AnyPS5/pull/6867) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6868](https://www.github.com/boykopovar/AnyPS5/pull/6868) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6946](https://www.github.com/boykopovar/AnyPS5/pull/6946) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6947](https://www.github.com/boykopovar/AnyPS5/pull/6947) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6972](https://www.github.com/boykopovar/AnyPS5/pull/6972) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6977](https://www.github.com/boykopovar/AnyPS5/pull/6977) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 7250](https://www.github.com/boykopovar/AnyPS5/pull/7250) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 7332](https://www.github.com/boykopovar/AnyPS5/pull/7332) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 7426](https://www.github.com/boykopovar/AnyPS5/pull/7426) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 7432](https://www.github.com/boykopovar/AnyPS5/pull/7432) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 7505](https://www.github.com/boykopovar/AnyPS5/pull/7505) | `docs/dev/debt/libSceAgcDriver.md` |
jotitadev commented 2026-10-17 15:09:12 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-17T15:09:12Z.

Review: COMMENTED


Two tests fail with this PR on both devices I have. Both failures come from test expectations, not from the fix.

Machine: Ubuntu 26.04, i7-8700, GCC 15.2, Release, BUILD_TESTING=ON. NVIDIA GeForce RTX 3070 (driver 595.99.02) and lavapipe (Mesa 26.0.3, LLVM 21.1.8) on the same host. Head 2c7d0bf0d merged onto main 47a266cf9 (clean). ANYPS5_NO_SHADER_CACHE=1, -j1 --timeout 30.

Run RTX 3070 lavapipe
agc_driver_buffer_descriptor_runtime, PR head fails 3/3: vector or mixed buffer read changed with reserved bit 30 set same failure
same, ShaderResources.cpp from main fails: buffer descriptor has reserved bits set same
PR head, last check changed as below pass pass
^agc (649 tests), PR vs main 647/649: agc_driver_buffer_descriptor_runtime and agc_driver_graphics fail (expected graphics rejection: reserved bits); main passes 649/649 same two failures; main 649/649

The last loop in ScalarReads compares every lane with expected, which is the dword at Input + 4 (the scalar load's value). For the vector-only program Code, lane N stores the dword at Input + 4 * N, the same layout Run checks. So only lane 1 can match. Printed on the 3070 with bit 30 set:

vector lane 0 out 7e552c03 scalarExpected 22f9d0a7 perLane 7e552c03
vector lane 1 out 22f9d0a7 scalarExpected 22f9d0a7 perLane 22f9d0a7
vector lane 2 out c79e754c scalarExpected 22f9d0a7 perLane c79e754c

With the vector-only program checked against Input + 4 * lane and the mixed program kept on expected, all 32 lanes match on both devices and the test passes. In mixedCode the second store (v3 = s8) goes to the same lane address as the vector result, so that case only checks the scalar value. The vector load with bit 30 set is checked only by the vector-only program.

agc_driver_graphics still expects the old rejection at tests/Graphics.cpp:4552: expectSingleFailure(changed([](auto& binding) { binding.guestDescriptor[1] |= 0x40000000u; }), "reserved bits");. With bit 30 now cleared, that binding is accepted, so this line needs to expect acceptance or be removed.

The CI Linux and Windows jobs were skipped on this head, so neither failure showed up there.

Not run: Windows, AMD, Code Violet or any title.

GPUs tested: NVIDIA GeForce RTX 3070 (595.99.02) and lavapipe (Mesa 26.0.3), Ubuntu 26.04

Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5558396236 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7089#pullrequestreview-5558396236). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-17T15:09:12Z. **Review:** COMMENTED --- Two tests fail with this PR on both devices I have. Both failures come from test expectations, not from the fix. **Machine:** Ubuntu 26.04, i7-8700, GCC 15.2, Release, `BUILD_TESTING=ON`. NVIDIA GeForce RTX 3070 (driver 595.99.02) and lavapipe (Mesa 26.0.3, LLVM 21.1.8) on the same host. Head `2c7d0bf0d` merged onto `main` `47a266cf9` (clean). `ANYPS5_NO_SHADER_CACHE=1`, `-j1 --timeout 30`. | Run | RTX 3070 | lavapipe | |---|---|---| | `agc_driver_buffer_descriptor_runtime`, PR head | fails 3/3: `vector or mixed buffer read changed with reserved bit 30 set` | same failure | | same, `ShaderResources.cpp` from `main` | fails: `buffer descriptor has reserved bits set` | same | | PR head, last check changed as below | pass | pass | | `^agc` (649 tests), PR vs `main` | 647/649: `agc_driver_buffer_descriptor_runtime` and `agc_driver_graphics` fail (`expected graphics rejection: reserved bits`); `main` passes 649/649 | same two failures; `main` 649/649 | The last loop in `ScalarReads` compares every lane with `expected`, which is the dword at `Input + 4` (the scalar load's value). For the vector-only program `Code`, lane N stores the dword at `Input + 4 * N`, the same layout `Run` checks. So only lane 1 can match. Printed on the 3070 with bit 30 set: ``` vector lane 0 out 7e552c03 scalarExpected 22f9d0a7 perLane 7e552c03 vector lane 1 out 22f9d0a7 scalarExpected 22f9d0a7 perLane 22f9d0a7 vector lane 2 out c79e754c scalarExpected 22f9d0a7 perLane c79e754c ``` With the vector-only program checked against `Input + 4 * lane` and the mixed program kept on `expected`, all 32 lanes match on both devices and the test passes. In `mixedCode` the second store (`v3` = `s8`) goes to the same lane address as the vector result, so that case only checks the scalar value. The vector load with bit 30 set is checked only by the vector-only program. `agc_driver_graphics` still expects the old rejection at `tests/Graphics.cpp:4552`: `expectSingleFailure(changed([](auto& binding) { binding.guestDescriptor[1] |= 0x40000000u; }), "reserved bits");`. With bit 30 now cleared, that binding is accepted, so this line needs to expect acceptance or be removed. The CI Linux and Windows jobs were skipped on this head, so neither failure showed up there. Not run: Windows, AMD, Code Violet or any title. GPUs tested: NVIDIA GeForce RTX 3070 (595.99.02) and lavapipe (Mesa 26.0.3), Ubuntu 26.04 Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
pushkarreddyy commented 2026-10-17 15:22:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by pushkarreddyy on 2026-10-17T15:22:49Z.


Thanks @jotitadev for the testing reproduction and for pointing out the lane indexing expectation in BufferDescriptorRuntime.cpp and the graphics test expectation at core/libs/prx/libSceAgcDriver/tests/Graphics.cpp:4552. I will update both test expectations to match the normalized descriptor semantics.

As a quick note on repository workflow: please do not submit formal GitHub Review decisions unless you are a designated project maintainer with write or merge permissions on oykopovar/AnyPS5. If you have testing results or observations to share, please post them strictly as regular discussion comments on the PR thread rather than formal reviews.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6235683053 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7089#issuecomment-6235683053). Originally posted by [pushkarreddyy](https://github.com/pushkarreddyy) on 2026-10-17T15:22:49Z. --- Thanks @jotitadev for the testing reproduction and for pointing out the lane indexing expectation in BufferDescriptorRuntime.cpp and the graphics test expectation at core/libs/prx/libSceAgcDriver/tests/Graphics.cpp:4552. I will update both test expectations to match the normalized descriptor semantics. As a quick note on repository workflow: please do not submit formal GitHub Review decisions unless you are a designated project maintainer with write or merge permissions on oykopovar/AnyPS5. If you have testing results or observations to share, please post them strictly as regular discussion comments on the PR thread rather than formal reviews.
Neithennn commented 2026-10-17 17:02:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Neithennn on 2026-10-17T17:02:52Z.


Windows NVIDIA run, since GPUs tested is n/a: two tests fail with this PR and pass on main.

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, BUILD_TESTING=ON, ANYPS5_NO_SHADER_CACHE=1. Head 2c7d0bf0d merged onto main f51724078; full build succeeds. Unchanged main on the same machine: 1398/1398.

  1. agc_driver_buffer_descriptor_runtime (this PR's test) fails 7/7 (targeted, full suite and 5 serial runs):
AGC graphics: vector or mixed buffer read changed with reserved bit 30 set

That is the new check at BufferDescriptorRuntime.cpp:145: with input[1] |= 0x40000000u the dispatch output on the RTX 4080 differs from the untouched descriptor's.

  1. agc_driver_graphics fails 6/6 (full suite and 5 serial runs) at the existing check Graphics.cpp:4589, which expects a graphics binding with guestDescriptor[1] |= 0x40000000u to be rejected:
expected graphics rejection: reserved bits

With this change bit 30 is accepted, so that expectation needs updating if accepting it is intended.

The other buffer tests (agc_driver_buffer_load_store, agc_driver_buffer_format, agc_driver_buffer_unaligned_base, the atomics) pass. Full ctest -j 8: 1396/1398, the two above being the only failures. I have not checked AMD or lavapipe, so I cannot say whether the first failure is NVIDIA-specific.

AI-assisted: yes (runs done with Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6237208398 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7089#issuecomment-6237208398). Originally posted by [Neithennn](https://github.com/Neithennn) on 2026-10-17T17:02:52Z. --- Windows NVIDIA run, since `GPUs tested` is n/a: two tests fail with this PR and pass on main. 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, `BUILD_TESTING=ON`, `ANYPS5_NO_SHADER_CACHE=1`. Head `2c7d0bf0d` merged onto main `f51724078`; full build succeeds. Unchanged main on the same machine: 1398/1398. 1. `agc_driver_buffer_descriptor_runtime` (this PR's test) fails 7/7 (targeted, full suite and 5 serial runs): ```text AGC graphics: vector or mixed buffer read changed with reserved bit 30 set ``` That is the new check at `BufferDescriptorRuntime.cpp:145`: with `input[1] |= 0x40000000u` the dispatch output on the RTX 4080 differs from the untouched descriptor's. 2. `agc_driver_graphics` fails 6/6 (full suite and 5 serial runs) at the existing check `Graphics.cpp:4589`, which expects a graphics binding with `guestDescriptor[1] |= 0x40000000u` to be rejected: ```text expected graphics rejection: reserved bits ``` With this change bit 30 is accepted, so that expectation needs updating if accepting it is intended. The other buffer tests (`agc_driver_buffer_load_store`, `agc_driver_buffer_format`, `agc_driver_buffer_unaligned_base`, the atomics) pass. Full `ctest -j 8`: 1396/1398, the two above being the only failures. I have not checked AMD or lavapipe, so I cannot say whether the first failure is NVIDIA-specific. AI-assisted: yes (runs done with Claude Code).
pushkarreddyy commented 2026-10-17 17:25:09 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by pushkarreddyy on 2026-10-17T17:25:09Z.


Thanks @Neithennn for running the full hardware suite on Windows / RTX 4080 and catching both test discrepancies!

Fixed in updated commit df02f8b4c (rebased on latest main):

  1. agc_driver_buffer_descriptor_runtime (BufferDescriptorRuntime.cpp):

    • The test was comparing all lanes against a single scalar value (value == expected), which failed for the 32-lane vector load (Code) and mixed load.
    • Updated to capture the untouched descriptor's exact dispatch output as baseline, then verify that dispatching with input[1] |= 0x40000000u produces identical results across all lanes (Require(Output == baseline)).
  2. agc_driver_graphics (Graphics.cpp):

    • Updated the expectation at line 4589 from expectSingleFailure ("reserved bits") to expectSingleAccepted(..., "a V# with reserved bit 30"), matching the normalization behavior.
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6237562619 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7089#issuecomment-6237562619). Originally posted by [pushkarreddyy](https://github.com/pushkarreddyy) on 2026-10-17T17:25:09Z. --- Thanks @Neithennn for running the full hardware suite on Windows / RTX 4080 and catching both test discrepancies! ### Fixed in updated commit `df02f8b4c` (rebased on latest `main`): 1. **`agc_driver_buffer_descriptor_runtime` (`BufferDescriptorRuntime.cpp`)**: - The test was comparing all lanes against a single scalar value (`value == expected`), which failed for the 32-lane vector load (`Code`) and mixed load. - Updated to capture the untouched descriptor's exact dispatch output as `baseline`, then verify that dispatching with `input[1] |= 0x40000000u` produces identical results across all lanes (`Require(Output == baseline)`). 2. **`agc_driver_graphics` (`Graphics.cpp`)**: - Updated the expectation at line 4589 from `expectSingleFailure` ("reserved bits") to `expectSingleAccepted(..., "a V# with reserved bit 30")`, matching the normalization behavior.
MarcZX10 commented 2026-10-17 17:48:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-17T17:48:33Z.


I checked the current head df02f8b4c and its hosted checks. The earlier NVIDIA/lavapipe runs are on 2c7d0bf0d; the updated head changes the buffer test to compare bit-30-set output against the clear-bit baseline, and the Windows/Linux jobs on df02f8b4c were skipped. Could you confirm that agc_driver_buffer_descriptor_runtime and agc_driver_graphics both pass on a real GPU with this exact head? That would verify the final test expectation and acceptance path rather than only the prior revision.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6237985828 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7089#issuecomment-6237985828). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-17T17:48:33Z. --- I checked the current head `df02f8b4c` and its hosted checks. The earlier NVIDIA/lavapipe runs are on `2c7d0bf0d`; the updated head changes the buffer test to compare bit-30-set output against the clear-bit baseline, and the Windows/Linux jobs on `df02f8b4c` were skipped. Could you confirm that `agc_driver_buffer_descriptor_runtime` and `agc_driver_graphics` both pass on a real GPU with this exact head? That would verify the final test expectation and acceptance path rather than only the prior revision.
Neithennn commented 2026-10-17 20:12:38 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Neithennn on 2026-10-17T20:12:38Z.


@MarcZX100 @pushkarreddyy Rerun of the exact head df02f8b4c on the RTX 4080: both pass now.

Windows 11 Pro 26200, NVIDIA GeForce RTX 4080 (driver 617.42), WinLibs GCC 15.2.0 r7, Ninja, Release, bundled dependencies, BUILD_TESTING=ON, ANYPS5_NO_SHADER_CACHE=1, ANYPS5_REQUIRE_VULKAN=1. The head is one commit on main 66702f1cf, built as is.

  • agc_driver_buffer_descriptor_runtime: passes (targeted, full suite and 3 serial runs); it failed 7/7 on 2c7d0bf0d.
  • agc_driver_graphics: passes (same runs); it failed 6/6 at the reserved-bits rejection on 2c7d0bf0d.
  • The other buffer tests (load/store, format, unaligned base, atomics): pass.
  • Full ctest -j 8: 1399/1399.

No title run.

AI-assisted: yes (runs done with Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6240247526 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7089#issuecomment-6240247526). Originally posted by [Neithennn](https://github.com/Neithennn) on 2026-10-17T20:12:38Z. --- @MarcZX100 @pushkarreddyy Rerun of the exact head `df02f8b4c` on the RTX 4080: both pass now. Windows 11 Pro 26200, NVIDIA GeForce RTX 4080 (driver 617.42), WinLibs GCC 15.2.0 r7, Ninja, Release, bundled dependencies, `BUILD_TESTING=ON`, `ANYPS5_NO_SHADER_CACHE=1`, `ANYPS5_REQUIRE_VULKAN=1`. The head is one commit on main `66702f1cf`, built as is. - `agc_driver_buffer_descriptor_runtime`: passes (targeted, full suite and 3 serial runs); it failed 7/7 on `2c7d0bf0d`. - `agc_driver_graphics`: passes (same runs); it failed 6/6 at the reserved-bits rejection on `2c7d0bf0d`. - The other buffer tests (load/store, format, unaligned base, atomics): pass. - Full `ctest -j 8`: 1399/1399. No title run. AI-assisted: yes (runs done with Claude Code).
pushkarreddyy commented 2026-10-18 02:40:47 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by pushkarreddyy on 2026-10-18T02:40:47Z.


Thank you @Neithennn for the Windows 11 / RTX 4080 verification and test run!

Rebased cleanly on latest origin/main (b39d90bf1) with the conflict resolved in ShaderResources.cpp (guestBufferBytes & addGuestBuffer). All pre-flight convention checks pass cleanly.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6244824666 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7089#issuecomment-6244824666). Originally posted by [pushkarreddyy](https://github.com/pushkarreddyy) on 2026-10-18T02:40:47Z. --- Thank you @Neithennn for the Windows 11 / RTX 4080 verification and test run! Rebased cleanly on latest `origin/main` (`b39d90bf1`) with the conflict resolved in `ShaderResources.cpp` (`guestBufferBytes` & `addGuestBuffer`). All pre-flight convention checks pass cleanly.
pushkarreddyy commented 2026-10-18 10:29:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by pushkarreddyy on 2026-10-18T10:29:34Z.


@oneandonlydean Cleanly rebased onto latest origin/main (64fa204f8).

All hardware test discrepancies were resolved, and @Neithennn confirmed on Windows 11 / RTX 4080 that full suite tests (agc_driver_buffer_descriptor_runtime and agc_driver_graphics) pass 1399/1399 cleanly. Ready for review when convenient!

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6248766908 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7089#issuecomment-6248766908). Originally posted by [pushkarreddyy](https://github.com/pushkarreddyy) on 2026-10-18T10:29:34Z. --- @oneandonlydean Cleanly rebased onto latest `origin/main` (`64fa204f8`). All hardware test discrepancies were resolved, and @Neithennn confirmed on Windows 11 / RTX 4080 that full suite tests (`agc_driver_buffer_descriptor_runtime` and `agc_driver_graphics`) pass 1399/1399 cleanly. Ready for review when convenient!
oneandonlydean commented 2026-10-18 10:52:09 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-18T10:52:09Z.


Thanks, the change is right. One naming point: on GFX10 (gfx1013), bit 30 of V# word 1 is CACHE_SWIZZLE (Mesa's gfx10-rsrc.json: STRIDE [29:16], CACHE_SWIZZLE [30], SWIZZLE_ENABLE [31]), a cache-bank hint with no effect on the address or data, rather than a reserved bit. Could the debt entry say that, so that it is clearly a dropped hint and not an unknown bit? "Console equivalence is unmeasured" can then go: the bit has no addressing effect to measure. And could the entry leave out the title (the PR and #7051 already record Code Violet)?

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6248960184 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7089#issuecomment-6248960184). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-18T10:52:09Z. --- Thanks, the change is right. One naming point: on GFX10 (gfx1013), bit 30 of V# word 1 is `CACHE_SWIZZLE` (Mesa's `gfx10-rsrc.json`: STRIDE [29:16], CACHE_SWIZZLE [30], SWIZZLE_ENABLE [31]), a cache-bank hint with no effect on the address or data, rather than a reserved bit. Could the debt entry say that, so that it is clearly a dropped hint and not an unknown bit? "Console equivalence is unmeasured" can then go: the bit has no addressing effect to measure. And could the entry leave out the title (the PR and #7051 already record Code Violet)?
pushkarreddyy commented 2026-10-18 11:09:24 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by pushkarreddyy on 2026-10-18T11:09:24Z.


@oneandonlydean Updated the technical debt entry in docs/dev/debt/libSceAgcDriver.md as suggested:

  • Renamed the section to [Buffer descriptor CACHE_SWIZZLE hint].
  • Explicitly documented bit 30 on GFX10 (gfx1013) as CACHE_SWIZZLE (STRIDE [29:16], CACHE_SWIZZLE [30], SWIZZLE_ENABLE [31]), a cache-bank hint with no addressing effect that is dropped during descriptor binding.
  • Removed the unmeasured equivalence and title mentions from the debt entry.
  • Rebased cleanly onto latest origin/main.
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6249149214 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7089#issuecomment-6249149214). Originally posted by [pushkarreddyy](https://github.com/pushkarreddyy) on 2026-10-18T11:09:24Z. --- @oneandonlydean Updated the technical debt entry in `docs/dev/debt/libSceAgcDriver.md` as suggested: - Renamed the section to `[Buffer descriptor CACHE_SWIZZLE hint]`. - Explicitly documented bit 30 on GFX10 (gfx1013) as `CACHE_SWIZZLE` (STRIDE [29:16], CACHE_SWIZZLE [30], SWIZZLE_ENABLE [31]), a cache-bank hint with no addressing effect that is dropped during descriptor binding. - Removed the unmeasured equivalence and title mentions from the debt entry. - Rebased cleanly onto latest `origin/main`.
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!7089
No description provided.