Repository navigation
test(agc): gate queued count-indirect case on device support - #20528
oneandonlydean merged 1 commit into
Conversation
The queued-read assertion requires the GPU count-indirect path. Keep the ordinary indirect case active when drawIndirectCount is unavailable and report the omitted count case explicitly. Co-Authored-By: Claude Code <noreply@anthropic.com> Co-Authored-By: Codex <noreply@openai.com>
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
The change gates the count-indirect test on device support while retaining the ordinary indirect case; I found no blocking defect in the changed code.
What I ran
Reviewed head 1df7763ed5010688897aebae03cbfe7d06849bb8. I read the prepared description, commit list, manifest, diff, and the complete changed file. I did not run commands or tests; repo_read.py was unavailable as a command tool.
Results
| Check | Result | Note |
|---|---|---|
| Changed-code review | passed | Guard follows reported device capability |
| Tests | not run | Results in description are author-reported |
Findings
Blocking
None.
Non-blocking
None.
Not verified
Did not independently verify the author-reported build, CTest runs, convention check, or git diff --check. No other files were changed according to the manifest; the only changed file was read in full. No excluded changed files were listed.
To get this to a good state
Nothing is required.
|
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.
|
|
Thanks for the review. AI-assisted: yes |
kurexw
left a comment
There was a problem hiding this comment.
Tested on an Apple M4 (macOS 27.2, MoltenVK 1.4.2 from the LunarG SDK 1.4.363.1, x86-64 build under Rosetta).
This PR merges cleanly. I tested main at 939d363 against this PR's commit merged onto it. I tested commit 8cdf291c9f; the current head 1df7763 has the identical patch, rebased. Both sides built apart from libcurl.prx (#17425) and TimeGetFields.cpp, which fails identically on both sides.
The test set is the 29 agc_driver_* tests that fail on main on this Mac. Environment: ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, VK_LOADER_DEBUG=layer, three runs per side. Every test process logged Insert instance layer "VK_LAYER_KHRONOS_validation" (layer 1.4.363), and none logged the missing-layer message.
| main (3 runs) | this PR (3 runs) | |
|---|---|---|
agc_driver_queued_indirect_read_order |
Subprocess aborted | Passed |
| the other 28 | Failed, identical | Failed, identical |
VUID- lines per run |
10 | 10 |
- On
main, the count-indirect case logsAGC graphics: queued indirect read: the queued draw holds no read of its indirect argument range. MoltenVK then loses the device (VK_ERROR_OUT_OF_DEVICE_MEMORY ... kIOGPUCommandBufferCallbackErrorInnocentVictim), and the test aborts withvkWaitForFences graphics: Vulkan result -4. - With this PR, the first case passes, and the second logs
skipped, the count-indirect draw needs VK_KHR_draw_indirect_count, which this device lacks. - The 10
VUID-lines are the same on both sides: 4VUID-VkDeviceCreateInfo-sType-unique(fromRecorder.cpp, addressed by #21965) and 6VUID-VkSamplerCreateInfo-samplerMipLodBias-04467.
Overlap: #21059 (which conflicts with main in Draw.cpp) also edits QueuedIndirectReadOrder.cpp. At its own merge-base on this M4, it runs the count-indirect case instead of skipping it: the driver reads the arguments on the CPU, and the test checks the result. That way the case keeps checking something on devices without drawIndirectCount. If #21059 lands, this skip may no longer be needed.
I didn't test this on Linux, Windows or another GPU vendor.
|
Windows + NVIDIA run (AMD run added below). It covers the supported count-indirect path, which the description says was not exercised on the Apple GPU. Head Setup: Windows 11 25H2 (build 26200), NVIDIA GeForce RTX 3050 6 GB (
Update, same day: AMD run added. Same head, same
AI-assisted: yes (build and runs scripted with an AI assistant, on the hardware above). |
|
Ran the focused tests with the Khronos validation layer on Linux and an NVIDIA GPU, since CI runs the GPU tests only on lavapipe and the Tested section is on MoltenVK; this covers the supported count-indirect path on Linux. Setup: Arch Linux (kernel 7.3.4), GCC 16.2.1, Release, NVIDIA GeForce RTX 4090 (vendor
No new AI-assisted: yes (Claude Code) |
|
Tested head Setup: Windows 11 Pro 10.0.26200, Ryzen 7 9800X3D, WinLibs GCC 15.2.0 r7, Release,
Whole batch: the full This is one combined tree, not a run of this PR alone. AI-assisted: yes (Claude Code) |
What
agc_driver_queued_indirect_read_orderexpects its indirect argument and count reads to stay queued while a preceding image write is pending. WithoutVK_KHR_draw_indirect_count, the count case takes the driver's CPU feature-gap path, so its queued-read assertion is not applicable. On MoltenVK it reports that the queued draw holds no argument read and aborts during shutdown.Read
DrawIndirectSupport().countfrom the test device and run that case only when supported. The ordinary indirect case still runs, and an omitted count case prints an explicit message. The packet requests at most one draw, so it does not require multi-draw support. Neighbouring indirect tests also inspectDrawIndirectSupport()for their capability-dependent checks.This is a test correction. The CPU fallback's ordering and count-clamping gaps remain; no driver behaviour changes. The supported count-indirect path is unchanged and was not exercised on this GPU.
Tested
BUILD_TESTING=ON.main324dc5aae5, then rebuild with this change. No other PRs applied.ctest -R '^agc_driver_queued_indirect_read_order$' -V -j 1: baseline fails in 3/3 runs; change passes in 3/3 runs, with the ordinary case executed and the count case explicitly omitted.ANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1,VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, andVK_LOADER_DEBUG=layer. Every log confirms insertion of validation layer 1.4.363; none reports a missing requested layer or anyVUID-error.DRAW_INDIRECTandcpu (feature gap)for the count-indirect packet. The patched trace retains the ordinary GPU path.python3 tools/check_conventions.py --base origin/mainandgit diff --checkpass.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)