Skip to content

feat(agc): run BDA byte access without storageBuffer8BitAccess - #16571

Open
ycbuzi wants to merge 5 commits into
boykopovar:mainfrom
ycbuzi:feat/agc-optional-8bit-storage
Open

ycbuzi wants to merge 5 commits into
boykopovar:mainfrom
ycbuzi:feat/agc-optional-8bit-storage

Conversation

@ycbuzi

@ycbuzi ycbuzi commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

What

Lets the AGC driver run on a Vulkan device without VK_KHR_8bit_storage / storageBuffer8BitAccess. Turnip exposes the feature only on Adreno 7xx (Mesa 25.0.7 and 25.3.6 tu_device.cc), so an Adreno 650 (Quest 2, many phones) stopped at device creation with lacks 2 items AnyPS5 needs: VK_KHR_8bit_storage (extension), storageBuffer8BitAccess (feature).

  • Shader recompiler, BDA path (SpirvBdaRead.cpp): when the target lacks StorageBuffer8BitAccess, a byte load reads the aligned 32-bit word that holds the byte and shifts it out, and a byte store is a 32-bit compare-and-swap that replaces only that byte (AtomicUpdate, the same loop the non-BDA path already uses through byteBuffers()). Byte loads, anchored 8/16-bit reads and the write_bda_bytes functions all go through the two new helpers. With the capability present the emitted code is unchanged, except that StorageBuffer8BitAccess and SPV_KHR_8bit_storage are now declared where a byte pointer is made instead of for every DMA program.
  • ValidateBdaTarget no longer requires the 8-bit capability or extension.
  • Device: QueryBdaByteFeatures reports the feature instead of throwing; VulkanDevice enables the extension, chains the feature struct and advertises capability 4448 / SPV_KHR_8bit_storage only when the device has it. ShaderDeviceProfile treats the capability like the other optional ones (advertised only if enabled, and then SPV_KHR_8bit_storage must be listed). The host report lists VK_KHR_8bit_storage as optional, and USAGE.md drops it from the required list.
  • The fallback touches the three neighbouring bytes of the word, so it relies on BDA host ranges being whole aligned dwords, as guest buffer chunks are. That is recorded in docs/dev/debt/shader.md, together with the unmeasured speed of the atomic byte stores.

Related: #4847 skips adapters without 8-bit storage during selection; after this PR that feature is no longer a reason to skip one.

Overlap: #7392 changes the fault condition at the top of EmitBdaByte (the lines this PR replaces with one LoadPhysicalByte call). The two changes are independent: whichever lands second keeps the other's condition around the single load call, a small rebase.

Tested

