test(agc): align the array window test's texels at run time #8310

Merged
dantdmdarealguy merged 1 commit from upstream-pr/8310 into main 2026-10-22 05:30:27 +00:00
dantdmdarealguy commented 2026-10-20 09:41:44 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by dantdmdarealguy on 2026-10-20T09:41:44Z.


What

Restores the Windows build of agc_driver_image_array_window_past_layer_limit, which #6772 added. A Windows build with every AGC execution test (ANYPS5_AGC_EXECUTION_TESTS empty, the default) stops on main e9a5a0c84 (still present on d14a186f4), because the required WinLibs GCC 15.2.0 r7 rejects the test's 64 KiB aligned static array:

FAILED: core/libs/prx/libSceAgcDriver/CMakeFiles/agc_driver_image_array_window_past_layer_limit_tests.dir/tests/execution/ImageArrayWindowPastLayerLimit.cpp.obj
X:/.../tests/execution/ImageArrayWindowPastLayerLimit.cpp:33:52: error: requested alignment '65536' exceeds object file maximum 8192
   33 | alignas(65536) std::array<std::uint8_t, 4u << 20u> Texels{};
ninja: build stopped: subcommand failed.

Windows CI builds only three execution tests, so it does not catch this. The fix is the one #6452 made for #6716: Texels is now a 64 KiB aligned 4 MiB span inside a static array 64 KiB - 1 bytes larger, and main checks the alignment before opening the device. The texture descriptor, shader, layers and expected texels are unchanged, and no driver code changes.

Tested

