test(agc): match array sample expectations to the view #8361
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/8361"
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 Amoenus on 2026-10-20T11:01:45Z.
What
Use the selected view's last relative layer,
LastArray - baseArray, when checking sampled texels inImageArrayWindowPastLayerLimit.The view starting at 8100 has three layers and keeps an upper bound of 2. The view starting at 0 has 8,103 layers. On AMD Radeon Graphics it is valid, but the old expectation clamps coordinate 5 to layer 2: the test fails with
107.000000/255, expected 147/255. The GPU correctly sampled layer 5.Vulkan 1.4.363 array-layer selection clamps against the image view's layer count. This is a one-line fixture expectation correction.
Windows build prerequisite #8310 has merged and is present in main
d6eafa54d0(source/status checked 2026-10-22). This PR now has no open prerequisite and still contains only the expectation change; main retains the old bound atImageArrayWindowPastLayerLimit.cpp:123. Historical validation compositions below keep their original pins. Related validation: https://github.com/boykopovar/AnyPS5/pull/8310#issuecomment-6288753565.Tested
Main refresh — 2026-10-22
Rebased the unchanged one-line correction onto main
8499ea52e571b0edfc1feecfd3f6b9944012b359, headfef3c4e35ce0eca2c0fdc049c9541751034befa3; range-diff is unchanged. Main's merged #8310 alignment correction is retained, with no open prerequisite.The affected library and actual fixture rebuild on Windows 11 / WinLibs GCC 15.2 r7. On the same machine, literal main passes on RTX 5080 and reproduces the exact AMD
107.000000/255, expected 147/255assertion. This head passes 3/3 on each physical GPU: six passing processes. Both arms require Vulkan, disable the app shader cache/journal, load Khronos 1.4.363 and verify the actual device; zero VUIDs, validation errors/warnings, skips or timeouts. These fresh results replace the need for a #8310 composition in the current Windows comparison.Cppcheck then clang-tidy takes 7.264 analyzer seconds without parser/configuration failures. No Cppcheck finding; one clang advisory in unchanged main
Context.hppmisreads the intentionalbytes / sizeof(uint32_t)conversion before pointer arithmetic. The correction adds no diagnostic or suppression. Conventions/whitespace pass. Earlier platform/full-build results below retain their original pins; no new Linux or title result is claimed.Windows 11 Enterprise 26200, WinLibs GCC 15.2.0 r7 Release, SPIR-V Tools enabled. Both variants build the actual fixture and its runtime dependencies against main
01e5f8f199168a5da99b1e846fd70fcf715b986f:Each invocation uses
ctest -V -j1 --timeout 30 -R '^agc_driver_image_array_window_past_layer_limit$', required Vulkan, disabled shader cache/pipeline journal andVK_LAYER_KHRONOS_validation. Actual adapters and device-layer insertion verified: zero validation errors, warnings, VUIDs, skips or timeouts across all twelve executions. Baseline AMD failures are failed tests, recorded as the reproduction.Cppcheck and clang-tidy report no diagnostics for the corrected fixture. The identical fixture also builds in our full Windows integration (
1a10d63334), including default and explicit libs/relinker targets. Paired runtime results above use the separate upstream-production composition. Submission was rebased to main891d567515with the identical one-line patch; test results retain their stated pins. Linux and title execution were not tested for this change.Independent reproduction: wachi35676 confirmed the paired result on Windows 11/WinLibs GCC 15.2.0, main
56b299c3aplus #8310: AMD RDNA2 iGPU fails 3/3 before this change and passes 3/3 after it; RTX 5070 Ti passes 3/3 on both. These are their reported results, separate from our qualification above.External validation at its reported source pins
himanshusonawane05 reports the expected AMD failure without this correction and a pass with it on main
d50ec76da+ #8310, RX 7900 XT/gfx1100, proprietary driver 26.8.1, Windows 11/GCC 15.2 r7 Release; no Khronos layer was available. This complements wachi35676's separately recorded iGPU/RTX 5070 Ti comparison.screamm reports 3/3 focused passes plus both image-array groups passing on main
d50ec76da+ #8310ca55e46f9+ this PR7d2acdb16, RTX 4070/596.21, Windows 11 Pro 26220/GCC 15.2 r7 Release. That NVIDIA run did not reproduce the AMD failure or instrument base-0-view refusal, and did not load Khronos validation. Its requested 300 s limit is not a contribution-policy exemption; no actual over-30 s execution is established by the report.External results retain their authors, exact compositions and stated limitations; they are not added to our local pass totals.
janzezno reports the matching RADV reproduction and correction: Arch Linux/kernel 7.2.11, RX 7900 GRE/RADV NAVI31, Mesa 26.2.5, GCC 16.2.1 Release; main
50e0624d7, head7d2acdb16applied on top. Main fails the same107/255, expected 147/255assertion; the correction passes three focused repeats. Required Vulkan and disabled app shader cache were used; the report confirms Khronos loaded on both arms and no VUIDs. #8310 is not needed for that Linux build. These are the contributor's results, not a new local Linux run.JJenkx reports a full build and 1747/1747 CTest passes, including this fixture, on main
44e3389c8+ #8310 + this PR: RX 6700 XT/gfx1031, AMD proprietary 26.8.1, Windows 11 22621, WinLibs GCC 15.2 UCRT r7 Release. Their Windows build without #8310 still fails on unsupported static alignment, also observed on main5b59fbc55. No paired expectation-regression run, Khronos result or local verification is inferred from that report.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 himanshusonawane05 on 2026-10-20T12:24:25Z.
Tested on AMD Radeon RX 7900 XT (gfx1100, AMD proprietary driver 26.8.1), Windows 11, WinLibs GCC 15.2.0 r7 Release, main
d50ec76da,ANYPS5_GPU=7900 ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1:agc_driver_image_array_window_past_layer_limitfails withthread 7 component 0 is 107.000000/255, expected 147/255Not run with
VK_LAYER_KHRONOS_validation(no Vulkan SDK on this machine). AI-assisted: yes.Imported from boykopovar/AnyPS5. Originally posted by wachi35676 on 2026-10-20T12:28:19Z.
Confirmed on an AMD proprietary driver. Windows 11, WinLibs GCC 15.2.0, Release,
main56b299c3awith #8310 (needed to compile the test under MinGW) and this PR merged,ANYPS5_REQUIRE_VULKAN=1:1002:13c0, 2.0.353)thread 7 component 0 is 107.000000/255, expected 147/255AI-assisted: yes (Claude Code); results above were run on this machine.
Imported from boykopovar/AnyPS5. Originally posted by screamm on 2026-10-20T13:21:57Z.
Second independent run, on NVIDIA only. Amoenus already confirmed the build on an RTX 5080 and reported the AMD result.
Host: Windows 11 Pro 26220, NVIDIA GeForce RTX 4070 driver 596.21, Ryzen 7 5700X, WinLibs MinGW-w64 GCC 15.2 r7, Release,
BUILD_TESTING=ON, execution tests at their default.Main
d50ec76da, PR head7d2acdb16, merged on top of #8310 (ca55e46f9), because this branch does not contain that commit.Layers - 1, withLastArray - baseArray. For the window starting at layer 8100 both are 2, so that expectation is the same; only the base-0 window, which a device can sample if it accepts an 8,103-layer view, gets a different bound.agc_driver_image_array_window_past_layer_limit_teststarget;ANYPS5_REQUIRE_VULKAN=1 ctest -R '^agc_driver_image_array_window_past_layer_limit$' --repeat until-fail:3 -j1 --timeout 300passes 3 of 3 on the RTX 4070, andctest -R '^agc_driver_image_array' -j1passes both tests (agc_driver_image_array_sample_on_volumetoo).tools/check_conventions.py --base origin/mainandgit diff --checkpass.Not checked: any AMD GPU (so the case this PR fixes was not reproduced here, and I did not instrument the RTX 4070 to log that it refuses the base-0 window), Vulkan validation layers, the rest of the suite, title runs, Linux.
Written with Claude Code assistance (validation by a subagent, reviewed in this session).
Imported from boykopovar/AnyPS5. Originally posted by janzezno on 2026-10-20T20:58:41Z.
Run on RADV.
Host: Arch Linux, kernel 7.2.11, AMD Radeon RX 7900 GRE (RADV NAVI31), Mesa 26.2.5, GCC 16.2.1, Release,
BUILD_TESTING=ON.main50e0624d7; PR head7d2acdb16applied on top (#8310 is not needed to build on Linux).ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ctest --test-dir build -R '^agc_driver_image_array_window_past_layer_limit$' -Vmain: fails withthread 7 component 0 is 107.000000/255, expected 147/255, the values in the description; also fails in 5 of 5 full-suite runs.VUID-in either log; the validation layer loaded in both (nowas not found but was requested).Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-10-20T23:45:57Z.
Another AMD datapoint, discrete RDNA2: Windows 11 22621, AMD Radeon RX 6700 XT (gfx1031, AMD proprietary driver 26.8.1), WinLibs GCC 15.2 UCRT r7, Release,
BUILD_TESTING=ON,main44e3389c8with #8310 and this PR merged: the full build completes andctestpasses 1747/1747, includingagc_driver_image_array_window_past_layer_limit. Without #8310 the build stops atImageArrayWindowPastLayerLimit.cpp:33(requested alignment '65536' exceeds object file maximum 8192), as reported above; still present onmain5b59fbc55.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-21T23:57:49Z.
Review: APPROVED
The expected layer must be clamped in the view-relative range before adding the view's base layer. This matches the Vulkan sampling rule
clamp(RNE(a), 0, layerCount - 1) + baseArrayLayer; the changed boundLastArray - baseArrayexpresses that range for this fixture. The one-line correction also preserves the existing over-limit refusal case, as described in the PR.The reported AMD runs reproduce the old 107-versus-147 assertion and pass with this change; the NVIDIA comparison remains passing. The Windows reports used the required Vulkan and validation layer and found no VUIDs. I reviewed the diff and the updated dependency line (
Depends on: #8310); the current heads combine without a merge conflict. Eligibility, intake, conventions, labels, and report checks pass. Product jobs are skipped under the repository's PR workflow policy; I did not run a local build.Vulkan rule:
github.com/KhronosGroup/Vulkan-Docs@560d4305e8/chapters/textures.adoc (L690-L700)