Windows 11 Home 26200, MinGW g++ 15.2.0, agc_driver_bda_device, agc_host_report_vulkan, agc_shader_device_profile:

  • agc_driver_bda_device now runs every BDA GPU read, span, anchored and store/write boundary case twice: with 8-bit pointers and with the 32-bit word fallback (SetBdaTestBytePointers). Both pass on all three GPUs (BDA store boundary tests passed with 8-bit pointers / ... with 32-bit word byte access). The store cases use 2- and 3-byte buffers and check that bytes outside the mapped span are unchanged.
  • BdaContracts checks that byte accesses declare 8-bit storage only on a target that has it, that ValidateBdaTarget accepts a target without it, and that the CAS byte store is still seen by SpirvStoresThroughAddresses. The fallback store shaders pass ValidateAndOptimizeSpirv.
  • agc_shader_device_profile profiles a device without the feature; agc_host_report_vulkan expects it as optional.
  • Validation layer A/B, main d7240ef vs this branch (6caa788; the two later commits change only docs), Vulkan SDK 1.4.363.0 Khronos layer from a non-elevated process, ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ctest -R '^(agc_driver_bda_device|agc_host_report_vulkan|agc_shader_device_profile)$' -V, two runs per GPU per side: 3/3 passed in every run, 0 VUID- lines, no was not found but was requested by env var VK_INSTANCE_LAYERS line. A best-practices control on agc_driver_bda_device wrote 15 layer log lines on each side, so the layer was loaded.
  • After merging main 2e48261 (merge c52bc51; the only conflict was docs/dev/debt/shader.md, both sides' entries kept), the A/B was rerun on main 2e48261 vs c52bc51 with the same layer and variables, ctest -R '^agc_(driver_bda_device.*|driver_host_import_failure_handles|host_report_vulkan|shader_device_profile)$' -V, one run per GPU per side on the RTX 4070 SUPER, GTX 1650 SUPER and Radeon iGPU: 5/5 passed in every run, 0 VUID- lines on either side, no missing-layer line, and the branch logs show both BDA store boundary tests passed with 8-bit pointers and ... with 32-bit word byte access on each GPU. A best-practices control wrote 24 layer log lines on each side.
  • Not tested yet: an Adreno 650 under Turnip itself. A Linux build of this branch for that device is in progress.

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: NVIDIA GeForce RTX 4070 SUPER and NVIDIA GeForce GTX 1650 SUPER (driver 616.92 / 32.0.16.1692), AMD Radeon(TM) Graphics iGPU, Ryzen 9 7900 (driver 32.0.21030.2001), Windows 11 Home 26200
  • AI-assisted: yes (Claude Code)

🤖 Generated with Claude Code

ycbuzi and others added 4 commits November 6, 2026 22:35
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JJenkx

JJenkx commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

AMD check of head 22ae5d725d, merged onto main f1030687de (ad4fce1d29, clean merge).

Setup: Windows 11 Enterprise 22621, WinLibs GCC 15.2 UCRT, Release, Radeon RX 6700 XT (RDNA 2), AMD driver 26.10.1. Run through the Windows test queue with ANYPS5_REQUIRE_VULKAN=1 and Vulkan validation layers 1.4.363, each test repeated 3 times. The hosted Windows check does not run these GPU tests on pull requests.

  • agc_driver_bda_device_selection_cpu, agc_driver_host_import_failure_handles and agc_host_report_vulkan pass. None were skipped and there were no validation messages.
  • This RX 6700 XT exposes storageBuffer8BitAccess, so this run covers the existing path and the CPU selection test; it does not execute the new fallback on a device without the feature.

AI-assisted: yes.

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

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/Execution/src/VulkanDevice.cpp
PR 4448 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 4472 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 4847 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/user/USAGE.md
PR 5925 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/user/USAGE.md
PR 6188 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 6280 docs/dev/debt/shader.md
PR 6412 docs/dev/debt/shader.md
PR 6488 docs/dev/debt/shader.md
PR 6924 docs/dev/debt/shader.md
docs/user/USAGE.md
PR 7002 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 7392 core/shader/recompiler/SpirvBackend/src/SpirvBdaRead.cpp
docs/dev/debt/shader.md
PR 7642 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/tests/BdaContracts.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
docs/user/USAGE.md
PR 7643 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 7684 docs/dev/debt/shader.md
PR 9289 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 9345 docs/user/USAGE.md
PR 9356 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 9387 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
docs/dev/debt/shader.md
PR 9508 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/tests/BdaContracts.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderDeviceProfile.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
docs/user/USAGE.md
PR 9633 docs/dev/debt/shader.md
PR 9749 docs/dev/debt/shader.md
PR 9790 core/shader/recompiler/SpirvBackend/src/SpirvBdaRead.cpp
docs/dev/debt/shader.md
PR 9969 core/shader/recompiler/SpirvBackend/src/SpirvBdaRead.cpp
docs/dev/debt/shader.md
PR 10193 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/tests/BdaContracts.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
docs/user/USAGE.md
PR 10351 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 10861 docs/user/USAGE.md
PR 10867 core/libs/prx/libSceAgcDriver/Execution/src/ShaderDeviceProfile.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderDeviceProfile.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 11435 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 11483 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/debt/shader.md
PR 11551 core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 12678 docs/user/USAGE.md
PR 12746 docs/user/USAGE.md
PR 12828 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 12863 docs/user/USAGE.md
PR 12944 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
docs/dev/debt/shader.md
PR 13148 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 13863 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 13920 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 13928 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/tests/BdaContracts.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
docs/user/USAGE.md
PR 13929 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/tests/BdaContracts.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
docs/user/USAGE.md
PR 14217 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 14218 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 14260 core/shader/recompiler/SpirvBackend/src/SpirvBdaRead.cpp
PR 14853 docs/dev/debt/shader.md
PR 14871 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
docs/dev/debt/shader.md
PR 15343 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 15456 docs/user/USAGE.md
PR 15488 docs/dev/debt/shader.md
PR 15548 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 15555 core/shader/recompiler/SpirvBackend/src/SpirvBdaRead.cpp
docs/dev/debt/shader.md
PR 15973 docs/user/USAGE.md
PR 16321 docs/dev/debt/shader.md
PR 16354 docs/user/USAGE.md
PR 16415 docs/dev/debt/shader.md
PR 16796 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 16812 core/shader/recompiler/SpirvBackend/src/SpirvBdaRead.cpp
PR 16814 core/shader/recompiler/SpirvBackend/src/SpirvBdaRead.cpp
PR 16831 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 16953 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 17056 core/libs/prx/libSceAgcDriver/Execution/src/ShaderDeviceProfile.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderDeviceProfile.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 17259 docs/user/USAGE.md
PR 17557 docs/user/USAGE.md
PR 17558 docs/user/USAGE.md
PR 17606 docs/dev/debt/shader.md
PR 17611 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 17943 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 18029 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 18082 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/user/USAGE.md
PR 18106 core/shader/recompiler/SpirvBackend/src/SpirvBdaRead.cpp
docs/dev/debt/shader.md
PR 18107 core/shader/recompiler/SpirvBackend/src/SpirvBdaRead.cpp
docs/dev/debt/shader.md
PR 18173 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 18241 docs/dev/debt/shader.md
PR 18693 docs/user/USAGE.md
PR 18829 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 19532 docs/user/USAGE.md
PR 19557 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 19821 core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 20030 core/libs/prx/libSceAgcDriver/Execution/src/ShaderDeviceProfile.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 20111 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 20131 docs/dev/debt/shader.md
PR 20172 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 20248 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 20519 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/tests/BdaContracts.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 21211 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/user/USAGE.md
PR 21303 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 21923 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 22001 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 22025 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 22029 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 22071 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 22190 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 22424 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/tests/BdaContracts.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 22434 docs/user/USAGE.md
PR 22439 core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 22531 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 22546 docs/user/USAGE.md
PR 22647 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/user/USAGE.md
PR 22692 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 22697 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 22944 core/libs/prx/libSceAgcDriver/tests/BdaContracts.cpp
core/libs/prx/libSceAgcDriver/tests/BdaDevice.cpp
core/libs/prx/libSceAgcDriver/tests/BdaShader.hpp
core/shader/recompiler/SpirvBackend/src/SpirvBdaRead.cpp
PR 23244 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 23409 core/libs/prx/libSceAgcDriver/tests/ShaderDeviceProfile.cpp
PR 23553 core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 23587 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 23595 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 23636 docs/user/USAGE.md
PR 23781 docs/user/USAGE.md
PR 23842 docs/user/USAGE.md
PR 23955 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 23975 docs/user/USAGE.md
PR 24277 docs/user/USAGE.md
PR 24294 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 24327 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 24472 docs/user/USAGE.md
PR 24661 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 24704 core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 24714 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 24756 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/tests/BdaDevice.cpp
docs/user/USAGE.md
PR 24915 docs/user/USAGE.md
PR 25010 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 25483 docs/user/USAGE.md
PR 25559 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 25978 core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 26613 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 26686 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 27133 docs/user/USAGE.md
PR 27288 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 27343 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 27744 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 27811 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/SpirvBackend/src/SpirvBdaRead.cpp
PR 27870 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 27887 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 28001 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 28059 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 28142 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 28164 docs/user/USAGE.md
PR 28193 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 28209 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 28234 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 28252 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 28277 docs/user/USAGE.md
PR 28290 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 28291 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 28292 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 28293 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 28296 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 28372 docs/user/USAGE.md
PR 28384 docs/user/USAGE.md
PR 28387 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 28388 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 28389 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 28396 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 28411 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 28419 docs/user/USAGE.md
PR 28421 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 28470 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/tests/BdaContracts.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 28476 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 28480 core/shader/recompiler/SpirvBackend/src/SpirvBdaRead.cpp
PR 28487 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/tests/BdaContracts.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 28488 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/user/USAGE.md
PR 28490 core/libs/prx/libSceAgcDriver/Execution/src/ShaderDeviceProfile.cpp
PR 28520 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 28525 core/shader/recompiler/SpirvBackend/src/SpirvBdaRead.cpp
PR 28537 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 28586 core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 28590 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 28624 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 28659 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 28668 core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 28673 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/tests/BdaContracts.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 28692 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 28702 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 28704 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 28770 docs/user/USAGE.md
PR 28793 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 28805 docs/user/USAGE.md
PR 28861 core/libs/prx/libSceAgcDriver/tests/BdaContracts.cpp
PR 28894 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 28925 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 28928 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 28930 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 28933 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 28934 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 28936 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 28938 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 28943 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 28948 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 28954 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 28957 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 28958 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 28962 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 28964 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 29000 docs/user/USAGE.md
PR 29032 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 29033 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 29038 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 29039 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 29042 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/tests/BdaContracts.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 29051 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 29053 docs/user/USAGE.md
PR 29058 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 29060 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 29066 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/tests/BdaContracts.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 29067 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/tests/BdaContracts.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 29074 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 29076 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/tests/BdaContracts.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 29084 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/tests/BdaContracts.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 29085 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 29087 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/tests/BdaContracts.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 29089 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/tests/BdaContracts.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 29095 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/tests/BdaContracts.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 29096 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 29097 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 29098 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 29101 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/tests/BdaContracts.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 29102 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 29103 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/tests/BdaContracts.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 29104 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/tests/BdaContracts.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 29105 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/tests/BdaContracts.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 29106 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/tests/BdaContracts.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 29107 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/tests/BdaContracts.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 29108 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 29110 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 29113 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 29115 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 29116 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 29117 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 29118 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/tests/BdaContracts.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 29119 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 29120 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 29121 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/tests/BdaContracts.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 29123 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/tests/BdaContracts.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 29218 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp

@ycbuzi

ycbuzi commented Nov 7, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the RX 6700 XT run.

On the fallback: it doesn't need a device without the feature. agc_driver_bda_device emits every BDA read, span, anchored and store case a second time with the 8-bit capability taken out of the emitter's target (SetBdaTestBytePointers(false)), so those shaders use only the 32-bit word loads and CAS stores and run on whatever GPU the test opens. Its log then has both BDA store boundary tests passed with 8-bit pointers and ... with 32-bit word byte access. If you rerun agc_driver_bda_device on the 6700 XT, that covers the new path on RDNA 2; here it passed on an RTX 4070 SUPER, a GTX 1650 SUPER and a Ryzen 7900 iGPU.

A device that really lacks the feature (Adreno 650 under Turnip) is being tried next, and I'll post that result here.

AI-assisted: yes (Claude Code)

@github-actions github-actions Bot added shader core/shader docs agc libSceAgc* labels Nov 7, 2026
@ycbuzi

ycbuzi commented Nov 7, 2026

Copy link
Copy Markdown
Contributor Author

Result on a device that really lacks the feature: Meta Quest 2 (Snapdragon XR2, Adreno 650), Turnip from Mesa 25.0.7, AnyPS5's Linux x86-64 build under box64 0.4.5 in a Debian proot, running the ccleste homebrew.

The build is release v0.1.4 (7fcab08f71e) with this PR's six production files applied (55072203c8e), because that device runs the v0.1.4 relinker and libraries. Only libSceAgcDriver.prx was rebuilt; the rest are the release files.

  • Before: Vulkan: Turnip Adreno (TM) 650 ... lacks 2 items AnyPS5 needs: VK_KHR_8bit_storage (extension), storageBuffer8BitAccess (feature), and no device was created.
  • With the change: Selected GPU Turnip Adreno (TM) 650, host report VK_KHR_8bit_storage: extension optional missing and every required item present, Vulkan device ready, Swapchain created extent=1152x648 images=3. Shaders were prepared and draws were submitted. The run then stopped 11 s in on a different limit (an address-based build copies 224 MiB ... past 64 MiB (APS5_ADDRESS_COPY_MAX_MIB)), which comes from Android refusing userfaultfd (write watch unavailable: userfaultfd failed (Function not implemented)). That is outside this PR.

AI-assisted: yes (Claude Code)

@blawesom

blawesom commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Read through the fallback end to end. LoadPhysicalByte (SpirvBdaRead.cpp:59) word-aligns the address, loads with Aligned|4 and shifts out the byte, and EmitBdaByteStoreAt merges the byte with a device-scope OpAtomicCompareExchange retry loop — the same AtomicUpdate primitive writeBuffer already uses for subword SSBO writes, so the pattern has precedent. The merge looks race-free: the CAS compares the full word, so a neighbouring byte store — atomic or plain — between the load and the exchange fails the compare and retries with the new value, and unaligned offsets are handled by (addr&3)*8 on a genuinely 4-aligned word address. The note-write still follows the store in EmitBdaWriteAt, and the AcquireRelease barrier at the end of the CAS can only strengthen that ordering, so the written-page record cannot run ahead of the data. With the capability present the emitted code is identical to main except the capability/extension are now declared at point-of-use, which strictly weakens requirements for DMA programs without byte accesses. The word RMW touching the three neighbour bytes is the one real assumption, and it is correctly filed in docs/dev/debt/shader.md; worth noting the 2-/3-byte store-test buffers live in pooled allocations with slack, so those cases prove byte preservation rather than the whole-dword invariant itself.

On RADV (which exposes the feature) the fallback is only reachable through agc_driver_bda_device's SetBdaTestBytePointers(false) pass — there is no env var to force it in a game run, which is fine given the Adreno 650 result in the comments; a forced-fallback env var would be a reasonable follow-up if field testing ever needs it. A RADV validation-layer run of the focused set follows separately from me.

AI-assisted: yes

@blawesom

blawesom commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

RADV validation-layer run of head 22ae5d725d merged onto main 0cdb9e4a961 (clean): CachyOS x86-64, kernel 7.3.1, AMD Radeon RX 9070 XT (RADV GFX1201), Mesa 26.2.5, Khronos validation layer 1.4.363, GCC 16.2.1, Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON, both arms sequentially on the same GPU with ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1.

agc_driver_bda_device, _selection_cpu, agc_host_report_vulkan and agc_shader_device_profile pass 4 of 4 on both arms, and the log carries BDA store boundary tests passed with 32-bit word byte access, so the SetBdaTestBytePointers(false) pass exercises the word-RMW fallback on this vendor too. Neither log contains a VUID- line or was not found but was requested by env var VK_INSTANCE_LAYERS. That gives the fallback a clean validation run on RADV alongside your Adreno 650 result, with the fast path unchanged.

AI-assisted: yes

@gabichuuuuu gabichuuuuu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran 22ae5d725d merged on main 302864d on Windows 11 x64 (WinLibs GCC 15.2), on an NVIDIA laptop GPU (Turing, driver 610) and an Intel iGPU (driver 101.70xx), with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation (Khronos validation layer 1.4.368), ctest -R '^(agc_driver_bda|agc_bda|agc_host_report_vulkan|agc_shader_device_profile)' -V.

main main + the PR's test files only change
NVIDIA 11/11 8/11 11/11, twice
Intel 11/11 8/11 11/11, twice
  • Without the driver and recompiler changes, the PR's tests fail on both GPUs: agc_driver_bda_device ("BDA requires unsupported SPIR-V capability 4448"), agc_host_report_vulkan ("the absent 8-bit storage extension is not listed as optional and missing") and agc_shader_device_profile ("shader runtime requires enabled storageBuffer8BitAccess").
  • Both GPUs here have storageBuffer8BitAccess, so the device itself never takes the new path. agc_driver_bda_device still runs the BDA read and store execution tests on each real device twice, and both runs pass on both GPUs: "BDA store boundary tests passed with 8-bit pointers" and "BDA store boundary tests passed with 32-bit word byte access".
  • The layer was inserted in every test that opens a Vulkan device (agc_bda_atomics, agc_driver_bda_device_selection_cpu, agc_host_report_vulkan and agc_shader_device_profile open none). No log has was not found but was requested by env var VK_INSTANCE_LAYERS, and no log on either side has a VUID-: the 32-bit word loads compile to SPIR-V the layer accepts. To be sure validation messages reach these logs, the same layer with best practices on printed 28 BestPractices- warnings into an agc_driver_recorder log on each GPU.

Not covered here: a device that really lacks storageBuffer8BitAccess, where VulkanDevice no longer enables the extension or chains byteFeatures; both GPUs here report the feature.

AI-assisted: yes.

@ycbuzi

ycbuzi commented Nov 8, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @blawesom for the RADV run and @gabichuuuuu for NVIDIA and Intel. The middle column (the PR's tests failing without the driver and recompiler changes) is a useful proof that the tests check the new code. With RADV, NVIDIA, Intel and the Adreno 650, the word-RMW fallback now has clean validation runs on four vendors.

AI-assisted: yes (Claude Code)

@oneandonlydean oneandonlydean self-assigned this Nov 9, 2026
@oneandonlydean

Copy link
Copy Markdown
Collaborator

Hi @ycbuzi,

Thanks for this, and the review came back fine. We're putting it on hold rather than merging it for now.

The reason is direction, not the code: right now the project is focused on performance and stable Linux and Windows on desktop GPUs, and we've paused work whose purpose is ARM or mobile GPU support (Turnip, Adreno, Quest and phones) until that direction opens up again. Making 8-bit storage optional is a reasonable fallback, but its only use today is those devices, so it waits with the rest of that work.

We're leaving the PR open so it can pick up from here when ARM support is back on the list. Nothing is needed from you in the meantime.

@ycbuzi

ycbuzi commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

@oneandonlydean understood, thanks for explaining. I will leave it open and rebase it when ARM and mobile GPU work opens up again.

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Nov 13, 2026
…t-storage

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 16, 2026
@domx4q

domx4q commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Ran the description's A/B set on Linux and NVIDIA's proprietary driver with the Khronos validation layer; the Tested section covers Windows only.

Setup: Arch Linux (kernel 7.3.4), GCC 16.2.1, Release, NVIDIA GeForce RTX 4090 (vendor 0x10de, device 0x2684, Ada), proprietary driver 620.70.06, Vulkan 1.4.357, Khronos validation layer 1.4.363.1. Head c52bc51945 merged onto main e4caa07950 with --no-ff, clean merge. Main baseline is a Release build of e4caa07950 on the same machine. The branch already contains main up to 2e48261498, so the merged tree also carries those commits.

ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer \
ctest --test-dir build -R '^agc_(driver_bda_device.*|driver_host_import_failure_handles|host_report_vulkan|shader_device_profile)$' -V
main e4caa07950 this PR
Result 5/5 passed 5/5 passed
Insert instance layer "VK_LAYER_KHRONOS_validation" 2 2
was not found but was requested by env var VK_INSTANCE_LAYERS 0 0
VUID- none none

The loader picked the RTX 4090 in both logs. On the branch agc_driver_bda_device prints both BDA store boundary tests passed with 8-bit pointers and BDA store boundary tests passed with 32-bit word byte access.

Negative control: the merged tree with main's SpirvBdaRead.cpp builds, and agc_driver_bda_device fails with BDA requires unsupported SPIR-V capability 4448, so the test does exercise the word fallback.

No new VUID- errors; all focused tests pass on Ada.

AI-assisted: yes (Claude Code)

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Nov 19, 2026

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — changes requested

Changes are required before merge: make the word fallback safe when a mapped BDA range ends inside a 32-bit word.

What I ran

Reviewed head c52bc51945abbb4ed289636d8c78000cf9cc19b2 using repo_read.py to inspect the prepared diff and targeted source context. No commands or tests were run.

Results

Check Result Note
Diff and targeted source review passed BDA access paths and range construction reviewed
Tests not run Author-reported tests were not rerun

Findings

Blocking

  • core/shader/recompiler/SpirvBackend/src/SpirvBdaRead.cpp:68-70,158-162: The fallback rounds the physical byte address down and reads or atomically updates the full containing u32. BDA ranges can be exact-sized copied buffers; the reader-side table construction preserves region.begin/region.end, and the buffer allocation uses that exact region size. A byte access in the last one to three bytes of a range can therefore make the shader touch bytes beyond the mapped range and Vulkan buffer. The debt note records an alignment assumption, but the range construction inspected here does not enforce dword-sized range boundaries. Ensure fallback accesses are contained within the mapped allocation (for example, by padding and mapping edge words or using a safe edge path), and add coverage for reads and writes at a range tail.

Non-blocking

None.

Not verified

  • The full text of core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp was excluded from the review folder due to size; the relevant changed areas were read through repo_read.py.
  • core/libs/prx/libSceAgcDriver/Execution/src/BdaFeatures.cpp, HostReportVulkan.cpp, ShaderDeviceProfile.cpp; tests BdaContracts.cpp, BdaDevice.cpp, BdaShader.cpp, BdaShader.hpp, HostReportVulkan.cpp, ShaderDeviceProfile.cpp; core/shader/recompiler/SpirvBackend/src/SpirvBdaRead.cpp, SpirvMemory/SpirvEmitterHelpers.cpp; and docs/dev/debt/shader.md, docs/user/USAGE.md were read in relevant ranges. Other portions of these files were not read.
  • Adreno 650 / Turnip behavior and the author-reported GPU test runs were not independently verified.

To get this to a good state

Make the fallback safe at BDA range edges, then rerun the BDA contract and device tests, including byte reads and writes at the final bytes of a mapped range.

@ligmaSec ligmaSec left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The trial merge onto c1601e56d5 conflicts in SpirvBdaRead.cpp. Please retain logical byte-range validation ahead of the aligned-word fallback and the fixture that checks a byte write leaves neighboring bytes unchanged. The disabled-8-bit-storage profile should also verify capability emission, so a supported GPU does not mask an extension requirement on the fallback path. Move the direct shader debt edit into a fragment on the resolved head.

AI-assisted: yes.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* docs needs rebase Conflicts with main, rebase needed shader core/shader

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants