Repository navigation
Conversation
ANYPS5_GPU matches device names only, so of two GPUs with the same name the second can never be selected. ANYPS5_GPU_INDEX restricts selection to the device at a zero-based position in vkEnumeratePhysicalDevices order, the GPU<N> numbering vulkaninfo prints. With ANYPS5_GPU set as well the device must match both. Any value other than up to four decimal digits is refused. The driver and the test fixtures that read ANYPS5_GPU honour it, a set index keeps a Vulkan failure from being reported as a skip, and the validation gate and frame replay tools forward it with ANYPS5_GPU. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — no blocking findings
The inspected selection logic implements index filtering with the existing name and device capability checks; checks were not run in this review.
What I ran
- Reviewed head
1ac7796a162030ae0d94e7f2577896fbb17b9520usingrepo_read.py. - No commands or tests were run in this review environment.
- Read the prepared description, commits, manifest, and diff for all 11 changed files. Read head context for nine changed source files:
GpuIndex.hpp,VulkanDevice.cpp,BdaDevice.cpp,PerformanceOverlay.cpp,Recorder.cpp,FixtureDeviceSelection.cpp,FixtureDeviceSelection.hpp,PresentUpscale.cpp, andSampledCacheBudget.cpp; also read the changed portions offrame_replay_compare.pyandvulkan_validation_gate.py. - The documentation changes were reviewed in the diff. Full head text was unavailable for
VulkanDevice.cppandRecorder.cppbecause they exceeded the review folder's size limit; their changed hunks and relevant head ranges were read.
Results
| Check | Result | Note |
|---|---|---|
| Diff and selection logic | passed | No concrete defect found |
| Automated checks | not run | No execution tool available |
| Reported author checks | not run | Recorded in the PR description |
Negative control
Not run; no test execution tool was available.
Findings
Blocking
None.
Non-blocking
None.
Sources
Not verified
Builds, automated tests, and hardware behavior were not independently verified. Full file text for VulkanDevice.cpp and Recorder.cpp was not available; only their changed diff and relevant head ranges were inspected. The documentation changes were inspected in the diff, not through full head-file reads.
To get this to a good state
Nothing is required. Optional: run the reported CPU checks and targeted Vulkan tests on the new head.
|
Independent Windows CPU-fixture check on head
Scope: this is independent execution of the CPU fixture/parser tests with synthetic physical-device properties and handles. It does not independently verify physical multi-GPU enumeration, the runtime |
|
Independent physical runtime check on Windows 11 build 26300, WinLibs GCC 15.2.0 r7. I applied the device-selection changes from
|
|
Looks good on AMD RDNA4 with the Khronos validation layer. The selection tests pass 3/3 on the head, with 0
One non-blocking point: no ctest covers the new filter in What this run adds.
Code.
Negative control.
Mutation.
GPU. Head The
Validation.
Host:
AI-assisted: yes |
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
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.
|
There was a problem hiding this comment.
The production loop preserves enumeration indices even when earlier devices fail the Vulkan version check, and applies both filters when the user sets both variables. Please include that same index beside each name in the rejection diagnostic. The current comma-separated names are ambiguous on the twin-GPU setup this option is meant to address. A standalone run of the exact parser passed 11 inputs, including zero, leading zeroes, the maximum four-digit value, unset and empty values, and six rejected forms. The single-device Linux integration checks are queued. Twin physical device selection is covered by the posted Windows run.
AI-assisted: yes.
What
Adds
ANYPS5_GPU_INDEX, which restricts Vulkan physical device selection to the device at a zero-based position invkEnumeratePhysicalDevicesorder (theGPU<N>numberingvulkaninfo --summaryprints).ANYPS5_GPUmatches names only, so on a machine with two GPUs of one model (two RTX 5090 here) the second card could not be selected: every name request and the default ranking take the first one.Execution/include/GpuIndex.hpp:ParseGpuIndex/RequestedGpuIndex. Empty or unset means no index; up to four decimal digits; anything else throws naming the variable.VulkanDevice.cpp: an index request skips every other device and, like a name request, counts as an explicit request (rank 4, no software-fallback warning, no rejected-hardware note). With both variables set the device must match both. A request that matches nothing throwsVulkan: no usable device at ANYPS5_GPU_INDEX=N[ whose name contains ANYPS5_GPU="..."]; devices: ...; the name-only message is unchanged.FixtureDeviceSelection.hppand the selectors inBdaDevice.cpp,PerformanceOverlay.cpp,Recorder.cpp,SampledCacheBudget.cpp,PresentUpscale.cpp) honour the index the same way, and a set index, like a set name, keeps a Vulkan failure from being reported as a skip.tools/vulkan_validation_gate.pyreports the variable with the other public selection variables;tools/frame_replay_compare.pyrequires it to be shared by both arms, asANYPS5_GPUis.docs/dev/ENVIRONMENT.mdanddocs/user/USAGE.md(GPU selection) document it.Tested
Windows 11 Pro 26200, WinLibs GCC 15.2.0 r7, full Release build with
BUILD_TESTING=ON. Devices as enumerated: GPU0 RTX 5090 (bus 01:00.0), GPU1 AMD Radeon(TM) Graphics (Ryzen 9 9950X3D2 iGPU), GPU2 RTX 5090 (bus 03:00.0); NVIDIA 621.24, AMD 32.0.x.agc_driver_fixture_device_selection(twin-name selection, index with and without a name, out of range, below Vulkan 1.1, parsing of-1,1a,1,0x1,12345,+2, error texts),agc_driver_bda_device_selection_cpu,agc_recorder_device_selection,agc_sampled_cache_device_selection,agc_performance_overlay_device_selection_cpu; alsoenv_reference,vulkan_validation_gate_*,frame_replay_compare.ANYPS5_REQUIRE_VULKAN=1:ANYPS5_GPU_INDEX=1runsagc_driver_bda_deviceon the Radeon (passes);=2usesNVIDIA GeForce RTX 5090, andnvidia-smi -q -d PIDSlists the test process only under 0000:03:00.0;=3fails withno Vulkan 1.1 device at ANYPS5_GPU_INDEX=3; devices: NVIDIA GeForce RTX 5090, AMD Radeon(TM) Graphics, NVIDIA GeForce RTX 5090.ctest -j 20on GPU2 (ANYPS5_GPU_INDEX=2): 6532 of 6536 pass. The four failures are the known NVIDIA/Windows ones, each with an open fix:agc_driver_bda_device(agc_driver_bda_device fails on NVIDIA Blackwell (RTX 5090, 621.01): read_bda_span gives the lanes on its dword path other lanes' results #22773, fix(shader): call load_bda_span outside read_bda_span's per-lane selection #22774),agc_driver_stencil_plane_memory(agc_driver_stencil_plane_memory fails on Windows hardware GPUs: "a consumed stencil clear was lost on a read-only rebind" #22427, fix(agc): keep an unstored depth or stencil plane out of an import rewatch #22508),agc_driver_msaa_dcc_unwatch(agc_driver_msaa_dcc_unwatch fails on NVIDIA RTX 5080 (610.88) and passes on an AMD iGPU of the same machine #22931, fix(agc): compare a multisampled DCC copy's bytes when only its stamp moved #22950),agc_storage_write_back_host_retile(AGC (NVIDIA RTX 2060, Windows): agc_storage_write_back_host_retile fails about 3 runs in 4: the watched linear case goes through its scratch #23708, test(agc): settle the padding block's import before the write-back route checks #23751). This change is what made the run possible on the second of the two RTX 5090s.ANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1,VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation,VK_LOADER_DEBUG=layer, layer 1.4.363),ctest -R 'device_selection|^agc_driver_bda_device$|^agc_driver_present_upscale$|^agc_driver_sampled_cache_budget$|^agc_driver_recorder$|^agc_performance_overlay|^agc_driver_presentation_pass' -VwithANYPS5_GPU='AMD Radeon'onmainand on this branch: both logs insert the layer and neither reports it missing; 15 of 15 pass on both,agc_driver_present_upscaleis skipped on both (no headless surface on AMD's Windows driver), and neither has aVUID-message.mainatbb628f7722; after rebasing ontofc973e0189, the build and the selection,env_reference,vulkan_validation_gate_*,frame_replay_compareandagc_driver_recordertests (22) were run again and pass.python3 tools/check_conventions.py --base origin/main: passed.python3 tools/pr_overlap.py --names ANYPS5_GPU_INDEX ParseGpuIndex RequestedGpuIndex SelectFixtureDevice: no open PR.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