Windows 11 Pro, Intel Core i9-14900K, 128 GB RAM, NVIDIA GeForce RTX 5080 (driver 32.0.16.1742), WinLibs GCC 15.2.0 r7, Release, BUILD_TESTING=ON, every execution test built.

  • main e9a5a0c84: building the test's object fails with the error above. With this change it builds and links.
  • ctest -R "^agc_driver_image_array_window_past_layer_limit$" with ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1: 5 of 5 pass on the RTX 5080 (0.39-0.51 s), and 3 of 3 pass on the Intel UHD Graphics 770 with ANYPS5_GPU=Intel. Each run prints a window of a 1D array past maxImageArrayLayers was sampled and loaded from its viewed layers.
  • Same test with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation (Vulkan SDK 1.4.363.0 layer, loaded via VK_ADD_LAYER_PATH; VK_LOADER_DEBUG=layer shows it inserted), ANYPS5_NO_SHADER_CACHE=1, ANYPS5_REQUIRE_VULKAN=1 and ctest -V: passes with 0 VUID- and no was not found but was requested by env var VK_INSTANCE_LAYERS. main has no run to compare, because the test does not build there.
  • ctest -R "^agc_|video_out|pad_" with --parallel 2: 853 of 854 pass. The one failure is agc_driver_pass_input_hazard, which also fails on main and is fixed by #7954.
  • patched_libraries: 352 patched libraries loaded, 0 failed. The full build and the libs target build with no warnings. tools/check_test_registration.py, tools/check_conventions.py --base origin/main and tools/pr_overlap.py --branch pass.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce RTX 5080, driver 32.0.16.1742, Windows 11 Pro; Intel UHD Graphics 770, driver 32.0.101.7092, Windows 11 Pro
  • AI-assisted: yes, some AI assistance was used
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4933930737 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8310). Originally posted by [dantdmdarealguy](https://github.com/dantdmdarealguy) on 2026-10-20T09:41:44Z. --- ### What Restores the Windows build of `agc_driver_image_array_window_past_layer_limit`, which #6772 added. A Windows build with every AGC execution test (`ANYPS5_AGC_EXECUTION_TESTS` empty, the default) stops on `main` `e9a5a0c84` (still present on `d14a186f4`), because the required WinLibs GCC 15.2.0 r7 rejects the test's 64 KiB aligned static array: ```text FAILED: core/libs/prx/libSceAgcDriver/CMakeFiles/agc_driver_image_array_window_past_layer_limit_tests.dir/tests/execution/ImageArrayWindowPastLayerLimit.cpp.obj X:/.../tests/execution/ImageArrayWindowPastLayerLimit.cpp:33:52: error: requested alignment '65536' exceeds object file maximum 8192 33 | alignas(65536) std::array<std::uint8_t, 4u << 20u> Texels{}; ninja: build stopped: subcommand failed. ``` Windows CI builds only three execution tests, so it does not catch this. The fix is the one #6452 made for #6716: `Texels` is now a 64 KiB aligned 4 MiB span inside a static array 64 KiB - 1 bytes larger, and `main` checks the alignment before opening the device. The texture descriptor, shader, layers and expected texels are unchanged, and no driver code changes. ### Tested Windows 11 Pro, Intel Core i9-14900K, 128 GB RAM, NVIDIA GeForce RTX 5080 (driver 32.0.16.1742), WinLibs GCC 15.2.0 r7, Release, `BUILD_TESTING=ON`, every execution test built. - `main` `e9a5a0c84`: building the test's object fails with the error above. With this change it builds and links. - `ctest -R "^agc_driver_image_array_window_past_layer_limit$"` with `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1`: 5 of 5 pass on the RTX 5080 (0.39-0.51 s), and 3 of 3 pass on the Intel UHD Graphics 770 with `ANYPS5_GPU=Intel`. Each run prints `a window of a 1D array past maxImageArrayLayers was sampled and loaded from its viewed layers`. - Same test with `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation` (Vulkan SDK 1.4.363.0 layer, loaded via `VK_ADD_LAYER_PATH`; `VK_LOADER_DEBUG=layer` shows it inserted), `ANYPS5_NO_SHADER_CACHE=1`, `ANYPS5_REQUIRE_VULKAN=1` and `ctest -V`: passes with 0 `VUID-` and no `was not found but was requested by env var VK_INSTANCE_LAYERS`. `main` has no run to compare, because the test does not build there. - `ctest -R "^agc_|video_out|pad_"` with `--parallel 2`: 853 of 854 pass. The one failure is `agc_driver_pass_input_hazard`, which also fails on `main` and is fixed by #7954. - `patched_libraries`: 352 patched libraries loaded, 0 failed. The full build and the `libs` target build with no warnings. `tools/check_test_registration.py`, `tools/check_conventions.py --base origin/main` and `tools/pr_overlap.py --branch` pass. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: NVIDIA GeForce RTX 5080, driver 32.0.16.1742, Windows 11 Pro; Intel UHD Graphics 770, driver 32.0.101.7092, Windows 11 Pro - [x] AI-assisted: yes, some AI assistance was used
Amoenus commented 2026-10-20 10:22:13 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Amoenus on 2026-10-20T10:22:13Z.


Your exact allocation correction restores the supported WinLibs GCC 15.2.0 r7 build here. Our full Windows integration also builds successfully.

The separate AMD expectation correction is now proposed as #8361, depending on this PR. It replaces the fixed three-layer sampling bound with the selected view's bound, LastArray - baseArray. AMD accepts the base-zero 8,103-layer view, where coordinate 5 correctly reads layer 5 (107/255), while the old fixture expects layer 2 (147/255). The narrow view starting at 8100 keeps its three-layer bound.

The final paired check uses upstream production main 01e5f8f199168a5da99b1e846fd70fcf715b986f plus your exact ca55e46f98ad85861dd7567abad0c028274daca1 prerequisite:

Fixture AMD Radeon Graphics NVIDIA RTX 5080
Original expectation 3/3 reproduce the assertion failure 3/3 pass
Selected-view expectation 3/3 pass, including the full view 3/3 pass, retaining the over-limit refusal

All twelve runs verified the actual adapter and inserted Khronos validation device layer, with required Vulkan, shader cache disabled, and zero Vulkan errors/warnings/VUIDs. Windows 11 Enterprise 26200; RTX 5080 driver 610.62 / 32.0.16.1062; AMD Radeon(TM) Graphics 32.0.21036.18. Exact fork composition pins and the Vulkan 1.4.363 reference are in #8361. These final results are independent of our broader Sonic runtime composition.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6288753565 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8310#issuecomment-6288753565). Originally posted by [Amoenus](https://github.com/Amoenus) on 2026-10-20T10:22:13Z. --- Your exact allocation correction restores the supported WinLibs GCC 15.2.0 r7 build here. Our full Windows integration also builds successfully. The separate AMD expectation correction is now proposed as #8361, depending on this PR. It replaces the fixed three-layer sampling bound with the selected view's bound, `LastArray - baseArray`. AMD accepts the base-zero 8,103-layer view, where coordinate 5 correctly reads layer 5 (107/255), while the old fixture expects layer 2 (147/255). The narrow view starting at 8100 keeps its three-layer bound. The final paired check uses upstream production main `01e5f8f199168a5da99b1e846fd70fcf715b986f` plus your exact `ca55e46f98ad85861dd7567abad0c028274daca1` prerequisite: | Fixture | AMD Radeon Graphics | NVIDIA RTX 5080 | | --- | --- | --- | | Original expectation | 3/3 reproduce the assertion failure | 3/3 pass | | Selected-view expectation | 3/3 pass, including the full view | 3/3 pass, retaining the over-limit refusal | All twelve runs verified the actual adapter and inserted Khronos validation device layer, with required Vulkan, shader cache disabled, and zero Vulkan errors/warnings/VUIDs. Windows 11 Enterprise 26200; RTX 5080 driver 610.62 / 32.0.16.1062; AMD Radeon(TM) Graphics 32.0.21036.18. Exact fork composition pins and the Vulkan 1.4.363 reference are in #8361. These final results are independent of our broader Sonic runtime composition. AI-assisted: yes.
wachi35676 commented 2026-10-20 12:28:17 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by wachi35676 on 2026-10-20T12:28:17Z.


Reproduced the break and the fix on Windows 11, WinLibs GCC 15.2.0 (MinGW), Release, BUILD_TESTING=ON.

  • main 56b299c3a: ImageArrayWindowPastLayerLimit.cpp:33:52: error: requested alignment '65536' exceeds object file maximum 8192, so a full Windows build stops there.
  • With this PR merged: the target compiles and the full build completes. agc_driver_image_array_window_past_layer_limit (ANYPS5_REQUIRE_VULKAN=1):
    • RTX 5070 Ti: passes 3/3.
    • AMD Radeon RDNA2 iGPU (1002:13c0, AMD proprietary 2.0.353): fails 3/3 with image_sample_lz on a window of a 1D array past maxImageArrayLayers: thread 7 component 0 is 107.000000/255, expected 147/255. That's the expectation #8361 corrects. With #8361 merged on top, it passes 3/3 on both GPUs.

AI-assisted: yes (Claude Code); results above were run on this machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6290838168 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8310#issuecomment-6290838168). Originally posted by [wachi35676](https://github.com/wachi35676) on 2026-10-20T12:28:17Z. --- Reproduced the break and the fix on Windows 11, WinLibs GCC 15.2.0 (MinGW), Release, `BUILD_TESTING=ON`. - **`main` `56b299c3a`:** `ImageArrayWindowPastLayerLimit.cpp:33:52: error: requested alignment '65536' exceeds object file maximum 8192`, so a full Windows build stops there. - **With this PR merged:** the target compiles and the full build completes. `agc_driver_image_array_window_past_layer_limit` (`ANYPS5_REQUIRE_VULKAN=1`): - RTX 5070 Ti: passes 3/3. - AMD Radeon RDNA2 iGPU (`1002:13c0`, AMD proprietary 2.0.353): fails 3/3 with `image_sample_lz on a window of a 1D array past maxImageArrayLayers: thread 7 component 0 is 107.000000/255, expected 147/255`. That's the expectation #8361 corrects. With #8361 merged on top, it passes 3/3 on both GPUs. AI-assisted: yes (Claude Code); results above were run on this machine.
screamm commented 2026-10-20 13:21:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by screamm on 2026-10-20T13:21:49Z.


Second independent run, this time with the test executed. Amoenus already confirmed the build on an RTX 5080.

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 head ca55e46f9.

  • Main: building the agc_driver_image_array_window_past_layer_limit_tests target stops at ImageArrayWindowPastLayerLimit.cpp:33:52: error: requested alignment '65536' exceeds object file maximum 8192.
  • With this PR merged onto main: the target builds and links, and ANYPS5_REQUIRE_VULKAN=1 ctest -R '^agc_driver_image_array_window_past_layer_limit$' --repeat until-fail:3 -j1 --timeout 300 passes 3 of 3 on the RTX 4070. Each run reaches the device (Selected GPU name=NVIDIA GeForce RTX 4070), so the new 64 KiB alignment check in main passed, and prints a window of a 1D array past maxImageArrayLayers was sampled and loaded from its viewed layers.
  • tools/check_conventions.py --base origin/main and git diff --check pass.

Not checked: Vulkan validation layers, the rest of the test suite, title runs, a full GPU pass, Linux. I did not force a misaligned array to see the new check fire.

Written with Claude Code assistance (validation by a subagent, reviewed in this session).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6291850013 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8310#issuecomment-6291850013). Originally posted by [screamm](https://github.com/screamm) on 2026-10-20T13:21:49Z. --- Second independent run, this time with the test executed. Amoenus already confirmed the build on an RTX 5080. 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 head `ca55e46f9`. - Main: building the `agc_driver_image_array_window_past_layer_limit_tests` target stops at `ImageArrayWindowPastLayerLimit.cpp:33:52: error: requested alignment '65536' exceeds object file maximum 8192`. - With this PR merged onto main: the target builds and links, and `ANYPS5_REQUIRE_VULKAN=1 ctest -R '^agc_driver_image_array_window_past_layer_limit$' --repeat until-fail:3 -j1 --timeout 300` passes 3 of 3 on the RTX 4070. Each run reaches the device (`Selected GPU name=NVIDIA GeForce RTX 4070`), so the new 64 KiB alignment check in `main` passed, and prints `a window of a 1D array past maxImageArrayLayers was sampled and loaded from its viewed layers`. - `tools/check_conventions.py --base origin/main` and `git diff --check` pass. Not checked: Vulkan validation layers, the rest of the test suite, title runs, a full GPU pass, Linux. I did not force a misaligned array to see the new check fire. Written with Claude Code assistance (validation by a subagent, reviewed in this session).
akkadbakkad89 commented 2026-10-21 05:01:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by akkadbakkad89 on 2026-10-21T05:01:00Z.


Third host — the build fix verified on the supported toolchain, plus a new GPU datapoint.

Host: Windows 11 Pro 10.0.26300, Intel Core i7-10700, NVIDIA GeForce RTX 3070 driver 617.42, WinLibs MinGW-w64 GCC 15.2.0 r7 UCRT POSIX SEH, Release, BUILD_TESTING=ON. main 2185dbf92 with this PR's ImageArrayWindowPastLayerLimit.cpp applied.

  • Without the change: ImageArrayWindowPastLayerLimit.cpp:33:52: error: requested alignment '65536' exceeds object file maximum 8192, full Windows build stops there — reproduced.
  • With the change: the target compiles and links clean.
  • Executed on the RTX 3070 (ANYPS5_REQUIRE_VULKAN=1, ctest -R '^agc_driver_image_array_window_past_layer_limit$' -j1): reaches the device (Selected GPU name=NVIDIA GeForce RTX 3070), passes the write-watch preamble, then fails deterministically (2/2 runs) with std::bad_alloc raised inside nvoglv64.dll on a driver worker thread (vulkan-1.dll -> nvoglv64.dll in the stack candidates). 19 GB host RAM free at the time, so not memory pressure.

So on this card/driver the array-window path dies in the NVIDIA runtime before any sample comparison — different outcome from the 4070/5070 Ti passes. If it helps narrow it: maxImageArrayLayers = 2048 here too. Happy to retest with any instrumentation.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6308452583 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8310#issuecomment-6308452583). Originally posted by [akkadbakkad89](https://github.com/akkadbakkad89) on 2026-10-21T05:01:00Z. --- Third host — the build fix verified on the supported toolchain, plus a new GPU datapoint. Host: Windows 11 Pro 10.0.26300, Intel Core i7-10700, NVIDIA GeForce RTX 3070 driver 617.42, WinLibs MinGW-w64 GCC 15.2.0 r7 UCRT POSIX SEH, Release, BUILD_TESTING=ON. `main` `2185dbf92` with this PR's `ImageArrayWindowPastLayerLimit.cpp` applied. - Without the change: `ImageArrayWindowPastLayerLimit.cpp:33:52: error: requested alignment '65536' exceeds object file maximum 8192`, full Windows build stops there — reproduced. - With the change: the target compiles and links clean. - Executed on the RTX 3070 (`ANYPS5_REQUIRE_VULKAN=1`, `ctest -R '^agc_driver_image_array_window_past_layer_limit$' -j1`): reaches the device (`Selected GPU name=NVIDIA GeForce RTX 3070`), passes the write-watch preamble, then **fails deterministically** (2/2 runs) with `std::bad_alloc` raised inside `nvoglv64.dll` on a driver worker thread (`vulkan-1.dll -> nvoglv64.dll` in the stack candidates). 19 GB host RAM free at the time, so not memory pressure. So on this card/driver the array-window path dies in the NVIDIA runtime before any sample comparison — different outcome from the 4070/5070 Ti passes. If it helps narrow it: `maxImageArrayLayers = 2048` here too. Happy to retest with any instrumentation.
MarcZX10 commented 2026-10-21 05:10:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-21T05:10:01Z.


Thanks for the 3070 datapoint. Looking at the test, the initial Run(*device) exercises the three-layer view at base 8100; the later Run(*device, 0) deliberately probes the full 8103-layer view and only treats the emulator’s explicit over-limit refusal as expected. Since your report says the test reaches the sample test before failing, can you confirm whether the std::bad_alloc comes from that second call? If so, this may expose a separate guard gap: the emulator should reject the over-limit view before handing it to the Vulkan driver, instead of relying on a driver allocation failure.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6308564377 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8310#issuecomment-6308564377). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-21T05:10:01Z. --- Thanks for the 3070 datapoint. Looking at the test, the initial `Run(*device)` exercises the three-layer view at base 8100; the later `Run(*device, 0)` deliberately probes the full 8103-layer view and only treats the emulator’s explicit over-limit refusal as expected. Since your report says the test reaches the sample test before failing, can you confirm whether the `std::bad_alloc` comes from that second call? If so, this may expose a separate guard gap: the emulator should reject the over-limit view before handing it to the Vulkan driver, instead of relying on a driver allocation failure.
JJenkx commented 2026-10-21 05:20:44 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-10-21T05:20:44Z.


Cross-reference for the RTX 3070 result: on an AMD RX 6700 XT (Windows 11 22621, AMD driver 26.8.1, WinLibs GCC 15.2 UCRT r7, Release) with this PR applied, agc_driver_image_array_window_past_layer_limit passes, both calls included (full ctest 1747/1747 on main 44e3389c8 with this PR and #8361; details on #8361). So the std::bad_alloc inside nvoglv64.dll is specific to the NVIDIA driver path on the same test. That fits @MarcZX10's reading: an over-limit view that one driver tolerates and another fails to allocate.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6308701136 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8310#issuecomment-6308701136). Originally posted by [JJenkx](https://github.com/JJenkx) on 2026-10-21T05:20:44Z. --- Cross-reference for the RTX 3070 result: on an AMD RX 6700 XT (Windows 11 22621, AMD driver 26.8.1, WinLibs GCC 15.2 UCRT r7, Release) with this PR applied, `agc_driver_image_array_window_past_layer_limit` passes, both calls included (full `ctest` 1747/1747 on `main` 44e3389c8 with this PR and #8361; details on #8361). So the `std::bad_alloc` inside `nvoglv64.dll` is specific to the NVIDIA driver path on the same test. That fits @MarcZX10's reading: an over-limit view that one driver tolerates and another fails to allocate.
DavidSamir commented 2026-10-21 06:24:03 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by DavidSamir on 2026-10-21T06:24:03Z.


Another AMD driver version, on an RDNA 2 iGPU. Windows 11 Pro 26200, AMD Radeon 680M (1002:1681, Ryzen 7 6800H), AMD driver 32.0.21030.2001 (Vulkan 1.4.315, maxImageArrayLayers = 8192), WinLibs GCC 15.2.0 r7, Release. main 1ff5c8ac5. ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, each run from a renamed copy of the executable.

Source Result
main the build stops at ImageArrayWindowPastLayerLimit.cpp:33:52: error: requested alignment '65536' exceeds object file maximum 8192
main + this PR (ca55e46f9) builds and links; fails 5 of 5 with thread 7 component 0 is 107.000000/255, expected 147/255
main + this PR + #8361 (7d2acdb16) passes 3 of 3, and passes under VK_LAYER_KHRONOS_validation (SDK 1.4.363) with 0 VUID- lines

The 107/255 failure comes from the second call, Run(*device, 0). Thread 7 asks for layer 5.0, and 107 is layer 5's texel. With maxImageArrayLayers = 8192, the 8103-layer view is legal on this device, so the GPU samples layer 5 correctly. That is what #8361 corrects, not something this PR has to handle. This PR fixes the Windows build as described.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6309550161 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8310#issuecomment-6309550161). Originally posted by [DavidSamir](https://github.com/DavidSamir) on 2026-10-21T06:24:03Z. --- Another AMD driver version, on an RDNA 2 iGPU. Windows 11 Pro 26200, AMD Radeon 680M (`1002:1681`, Ryzen 7 6800H), AMD driver 32.0.21030.2001 (Vulkan 1.4.315, `maxImageArrayLayers = 8192`), WinLibs GCC 15.2.0 r7, Release. `main` `1ff5c8ac5`. `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1`, each run from a renamed copy of the executable. | Source | Result | |---|---| | `main` | the build stops at `ImageArrayWindowPastLayerLimit.cpp:33:52: error: requested alignment '65536' exceeds object file maximum 8192` | | `main` + this PR (`ca55e46f9`) | builds and links; fails 5 of 5 with `thread 7 component 0 is 107.000000/255, expected 147/255` | | `main` + this PR + #8361 (`7d2acdb16`) | passes 3 of 3, and passes under `VK_LAYER_KHRONOS_validation` (SDK 1.4.363) with 0 `VUID-` lines | The 107/255 failure comes from the second call, `Run(*device, 0)`. Thread 7 asks for layer 5.0, and 107 is layer 5's texel. With `maxImageArrayLayers = 8192`, the 8103-layer view is legal on this device, so the GPU samples layer 5 correctly. That is what #8361 corrects, not something this PR has to handle. This PR fixes the Windows build as described. AI-assisted: yes
kanza-cm commented 2026-10-21 18:50:45 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by kanza-cm on 2026-10-21T18:50:45Z.


Independent confirmation that the break is still on current main d34da5d69 (2026-10-21): a default Windows build (WinLibs GCC 15.2.0 r7, -DBUILD_TESTING=ON, every AGC execution test) stops at ImageArrayWindowPastLayerLimit.cpp:33 with the same requested alignment '65536' exceeds object file maximum 8192. Windows CI does not see it because it passes -DANYPS5_AGC_EXECUTION_TESTS=F16ToF32Unpack;F64FmaSubnormals;RegistrationPrepareShutdown.

I had opened #9304 for this before finding yours, then closed it as a duplicate. With the same kind of change (4 KiB section alignment, pointer rounded up to 64 KiB) the target builds and agc_driver_image_array_window_past_layer_limit passes on an NVIDIA GeForce RTX 3070 Laptop (driver 32.0.16.1078), which adds a second GPU vendor to the run in your description.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6323919809 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8310#issuecomment-6323919809). Originally posted by [kanza-cm](https://github.com/kanza-cm) on 2026-10-21T18:50:45Z. --- Independent confirmation that the break is still on current `main` `d34da5d69` (2026-10-21): a default Windows build (WinLibs GCC 15.2.0 r7, `-DBUILD_TESTING=ON`, every AGC execution test) stops at `ImageArrayWindowPastLayerLimit.cpp:33` with the same `requested alignment '65536' exceeds object file maximum 8192`. Windows CI does not see it because it passes `-DANYPS5_AGC_EXECUTION_TESTS=F16ToF32Unpack;F64FmaSubnormals;RegistrationPrepareShutdown`. I had opened #9304 for this before finding yours, then closed it as a duplicate. With the same kind of change (4 KiB section alignment, pointer rounded up to 64 KiB) the target builds and `agc_driver_image_array_window_past_layer_limit` passes on an NVIDIA GeForce RTX 3070 Laptop (driver 32.0.16.1078), which adds a second GPU vendor to the run in your description.
lost9409 commented 2026-10-21 23:18:13 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by lost9409 on 2026-10-21T23:18:13Z.


Confirmed on Windows 11 Pro (build 26200), NVIDIA GeForce RTX 5070 Ti, driver 610.88, using WinLibs GCC 15.2.0 r7, CMake 4.3.1 and Ninja 1.13.2.
On base commit a6dcea9279, the full build failed with:
requested alignment '65536' exceeds object file maximum 8192
After applying only ImageArrayWindowPastLayerLimit.cpp from this PR at commit ca55e46f98, the full build completed successfully.
agc_driver_image_array_window_past_layer_limit passed in 0.59 seconds with ANYPS5_REQUIRE_VULKAN=1 and ANYPS5_NO_SHADER_CACHE=1. The log confirms the RTX 5070 Ti was selected.
The full test suite was not run, and Vulkan validation layers were not enabled for this run.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6328716827 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8310#issuecomment-6328716827). Originally posted by [lost9409](https://github.com/lost9409) on 2026-10-21T23:18:13Z. --- Confirmed on Windows 11 Pro (build 26200), NVIDIA GeForce RTX 5070 Ti, driver 610.88, using WinLibs GCC 15.2.0 r7, CMake 4.3.1 and Ninja 1.13.2. On base commit a6dcea9279b53b3a39c13695eac66f7c8b5b503c, the full build failed with: requested alignment '65536' exceeds object file maximum 8192 After applying only ImageArrayWindowPastLayerLimit.cpp from this PR at commit ca55e46f98ad85861dd7567abad0c028274daca1, the full build completed successfully. agc_driver_image_array_window_past_layer_limit passed in 0.59 seconds with ANYPS5_REQUIRE_VULKAN=1 and ANYPS5_NO_SHADER_CACHE=1. The log confirms the RTX 5070 Ti was selected. The full test suite was not run, and Vulkan validation layers were not enabled for this run.
harisibrar1 commented 2026-10-22 01:49:56 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by harisibrar1 on 2026-10-22T01:49:56Z.

Review: APPROVED


Verified on Windows 11, WinLibs GCC 15.2.0 r7, Release, BUILD_TESTING=ON, full build of main a6dcea927 with every execution test built:

  • On main, this test's object fails with requested alignment '65536' exceeds object file maximum 8192. It's the only failing step of the 6,171 in the full build. CI doesn't catch it because ANYPS5_AGC_EXECUTION_TESTS builds the other execution tests as ExecutionTestNotBuilt.cpp unless they're selected.
  • With this PR's file applied to the same tree, agc_driver_image_array_window_past_layer_limit_tests compiles and links.
  • The runtime alignment matches the merged fix for the same error in GpuIndirectArgumentsMisalignedWriterAhead.cpp (#6716), and the new Require checks the 64 KiB alignment.
  • Not run here: this machine's Smart App Control blocks the freshly built test executable, so I couldn't add an RTX 2080 run to yours.

Reviewed with AI assistance (Claude Code); the checks above were run locally on my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5608348155 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8310#pullrequestreview-5608348155). Originally posted by [harisibrar1](https://github.com/harisibrar1) on 2026-10-22T01:49:56Z. **Review:** APPROVED --- Verified on Windows 11, WinLibs GCC 15.2.0 r7, Release, `BUILD_TESTING=ON`, full build of main a6dcea927 with every execution test built: - On main, this test's object fails with `requested alignment '65536' exceeds object file maximum 8192`. It's the only failing step of the 6,171 in the full build. CI doesn't catch it because `ANYPS5_AGC_EXECUTION_TESTS` builds the other execution tests as `ExecutionTestNotBuilt.cpp` unless they're selected. - With this PR's file applied to the same tree, `agc_driver_image_array_window_past_layer_limit_tests` compiles and links. - The runtime alignment matches the merged fix for the same error in `GpuIndirectArgumentsMisalignedWriterAhead.cpp` (#6716), and the new `Require` checks the 64 KiB alignment. - Not run here: this machine's Smart App Control blocks the freshly built test executable, so I couldn't add an RTX 2080 run to yours. Reviewed with AI assistance (Claude Code); the checks above were run locally on my machine.
harisibrar1 commented 2026-10-22 04:17:59 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by harisibrar1 on 2026-10-22T04:17:59Z.


@oneandonlydean this was closed without a merge or a comment, but main (c61d20f54) still has alignas(65536) at ImageArrayWindowPastLayerLimit.cpp:33, so a full Windows build with every execution test still stops there, as confirmed above. Was it closed in favour of another fix, or could it be reopened?

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6332576553 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8310#issuecomment-6332576553). Originally posted by [harisibrar1](https://github.com/harisibrar1) on 2026-10-22T04:17:59Z. --- @oneandonlydean this was closed without a merge or a comment, but main (c61d20f54) still has `alignas(65536)` at `ImageArrayWindowPastLayerLimit.cpp:33`, so a full Windows build with every execution test still stops there, as confirmed above. Was it closed in favour of another fix, or could it be reopened?
dantdmdarealguy commented 2026-10-22 04:35:12 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by dantdmdarealguy on 2026-10-22T04:35:12Z.


@oneandonlydean I think this may have been closed by mistake: there was no comment, and main still has alignas(65536) at ImageArrayWindowPastLayerLimit.cpp:33, so a full Windows build with the execution tests still stops at that object (requested alignment '65536' exceeds object file maximum 8192). The branch still merges cleanly. GitHub won't let me reopen it after a maintainer close; could you reopen it, or let me know if a different fix is planned?

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6332796200 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8310#issuecomment-6332796200). Originally posted by [dantdmdarealguy](https://github.com/dantdmdarealguy) on 2026-10-22T04:35:12Z. --- @oneandonlydean I think this may have been closed by mistake: there was no comment, and `main` still has `alignas(65536)` at `ImageArrayWindowPastLayerLimit.cpp:33`, so a full Windows build with the execution tests still stops at that object (`requested alignment '65536' exceeds object file maximum 8192`). The branch still merges cleanly. GitHub won't let me reopen it after a maintainer close; could you reopen it, or let me know if a different fix is planned?
oneandonlydean commented 2026-10-22 05:16:36 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-22T05:16:36Z.


@harisibrar1 @dantdmdarealguy thanks both, and sorry: it was closed by mistake. It's reopened and back in review. I'm running the full workflow on this head now and will merge it if Linux agc_driver_image_array_window_past_layer_limit passes with nothing else failing.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6333328210 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8310#issuecomment-6333328210). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-22T05:16:36Z. --- @harisibrar1 @dantdmdarealguy thanks both, and sorry: it was closed by mistake. It's reopened and back in review. I'm running the full workflow on this head now and will merge it if Linux `agc_driver_image_array_window_past_layer_limit` passes with nothing else failing.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!8310
No description provided.