Skip to content

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

Closed

Description

@LeandroLP23

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 cf8b129. All of them passed on main e8b47b9 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: 663cc42 (perf(agc): link graphics pipelines from per-stage libraries #2636). Its parent 6675e60 passes, bisected with agc_unchanged_cpu_stamps (2 runs per step).
  • On cf8b129 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: 197ffac (perf(agc): give each graphics stage a fixed push constant slot with pipeline libraries #2661). Its parent b5f5362 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).

Activity

  1. LeandroLP23 commented on Oct 10, 2026

    @LeandroLP23
    ContributorAuthor

    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 db343a9 (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 b69270d (#2713) as the first bad merge, with its parent da7429f 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).

  2. changed the title [-]AMD Windows: 40 agc GPU tests fail on main since #2636 (pipeline libraries) and #2661 (fixed push slots)[/-] [+]AMD Windows: 27 agc graphics tests fail with background pipeline LTO (#2713)[/+] on Oct 10, 2026
  3. LeandroLP23 commented on Oct 10, 2026

    @LeandroLP23
    ContributorAuthor

    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 (8acd011), all 27 failures listed above are gone on this Radeon 860M (0 of 335 on main 181420f, caches emptied, cold and warm; details on #2944). I'll close this issue once the fix is merged.

  4. LeandroLP23 commented on Oct 11, 2026

    @LeandroLP23
    ContributorAuthor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions