AMD Windows: 27 agc graphics tests fail with background pipeline LTO (#2713) #2755

Closed
opened 2026-10-10 13:03:34 +00:00 by LeandroLP23 · 3 comments
LeandroLP23 commented 2026-10-10 13:03:34 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by LeandroLP23 on 2026-10-10T13:03:34Z.


Correction (see this comment): on clean caches only 27 graphics tests fail, all from #2713 (background pipeline LTO); they pass with APS5_NO_PIPELINE_LTO=1. #2636 and #2661 are not at fault: the groups below came from a stale AMD driver pipeline cache.

On AMD's Windows driver, 40 of the 320 agc_ GPU tests fail on main cf8b129e. All of them passed on main e8b47b92 this morning. Bisecting over the merges between the two gives two causes, #2636 and #2661.

Radeon 860M (RDNA 3.5, 0x1114), AMD driver 32.0.13058.8001 (24.30.58.08), which reports VK_EXT_graphics_pipeline_library with fast linking. Windows 11 (26300), WinLibs GCC 15.2.0 r7, Release, ctest -R agc_ -j1.

Group A: 7 tests, from #2636, pass with APS5_NO_GPL=1

agc_unchanged_cpu_stamps, agc_driver_mesh, agc_driver_cmask_fast_clear, agc_driver_bindless_images, agc_driver_interpolation_modes, agc_driver_packed_unorm_color_target, agc_driver_srgb8_color_target

  • First bad merge: 663cc42c (#2636). Its parent 6675e60b passes, bisected with agc_unchanged_cpu_stamps (2 runs per step).
  • On cf8b129e all 7 fail with the pipeline libraries on and pass with APS5_NO_GPL=1. agc_unchanged_cpu_stamps: 3/3 failed, 3/3 passed.
  • Example: unchanged CPU stamps: a CPU store that left the bytes as they were over watched memory dropped 65536 of 65536 texels the GPU wrote.

Group B: 33 tests, from #2661, fail with APS5_NO_GPL=1 too

dcc_keys_first_write, emulated_color_compare, image_address_dimension, image_by, image_cache_bits, image_converted_unorm, image_gather_one_dimensional, image_gather_one_dimensional_array, image_load_packed, image_one_dimensional_array, image_packed_horizontal_gather, image_pck_n, image_pipe_bank_xor, image_plane_address_on_line, image_sample_bias_a16, image_sample_derivatives, image_sample_force_degamma, image_sample_lod_clamp, image_sample_reduction, image_sample_shared_sampler, image_sample_unnormalized, image_sint8, image_srgb_load, image_store_packed, image_store_sint, image_texel_status, image_volume_address_on_plane, image_xor_swizzle_volume, many_buffers, runtime_images, storage_cache_budget, typed_heaps, view_past_last_mip (all prefixed agc_driver_)

  • First bad merge: 197ffac9 (#2661). Its parent b5f5362d passes, bisected with agc_driver_many_buffers and agc_driver_image_by under APS5_NO_GPL=1.
  • The shaders' outputs keep the 0xdeadbeef fill, e.g.:
    • many buffers (52): buffer 0 thread 0 is 0xdeadbeef, expected 0x41000193
    • image BY opcode 66 format 5 dmask 3: thread 0 (x 0, y 0, mip 0) v10 is 3735928559, expected 1
    • descriptor heap lifetime or null image semantics failed: batch=0 pixel=0 value=3735928559
  • Since they fail with the libraries off as well, the fixed push slots seem to change where the push constants go on the non-library path too. That is a guess from the symptom; I haven't traced it.

Neither change had a completed Windows build on main: those runs were all cancelled by later merges, and the Windows CI job uses lavapipe, not an AMD driver. The full list of failures and the bisect logs are available if useful.

AI-assisted: yes (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5791472929 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2755). Originally posted by [LeandroLP23](https://github.com/LeandroLP23) on 2026-10-10T13:03:34Z. --- > **Correction (see [this comment](https://github.com/boykopovar/AnyPS5/issues/2755#issuecomment-6098844619)):** on clean caches only 27 graphics tests fail, all from #2713 (background pipeline LTO); they pass with `APS5_NO_PIPELINE_LTO=1`. #2636 and #2661 are not at fault: the groups below came from a stale AMD driver pipeline cache. On AMD's Windows driver, 40 of the 320 `agc_` GPU tests fail on `main` cf8b129e. All of them passed on `main` e8b47b92 this morning. Bisecting over the merges between the two gives two causes, #2636 and #2661. Radeon 860M (RDNA 3.5, `0x1114`), AMD driver 32.0.13058.8001 (24.30.58.08), which reports `VK_EXT_graphics_pipeline_library` with fast linking. Windows 11 (26300), WinLibs GCC 15.2.0 r7, Release, `ctest -R agc_ -j1`. ### Group A: 7 tests, from #2636, pass with `APS5_NO_GPL=1` `agc_unchanged_cpu_stamps`, `agc_driver_mesh`, `agc_driver_cmask_fast_clear`, `agc_driver_bindless_images`, `agc_driver_interpolation_modes`, `agc_driver_packed_unorm_color_target`, `agc_driver_srgb8_color_target` - First bad merge: 663cc42c (#2636). Its parent 6675e60b passes, bisected with `agc_unchanged_cpu_stamps` (2 runs per step). - On cf8b129e all 7 fail with the pipeline libraries on and pass with `APS5_NO_GPL=1`. `agc_unchanged_cpu_stamps`: 3/3 failed, 3/3 passed. - Example: `unchanged CPU stamps: a CPU store that left the bytes as they were over watched memory dropped 65536 of 65536 texels the GPU wrote`. ### Group B: 33 tests, from #2661, fail with `APS5_NO_GPL=1` too `dcc_keys_first_write`, `emulated_color_compare`, `image_address_dimension`, `image_by`, `image_cache_bits`, `image_converted_unorm`, `image_gather_one_dimensional`, `image_gather_one_dimensional_array`, `image_load_packed`, `image_one_dimensional_array`, `image_packed_horizontal_gather`, `image_pck_n`, `image_pipe_bank_xor`, `image_plane_address_on_line`, `image_sample_bias_a16`, `image_sample_derivatives`, `image_sample_force_degamma`, `image_sample_lod_clamp`, `image_sample_reduction`, `image_sample_shared_sampler`, `image_sample_unnormalized`, `image_sint8`, `image_srgb_load`, `image_store_packed`, `image_store_sint`, `image_texel_status`, `image_volume_address_on_plane`, `image_xor_swizzle_volume`, `many_buffers`, `runtime_images`, `storage_cache_budget`, `typed_heaps`, `view_past_last_mip` (all prefixed `agc_driver_`) - First bad merge: 197ffac9 (#2661). Its parent b5f5362d passes, bisected with `agc_driver_many_buffers` and `agc_driver_image_by` under `APS5_NO_GPL=1`. - The shaders' outputs keep the `0xdeadbeef` fill, e.g.: - `many buffers (52): buffer 0 thread 0 is 0xdeadbeef, expected 0x41000193` - `image BY opcode 66 format 5 dmask 3: thread 0 (x 0, y 0, mip 0) v10 is 3735928559, expected 1` - `descriptor heap lifetime or null image semantics failed: batch=0 pixel=0 value=3735928559` - Since they fail with the libraries off as well, the fixed push slots seem to change where the push constants go on the non-library path too. That is a guess from the symptom; I haven't traced it. Neither change had a completed Windows build on `main`: those runs were all cancelled by later merges, and the Windows CI job uses lavapipe, not an AMD driver. The full list of failures and the bisect logs are available if useful. AI-assisted: yes (Claude Code).
LeandroLP23 commented 2026-10-10 15:01:58 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by LeandroLP23 on 2026-10-10T15:01:58Z.


Correction: most of the report above is wrong. On clean caches the only regression is #2713 (background LTO relinking of library pipelines); #2636 and #2661 are fine.

My earlier runs reused AMD's on-disk pipeline cache (%LOCALAPPDATA%\AMD\VkCache, keyed by executable name) across the builds I bisected, and the driver served pipelines compiled by older builds of the same test executables. Run with that cache and AnyPS5's build/tests/shader_cache emptied before each mode, on main db343a93 (same Radeon 860M, driver 32.0.13058.8001, Windows 11, ctest -R agc_ -j1):

Mode Failed of 321
default (pipeline libraries + background LTO) 27, cold and warm
APS5_NO_PIPELINE_LTO=1 0
APS5_NO_GPL=1 0

So group B (the 33 0xdeadbeef tests I attributed to #2661) and at least part of group A were the stale driver cache, not the code: agc_driver_many_buffers and agc_unchanged_cpu_stamps failed on the same build with the old cache and pass with it emptied. Sorry for the noise.

What remains, all graphics tests, all passing with APS5_NO_PIPELINE_LTO=1 (prefix agc_driver_ except the first two): agc_pipeline_cache (crash), agc_pipeline_library (crash), mesh, conservative_rasterization, depth_bias_per_face, draw_offset_indices, dual_source_blend, exec_host_lanes, interpolation_f16 (crash), ngg_vertex_wave_info, packed_unorm_color_target (crash), pixel_barycentric_emulation (crash), pixel_fixed_point_position, pixel_helper_lanes, pixel_interlock, pixel_lds, pixel_lds_lane_slots, pixel_uint16_export (crash), pixel_valid_mask (crash), pixel_wave_reduction, prepared_exports (crash), provoking_vertex, scalar_swappc_fetch (crash), srgb8_color_target (crash), uint8x4_color_target (crash), vertex_fetch, zero_stride_vertex_fetch.

Bisecting agc_driver_draw_offset_indices also gives b69270dd (#2713) as the first bad merge, with its parent da7429f6 passing; that bisect did not clear the driver cache between steps, so take it as consistent with the table rather than separate evidence.

A side observation, not verified beyond these runs: since AMD's cache is keyed by executable name, a relinked title that keeps its name across AnyPS5 updates may get the same stale pipelines.

AI-assisted: yes (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6098844619 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2755#issuecomment-6098844619). Originally posted by [LeandroLP23](https://github.com/LeandroLP23) on 2026-10-10T15:01:58Z. --- **Correction: most of the report above is wrong. On clean caches the only regression is #2713 (background LTO relinking of library pipelines); #2636 and #2661 are fine.** My earlier runs reused AMD's on-disk pipeline cache (`%LOCALAPPDATA%\AMD\VkCache`, keyed by executable name) across the builds I bisected, and the driver served pipelines compiled by older builds of the same test executables. Run with that cache and AnyPS5's `build/tests/shader_cache` emptied before each mode, on `main` db343a93 (same Radeon 860M, driver 32.0.13058.8001, Windows 11, `ctest -R agc_ -j1`): | Mode | Failed of 321 | |---|---| | default (pipeline libraries + background LTO) | 27, cold and warm | | `APS5_NO_PIPELINE_LTO=1` | 0 | | `APS5_NO_GPL=1` | 0 | So group B (the 33 `0xdeadbeef` tests I attributed to #2661) and at least part of group A were the stale driver cache, not the code: `agc_driver_many_buffers` and `agc_unchanged_cpu_stamps` failed on the same build with the old cache and pass with it emptied. Sorry for the noise. What remains, all graphics tests, all passing with `APS5_NO_PIPELINE_LTO=1` (prefix `agc_driver_` except the first two): `agc_pipeline_cache` (crash), `agc_pipeline_library` (crash), `mesh`, `conservative_rasterization`, `depth_bias_per_face`, `draw_offset_indices`, `dual_source_blend`, `exec_host_lanes`, `interpolation_f16` (crash), `ngg_vertex_wave_info`, `packed_unorm_color_target` (crash), `pixel_barycentric_emulation` (crash), `pixel_fixed_point_position`, `pixel_helper_lanes`, `pixel_interlock`, `pixel_lds`, `pixel_lds_lane_slots`, `pixel_uint16_export` (crash), `pixel_valid_mask` (crash), `pixel_wave_reduction`, `prepared_exports` (crash), `provoking_vertex`, `scalar_swappc_fetch` (crash), `srgb8_color_target` (crash), `uint8x4_color_target` (crash), `vertex_fetch`, `zero_stride_vertex_fetch`. Bisecting `agc_driver_draw_offset_indices` also gives b69270dd (#2713) as the first bad merge, with its parent da7429f6 passing; that bisect did not clear the driver cache between steps, so take it as consistent with the table rather than separate evidence. A side observation, not verified beyond these runs: since AMD's cache is keyed by executable name, a relinked title that keeps its name across AnyPS5 updates may get the same stale pipelines. AI-assisted: yes (Claude Code).
LeandroLP23 commented 2026-10-10 23:43:19 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by LeandroLP23 on 2026-10-10T23:43:19Z.


Cause found by @poonasor in #2944: the background LTO link relinks shader library parts after Pipeline has destroyed their shader modules, and AMD's driver reads the freed modules. With their fix (8acd0113), all 27 failures listed above are gone on this Radeon 860M (0 of 335 on main 181420f8, caches emptied, cold and warm; details on #2944). I'll close this issue once the fix is merged.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6103424716 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2755#issuecomment-6103424716). Originally posted by [LeandroLP23](https://github.com/LeandroLP23) on 2026-10-10T23:43:19Z. --- Cause found by @poonasor in #2944: the background LTO link relinks shader library parts after `Pipeline` has destroyed their shader modules, and AMD's driver reads the freed modules. With their fix (8acd0113), all 27 failures listed above are gone on this Radeon 860M (0 of 335 on `main` 181420f8, caches emptied, cold and warm; details on #2944). I'll close this issue once the fix is merged.
LeandroLP23 commented 2026-10-11 07:51:59 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by LeandroLP23 on 2026-10-11T07:51:59Z.


Fixed by #3173 (@poonasor's change, merged): the 27 failures above no longer occur on this Radeon 860M.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6106857755 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2755#issuecomment-6106857755). Originally posted by [LeandroLP23](https://github.com/LeandroLP23) on 2026-10-11T07:51:59Z. --- Fixed by #3173 (@poonasor's change, merged): the 27 failures above no longer occur on this Radeon 860M.
Sign in to join this conversation.
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#2755
No description provided.