Skip to content

test(agc): cover a buffer descriptor in user SGPRs whose base and payload move - #9853

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
krishalivaibhav:test/draw-cache-user-vsharp-base
Oct 24, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
krishalivaibhav:test/draw-cache-user-vsharp-base

Conversation

@krishalivaibhav

@krishalivaibhav krishalivaibhav commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

What

A regression test for #9755, as MarcZX10 suggested there: two draws whose buffer descriptor (V#) sits directly in the pixel stage's user SGPRs, with a different base and a different payload on the second draw.

Test only; no driver change. It is the case Vampire Survivors (PPSA21703) hits about 150k times per 10 s late in a run, per #9755.

Tested

Linux: Ubuntu x86-64 chroot in a Lima VM on macOS (Apple Silicon), at main a6646f8 plus this change. The new case passes in DrawDataHitUserWords and in DrawDataHitUserWords_verify.

After that run, two code comments were removed to meet the conventions (a comment-only edit, not rebuilt). tools/check_conventions.py --base origin/main passes.

Windows: not built. No title was run.

Checklist

🤖 Generated with Claude Code

@MarcZX10

Copy link
Copy Markdown
Contributor

This is a useful targeted regression case for #9755, and the current behavior is described transparently. The PR is 66 commits behind current main (3bbd2321), while the reported run was on a6646f846. Please rebase and rerun both DrawDataHitUserWords variants on current main and the final PR head with the required Vulkan validation environment, since this changes an AGC test. That will confirm the test still exercises the intended shader/cache path after the intervening AGC changes.

@MarcZX10

Copy link
Copy Markdown
Contributor

The test change is confined to DrawDataHitUserWords.cpp, and the old run covered both DrawDataHitUserWords and _verify; however, that run was on a6646f846, while the PR is now based on d969e4bd and current main includes 8 commits touching this same test file since that base. Please rerun both variants on current main and the final PR head with the required validation-layer environment, and confirm the intended descriptor/cache path still behaves as expected. The PR remains open; this is a targeted test refresh request.

…load move

Two draws read a buffer descriptor held directly in the pixel stage's
user SGPRs. The second draw has another base and another payload, must
read the new payload and is a data-only hit that rebuilds the pixel
stage. Runs with and without APS5_VERIFY_DRAW_DATA_HITS.

Written with AI assistance.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@krishalivaibhav
krishalivaibhav force-pushed the test/draw-cache-user-vsharp-base branch from 7b2f7b9 to 46f4310 Compare October 23, 2026 12:33
@krishalivaibhav

Copy link
Copy Markdown
Contributor Author

Rebased onto main 83462cc; the head is now 46f4310 (same single test commit).

Thanks. I reran both DrawDataHitUserWords variants with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ANYPS5_NO_SHADER_CACHE=1 and ANYPS5_REQUIRE_VULKAN=1 on Apple M2 (macOS, MoltenVK 1.4.2), with and without the test commit: both variants pass, the layer was found, and the only validation message is VUID-VkDeviceCreateInfo-pProperties-04451 on both sides, so the change adds no VUID. Two caveats: main does not build on macOS and #8658 does not merge with current main yet, so this ran on main at d6e7ab4 + #8658 + #9263 rather than on current main and the rebased head (46f4310 on 83462cc), and MoltenVK needs APS5_NO_GPL=1. I will run the same on Linux (lavapipe) against current main and the rebased head as soon as I have a Linux machine again and post that result. The test asserts the descriptor/cache path (direct buffer recorded, second draw a data-only hit, the new payload read, the pixel stage rebuilt today) so a fix can flip it. AI-assisted.

@krishalivaibhav

Copy link
Copy Markdown
Contributor Author

Reran agc_driver_draw_data_hit_user_words_tests on Linux with the validation layer, plain and APS5_VERIFY_DRAW_DATA_HITS=1.

Environment: VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1.
GPU tested: llvmpipe (LLVM 20.1.2), Linux aarch64 VM, x86_64 chroot under Rosetta.

tree plain _verify distinct VUIDs
main 83462cc (no new test) pass pass 1
PR head 46f4310 (rebased on 83462cc) pass pass 1 (same)

The only VUID on both sides is VUID-VkDeviceCreateInfo-pNext-pNext (unknown structure type 1000574000 in the vkCreateDevice pNext chain, emitted at device creation, before any test case). It is identical on main, so the PR adds none. The validation layer was loaded (no "was not found" message).

Not covered: real GPU hardware (only llvmpipe), macOS/MoltenVK runs are in my earlier comment.
AI-assisted.

@oneandonlydean oneandonlydean self-assigned this Oct 23, 2026
@oneandonlydean
oneandonlydean merged commit ab7b4d0 into boykopovar:main Oct 24, 2026
10 checks passed
danielradosa added a commit to danielradosa/AnyPS5 that referenced this pull request Oct 25, 2026
…w_pipeline and _refresh run with APS5_NO_DRAW_PREP=1 like the draw cache reuse twins: upstream boykopovar#9853's moved-pointer case counts the pixel stage compile of each draw, and our draw prep thread compiled it first in 2 of 12 runs (0 of 12 without draw prep)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants