test(agc): check the stop variants of read_bda_span for a nested load_bda_span call #27718
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/27718"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by zarmstrong on 2026-11-27T05:31:09Z.
What
Follow-up to #22774, as @MarcZX10 suggested in review there. The call-nesting contract in
RunBdaContractTestscheckedread_bda_spanandread_bda_span_coherentonly. A program whose BDA reads stop invocations getsread_bda_span_stopandread_bda_span_stop_coherentfrom the sameDefineBdaSpanReadFunction, so the contract now checks all four for aload_bda_spancall inside a selection or loop. Test-only change.Tested
Windows 11 Pro 10.0.26200, WinLibs GCC 15.2.0 r7, Release, NVIDIA GeForce RTX 5090, driver 621.01, Khronos validation layer 1.4.363 (overlay layers disabled with
VK_LOADER_LAYERS_DISABLE).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_.*bda.*|agc_shader_memory.*|shader_memory_decoder_tolerance|agc_driver_pixel_interlock|agc_driver_scalar_wide_loads' -V, 23 tests, 3 runs each onmain02fe966861and on this change on top of it: 23/23 pass every run on both. Each log shows the loader insertingVK_LAYER_KHRONOS_validationin all 17 Vulkan tests, none containswas not found but was requested by env var VK_INSTANCE_LAYERS, and neither has anyVUID-line.SpirvBdaRead.cppfrom before #22774 (45d8797428^) and the nestingRequiretemporarily replaced by a print, all four variants report a nesting of 1:read_bda_span,read_bda_span_coherent,read_bda_span_stop,read_bda_span_stop_coherent.agc_driver_bda_devicethen fails on the 5090 with the #22773 message,an anchored BDA read differs from the same read through the lookups.tools/check_conventions.py: all checks passed.tools/pr_overlap.py --branchcould not compare 9 PRs that already conflict withmain(#7642, #9508, #10193, #13928, #13929, #16571, #20519, #22424, #22944); I compared theirBdaContracts.cppchanges by hand and none touches this check.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Summary by CodeRabbit
stopsandcoherentvalues, verifying loader selection and call nesting behavior.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-27T05:55:39Z.
Review: APPROVED
Reviewed — looks good
The change adds the nested-call contract checks for all four BDA read variants; I found no defect in the changed test logic.
What I ran
Reviewed head
5ecbe1172e56feab3cc2daedda1954c7408ba978usingrepo_read.pyto inspect the prepared description, commit list, manifest, diff, changed file, and theCallNestinghelper. No tests were run in this review.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
The full project test suite and the author-reported GPU and Windows test runs were not independently run. No files were excluded according to the manifest;
files.jsonwas unavailable in the prepared review folder.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by Plyxen on 2026-11-27T06:03:33Z.
Review: APPROVED
Checked head
5ecbe1172eon Windows 11 with WinLibs GCC 15.2 (Release), applied alone tomainad7582bad4, on both GPUs in this machine: AMD Radeon(TM) Graphics (driver 26.11.2) and NVIDIA GeForce RTX 5080 (driver 621.24).tools/check_conventions.py --headpassed.agc_driver_bda_devicepassed onmainand with this PR on each GPU, withANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1,VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation,VK_LOADER_DEBUG=layerand the layer from Vulkan SDK 1.4.363.0. Each log showsInsert instance layer "VK_LAYER_KHRONOS_validation", and none haswas not found but was requested by env var VK_INSTANCE_LAYERSor anyVUID-line.The change is test-only, so there's no
mainsource to revert. The new names match whatSpirvBdaRead.cpp:186emits (read_bda_span, then_stop, then_coherent), andCallNestingreturns no value for a function that isn't there. So the stop variants are really checked now, and a call toload_bda_spannested inside a selection or loop in them would fail the test.AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T18:59:58Z.
Review: COMMENTED
agc_driver_bda_deviceand the scalar-buffer control both passed on Linux/lavapipe on the same baseline and at5ecbe1172e. Both logs show the Khronos validation layer inserted and contain no missing-layer warnings or VUID messages. The revised contract checks nesting for both stop-mode readers alongside the existing two variants.AI-assisted: yes.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.