test(agc): gate queued count-indirect case on device support #20528
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/20528"
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 kali113 on 2026-11-15T08:33:52Z.
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)Imported from boykopovar/AnyPS5. Originally posted by copilot-pull-request-reviewer[bot] on 2026-11-15T08:34:00Z.
Review: COMMENTED
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-15T09:08:17Z.
Review: APPROVED
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.pywas unavailable as a command tool.Results
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.
Imported from boykopovar/AnyPS5. Originally posted by kurexw on 2026-11-17T03:23:21Z.
Review: COMMENTED
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
mainat939d3630edagainst this PR's commit merged onto it. I tested commit 8cdf291c9f; the current head1df7763ed5has the identical patch, rebased. Both sides built apart fromlibcurl.prx(#17425) andTimeGetFields.cpp, which fails identically on both sides.The test set is the 29
agc_driver_*tests that fail onmainon 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 loggedInsert instance layer "VK_LAYER_KHRONOS_validation"(layer 1.4.363), and none logged the missing-layer message.agc_driver_queued_indirect_read_orderVUID-lines per runmain, 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.skipped, the count-indirect draw needs VK_KHR_draw_indirect_count, which this device lacks.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
maininDraw.cpp) also editsQueuedIndirectReadOrder.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 withoutdrawIndirectCount. If #21059 lands, this skip may no longer be needed.I didn't test this on Linux, Windows or another GPU vendor.