Repository navigation
integration/aurora-7.3: sync aurora-wip 85a66c8a6058 and retire #416, #1465 - #58
Conversation
…liques-24-undef-hit borealis: undefine M5 ray-query hit payload and trim SCS to 24 cliques
aurora-wip's d0f69b4 ("vulkan/runtime: defer private timeline wait-before-signal submits inline") already implements the runtime half of 9543e50 ("vulkan: make submit refusal cover the entire API call"): it builds every batch before submitting any, a rejected batch restores its temporary imports and moved binary payloads and its command buffers' states, and a refusal after an earlier batch was admitted loses the device. vk_queue.c, vk_queue.h and vk_queue_pending_wait_test.c take aurora-wip's version, whose tests cover the same cases; keeping both would roll a refusal back twice through two sets of bookkeeping. The Borealis side of this branch merges unchanged. Signed-off-by: Jonathan Goyvaerts <jonathan.goyvaerts@gmail.com>
STACK_ARRAY() falls back to malloc() past 8 entries, and neither the per-signal pending tokens in vk_queue_submit_final() nor the pending waits in vk_queue_wait_pending() checked it, so a submission with nine or more signals or waits under memory pressure wrote through NULL instead of returning VK_ERROR_OUT_OF_HOST_MEMORY. 9543e50 checked both; the merge of aurora-wip took aurora-wip's version of the file without them. Both checks come before anything is published or the wait list is swapped, and every caller already rejects or loses the queue on an error. Signed-off-by: Jonathan Goyvaerts <jonathan.goyvaerts@gmail.com>
AGX3 compares a uniform against a small immediate in place only from the low 256 uniform halves: the uniform/immediate branch compare (both AGX3 encodings, M5 in compute programs) and the AGX3B select on a uniform flag. nir_opt_preamble places its exports in candidate order, so in a shader with many exports a branch flag often lands above 256 behind vectors that only feed arithmetic (which reads all 512 halves), and every branch on it copied the flag into a register first. agx_nir_place_preamble_handles_low() already moves texture handles and load bases to the bottom of the export range. Give flags the next tier: after the handles, the most-used flags first (a use in a loop counts for eight), then everything else in its current order. A compare of the flag against a small constant that folds into the branch or select counts too. Only placement changes; every slot keeps its size and alignment. GTA V Enhanced pipeline cache (12,897 executables) on the G16G shim: fragment instructions 2,721,438 -> 2,708,957 (-0.46%, 2,230 executables down, 157 up), vertex 1,893,264 -> 1,890,786 (-0.13%), no spills. In the 190 heaviest pipelines no branch copies its flag any more, and fragment main-program uniform copies drop 11,779 -> 9,260. Thread counts move both ways on RA noise (13 up, 11 down). G17S is unchanged: M5 fragment branches do not use the uniform compare. Signed-off-by: DjDeveloperr <hey@djdev.me>
…tex-barrier agx: preserve non-shared ordering barriers in shared tree reduce
… tails A leading vkCmdWriteTimestamp2(TOP_OF_PIPE) rides on the first command's start stamp unless the queue still runs work it must latch after (c986ea6); then a compute carrier ahead of the command buffer writes it. One of those conditions was any earlier submission that raised the queue barrier tail, whichever classes the tail named. A command buffer that makes its dispatch wait for the previous one (ALL_COMMANDS into COMPUTE_SHADER, as GPUBench's verified query kind=timestamp case records) raises the compute tail at every submission, so at queue depth 16 every submission took a carrier. Where the kernel publishes end stamps on the host, the carrier waits for the previous submission's end stamp and the dispatch, which follows the carrier, for the carrier's: two round trips per submission. On the J700 that case went from 109 us of overhead per submission on the installed Mesa to 210 us on aurora-wip. The stamp's first scope is empty, so only a dependency whose second scope holds TOP_OF_PIPE (a TOP_OF_PIPE or ALL_COMMANDS destination) orders it. Every such dependency raises both the compute and the transfer class tails, so count a tail as raised for the stamp only when the lower of those two rises. A compute-only or graphics-only destination still orders the work after it as before; the stamp no longer waits for it. Signed-off-by: DjDeveloperr <hey@djdev.me>
agx: place branch and select flags in the low uniform file
Conflicts: - hk_device_memory.c, hk_system_memory_fits(): aurora-wip moved the reserve into hk_memory_reserve(); this branch's overflow-safe comparison now uses it. - hk_device_memory.c, hk_AllocateMemory(): aurora-wip's capture/replay memory (#554) is allocated at its own address after the same admission check. With DRM_ASAHI_FEATURE_IDLE_VM_RECLAIM it is left to the kernel too: no MemAvailable check, so the check's cache eviction is gone with it. A kernel refusal of capture/replay memory now evicts the idle cached BOs and tries once more, as agx_bo_create_checked() does for other memory, at a fresh reservation of the same address (a failed agx_bo_create_at() frees its address). - test-hk-memory-oom.c: both sides' cases stay. The reclaim case also allocates capture/replay memory past the mock kernel's limit with a BO in the cache, and checks it reads no MemAvailable and evicts once. Signed-off-by: Jonathan Goyvaerts <jonathan.goyvaerts@gmail.com>
The comment on the capture/replay retry read as if only a kernel with DRM_ASAHI_FEATURE_IDLE_VM_RECLAIM retried. Every kernel refusal evicts the idle cached BOs and tries once more, as agx_bo_create_checked() does; with the bit, that is the only eviction left. Comment only. Signed-off-by: Jonathan Goyvaerts <jonathan.goyvaerts@gmail.com>
test_timeout_with_output_held_open_is_bounded kills the fake test after 0.2 s. On a busy machine Python can take longer than that to start, so the kill can land before the fake test starts the descendant that holds its output. Nothing then opens the FIFO for reading, and the finally blocks forever opening it for writing. At load 70-90 on a 24-thread host this hung about half of the runs. Have the fake test and its descendant open the FIFO without waiting and read until no writer is left. The test opens the FIFO read-write before the run (this does not wait on Linux) and closes it afterwards, which lets both go whether they got to the FIFO before or after that. When the kill came before the descendant started, run again with a longer timeout. Signed-off-by: DjDeveloperr <hey@djdev.me>
The fake tests got a 1 s timeout unless a test passed its own. At load around 110 on a 24-thread host, starting Python took longer than that now and then, so "pass" cases came back as FAIL in test_pass_fail_skip_xfail_and_xpass, test_main_emits_json_lines and test_parallel_case_starts_members_concurrently (12 of 50 runs of the file). Those cases finish on their own, so a longer limit costs nothing when they work. The two tests that expect a timeout set their own. Signed-off-by: DjDeveloperr <hey@djdev.me>
The 512-leaf cutoff had no measured basis, and the reason its comment gave, keeping the fused leaf+Morton path for smaller structures, never applies on M5: hk_build_leaves_batched() generates every M5 build's leaves, and the fused path is only taken without a build_leaves hook (and only up to 256 leaves). Select 64-bit keys for every non-update top-level build, as RADV and ANV do. The test now checks every top-level case, and that a top-level size query covers the 64-bit key build whichever mode it names (a size query ignores mode), and that a BUILD query covers a later update. Signed-off-by: DjDeveloperr <hey@djdev.me>
Overlap is safe because enter_query gives each warp its own clique and because the per-USC traversal context, which every workgroup of every ray-query dispatch rewrites, holds only the device's single SCS layout. State the second condition where the barrier is dropped and where the context is written, so a per-shader layout cannot come in without the barrier. No code change. Signed-off-by: DjDeveloperr <hey@djdev.me>
…n-race borealis/tests/sync: stop the held-output test from hanging under load
agx_nir_opt_shared_byte_offsets() runs a second time on AGX3 after agx_nir_opt_licm() and agx_nir_opt_bitfield_slices(). When agx_nir_opt_bitfield_slices() fuses a disjoint ior into imadshl_agx, term_upper_bound() can prove a loop-invariant shared-memory address bounded that was previously opaque, causing fold_elem_offsets_impl() to rewrite the already-hoisted offset. Both fold_elem_offsets_impl() and fold_shifted_byte_offset() inserted the rewritten address arithmetic and u2u16 at nir_before_instr(&intr->instr), sinking loop-invariant shared-memory bases back into the loop body after LICM had already finished. On Q4_K cooperative-matrix matmul shaders, this rematerialized six hoisted shared-memory bases inside the inner K loop (+11 ALU, +4 loop immediates, +2 loop uniform copies, +8 GPRs, dropping occupancy from 576 to 512 threads). Emit the rewritten expression and u2u16 at nir_before_instr(u2u16_instr) instead. Every operand gathered by chasing ALU sources from u2u16_instr dominates u2u16_instr by SSA construction, and u2u16_instr dominates intr, so hoisted bases remain in their pre-loop block while keeping all bitfield-slice fusions intact. Signed-off-by: Satya Benson <satya@benson.earth>
…pilog-loads borealis: order the tile loads of a G17P multisample eMRT epilog (TF3 4x MSAA)
…ts-preserve-hoist borealis: preserve hoisted shared-memory offsets across post-LICM folding
When a compute shader masks a packed 32-bit word once and extracts all four byte lanes to float (such as quantized matmul weight/scale unpack: qm = q & 0x0f0f0f0f, then bytes 0..2 via mask/u2u8 and byte 3 via qm >> 24 -> u2f32), opt_bitfield_slice_instr() rewrote ushr(qm, 24) into ubitfield_extract(q, 24, 4). Because qm has other uses for the remaining byte lanes, the shared iand stays alive, while bypassing qm changes byte 3's source word from qm to q and narrows its extract width below 8. That prevents u2f32 byte-unpack lowering from extracting the high half of qm and prevents agx_opt_agx3_normflt_byte_pairs() from pairing byte 2 and byte 3 of qm into a zero-IC normflt pair, leaving an IC-pipe bfeil per word. Skip the ushr(iand(x, mask), k) -> ubitfield_extract rewrite when k is a byte offset (8, 16, or 24), the iand has multiple uses, and the shift feeds a byte-to-float conversion pattern recognized by AGX3 lowering. Single-use masks and integer consumers still fold as before. Add unit tests covering the NIR guard cases and an end-to-end AGX3C normflt byte-pair compile check. Signed-off-by: Satya Benson <satya@benson.earth>
…ommands The kernel opens the SCS window of the device's ray-query layout once for a whole compute command (register 0x107a1, from the command's scs_layout), and Borealis gives a command that layout as soon as one launch in it drives the intersector (m5_native_rq). Since the shipped layout dropped below 32 cliques (24 now, 768 threads), a workgroup larger than the window can share such a command: hk_nir_lower_m5_ray_queries() moves those workgroups to software traversal, which takes no clique, and plain compute takes none either, but both still run under the command's window, where a workgroup the window cannot hold does not start (the 12-03 1024-thread hang at 28 cliques). The c1601 J714s kit's overlap burst records a 1024-thread software-traversal dispatch with hardware ray-query dispatches in one command buffer. It hung the GPU (firmware reason 0, no MMU fault) on aurora-wip and on both PR arms, while the boundary probe of the same kit, which submits each workgroup size (64 to 1024, hardware and software traversal) on its own, passed. Keep the rule that every launch of an intersector command fits its window: record each M5 stream's largest workgroup, end the open compute stream before a launch that would break the rule (application, meta and ray-tracing dispatches, and precompiled helpers), and never merge two streams, at EndCommandBuffer or in submit packing, into one that breaks it. A packet is checked again after fusing, which plans no members. Signed-off-by: DjDeveloperr <hey@djdev.me>
borealis: carry a leading top-of-pipe stamp past compute-only barrier tails
Signed-off-by: Satya Benson <satya@benson.earth>
hk/m5_as: Enable 64-bit Morton keys for large M5 top-level acceleration structures
borealis: allow independent M5 ray-query compute dispatches to overlap
The J714s kit for the previous commit (base aurora-wip 09902a1) ran every reproducer in its own process. Base hung (firmware reason 0, no MMU fault) in two commands: one holding a 32-thread hardware ray-query dispatch with the 1024-thread software-traversal variant of the same shader, and c1601's overlap burst. Plain compute workgroups of 769 and 1024 threads in the same position ran clean, and so did the 768-thread control. With the fix, every reproducer ran clean, CTS ray_query, ray_tracing_pipeline, compute.pipeline.basic and sync2 binary_semaphore matched base case for case, and the gpubench RT rows kept their CRCs. So the window does not stop every larger workgroup, as the comment said; it stopped the software-traversal one. Say so, and say why the rule still keeps every workgroup past the window out: which per-USC resource the window takes is not known. Signed-off-by: DjDeveloperr <hey@djdev.me>
A stream that hk_cmd_buffer_m5_window_cs() ends can still hold work the launch recorded before the split, such as the grid a conditional rendering patch writes for it. Nothing ordered the two commands, and a kernel that runs independent compute commands at once (DRM_ASAHI_FEATURE_COMPUTE_MULTI_CHANNEL) could start the launch before that work was done. The next stream now waits on the ended one. The workgroup that was split off then also never runs while the intersector command still holds its window. A single-kick trace (hk_trace_rays_single_kick()) records every kernel's resource profile into the open stream, then launches whichever kernel the GPU selects from it. When an earlier kernel did not drive the intersector and a later one did, the split fell between them, and the stream that runs the trace lacked the earlier kernels' profiles. Captured kernels now count as driving the intersector, so a split comes before the first kernel.
…ces-preserve-byte-to-float borealis: preserve shared masked byte-to-float shifts in bitfield_slices
linux#3685 added the limits on memory that idle reclaim never releases to the comment of DRM_ASAHI_FEATURE_IDLE_VM_RECLAIM (5ce50e0ea12f). Copy it word for word, so the header matches the kernel at f160c53ab761. Comment only. Signed-off-by: DjDeveloperr <hey@djdev.me>
Random small-shader fuzzer for the AGX3 packer (rejects like aurora-silicon#662 are what it hunts). Each iteration builds a short instruction sequence with agx_builder and runs agx3_pack_binary() on it; a false return is a packer reject. Rejects print their seed and op trace so they can be replayed. The generator emits shapes inside the grounded select-core domain -- 32-bit even register operands under the encoding's compact bound (192 on agx3b, 128 on agx3c), zero iadd/imad shift, tied fcmpsel min/max selects, the four grounded convert pairs -- while a small rate of single-knob mutations probes the envelope edges. The first run found agx3c refusing plain f32 reg-reg fmul/ffma/roundeven with an operand in [128, 256), a class agx3b packs outright. Host-side only: no GPU needed. The meson test runs strict in-domain mode (-x -n 4096 -e all); edge probing stays available by hand via -s/-n/-e/-v. Ported from joshuaswarren#76 (w7W/r75-agx3-pack-fuzz-v2). Author-Model: devin/swe-2-high
agx3: host-side packer fuzzer as a strict meson test (R75)
agx: keep the native abs modifier on saturating M5 HMUL
On command-buffer reset and control-stream creation, Borealis previously zeroed ~26 KiB of payload arrays and unused-stage state per graphics or compute command buffer even when those fields are already guarded by counts, validity booleans, or pointer guards. Partition six hot structures so reset and stream initialization clear only their headers and guards (with compile-time static_assert checks enforcing layout invariants): 1. struct hk_sync_state (5,456 B -> 1,216 B, -4,240 B): move stamp_copies[], pass_fp[], and xfer_writes[] to the tail past their counts, zero only up to stamp_copies in hk_sync_reset(), and call hk_sync_reset() from hk_pack_init_packet() and hk_render_pack_init(). 2. struct hk_render_pack_edges (1,480 B -> 136 B, -1,344 B): move head_pass, tail_pass, empty_pass, and transitions[] to the tail and zero only the header prefix in hk_render_pack_reset(). 3. struct hk_cmd_buffer BO retention (128 B -> 0 B for <= 8 unique BOs): keep small recordings inline in recent_retained_bos[0..retained_inline_count-1] without allocating retained_set or zeroing the tables on release, promoting to the hash table once a 9th unique BO is retained. 4. struct hk_drm_attachment_set (488 B -> 0 B): initialize only count and complete in hk_drm_attachment_set_init() and add hk_drm_attachment_set_copy() to copy only initialized entries. 5. struct hk_cmd_buffer::state (14,984 B -> 7,112 B graphics-only, 9,880 B compute): fold root_fragment_snapshot, fs_root_fragment_snapshot, g17p_bind_tail, g17p_bind_tail_memo, vb_format_memo, g17p_vdm_update_memo, fast_link_vs, and fast_link_fs into the skipped graphics cache window while keeping their guard fields cleared unconditionally across all GPU generations; extend the direct_draw_fast skip through dynbuf_ranges; move deferred_clear[], pending_msaa_resolve, and state.cs to the tail of state and gate state.cs zeroing and descriptor teardown on a new cmd->used_cs flag. 6. struct hk_cs (3,944 B -> 1,848 B VDM / 1,280 B CDM): partition into common prefix [0..tib), graphics-only state [tib..m5_ppp_emitted), guarded tail payloads [m5_ppp_emitted..compute_resources), and recycled dynarrays [compute_resources..end) initialized only on fresh allocation so pool reuse avoids saving/restoring all eight dynarrays. Total per-command-buffer zeroing drops from 25,992 B to 10,312 B (-60.3%) for a graphics command buffer with one VDM stream and to 12,512 B (-51.9%) for a compute command buffer with one CDM stream. Expand test-hk-cmdpool-submit-comp to cover inline BO retention and migration plus 0xDD/0xEE-poisoned partial resets and control-stream creation, and update test-hk-pack's packet-reuse sentinel span to the contiguous graphics-only section [tib..compute_attachments). Signed-off-by: Satya Benson <satya@benson.earth>
…draws, and EOT On G18G, reloading an uncompressed 16-bit floating-point render target (including 2x/4x MSAA RGBA16F) through a float texture descriptor and storing 32-bit float registers into an R16_FLOAT tilebuffer emits FP32->FP16 narrowing moves (f16mul), canonicalizing every half-float NaN payload to 0x7e00 even for untouched pixels outside a scissor box. Zero color-mask tile preservation similarly widened loaded F16 tile samples to 32-bit floats and narrowed them back on store, and the non-resolving EOT PBE bound the float format rather than the bit-exact R16*_UINT equivalent. Fix all three stages for uncompressed pure half-float targets: 1. Add raw16_load_mask to agx_bg_eot_key and agx_raw_f16_uint_format() for R16_FLOAT, R16G16_FLOAT, and R16G16B16A16_FLOAT (excluding RGBX formats whose synthesized 1.0 alpha differs between float and uint). When set, bind the reload texture with the matching R16*_UINT format and narrow via u2u16 in agx_compile_background_shader() so neither the texture unit nor the W16 tile store performs F16<->F32 conversion (keeping M5 multisample reloads on W32). 2. In agx_nir_lower_tilebuffer.c, keep zero color-mask preservation at 16-bit for pure half-float targets so load_local_pixel_agx and store_local_pixel_agx roundtrip raw 16-bit lanes without f2f32/f2f16. 3. In agx_build_g17g_bg_eot(), bind the matching R16*_UINT PBE format for uncompressed non-resolving EOT stores (keeping FLOAT for multisample resolve stores). Add unit tests in test-agx-g17p-mrt-mixed.c decoding the compiled G18G AGX3d binaries to assert zero FP ALU ops on 1x/2x/4x RGBA16F raw16 reloads and 2x/4x zero-mask epilogs, alongside the M5 8x MSAA guard. Fixes: aurora-silicon#610 Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
…licating it (#1700) Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
vulkan/wsi/display: check atomic KMS capability and map non-OOM KMS errors cleanly
Preserve both compiler test blocks appended at the same location. Signed-off-by: DjDeveloperr <hey@djdev.me>
…rst eligibility Set cost->has_const_global in arm_is_flattenable() whenever an arm contains nir_intrinsic_load_global_constant, independently of whether load_needs_redirect() returns true. Previously a speculatable load_global_constant paired with an ordinary data load bypassed load_needs_redirect(), left has_const_global false, and allowed the divergent burst path to hoist all four constant loads before their guards. Add FlattenLoadsKeeps.DivergentBurstLeavesMixedSpeculatableConstGlobalGuarded covering four contiguous divergent arms each with one ordinary global load and one speculatable load_global_constant. Refs #1535 Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
borealis: trim per-command-buffer reset and stream init zeroing
…fact ci: publish the tested ARM64 Mesa runtime for EDGE cuts
borealis: report a refused submission instead of losing the device
…load-bursts agx: qualify divergent tile-load bursts with live register pressure budget
Blending into B5G6R5_UNORM (RGB565) at 2x and 4x on G18G widens each 3-channel F16 tile load (mask 7) to 4 channels (mask 15) during first-pass AGX3C legalization, while the matching tile store stays 3-channel F16 (mask 7) inside the same 8-byte sample slot. Both agx3_order_g18_msaa_tile_ops() and agx3_g18_msaa_tile_stride() required mask 15 for AGX_FORMAT_F16, refusing the 3-channel store so the epilog fell out of the G18G MSAA MRT protocol and failed binary packing at the tile_stores_left > 1 guard (aurora-silicon#1598). Admit 3-channel F16 ST_TILE (mask 7) with an 8-byte stride in both the G18G MSAA tile-op ordering pass and packer stride helper, while keeping unwidened mask-7 F16 loads and non-8-byte-aligned offsets (such as a second tightly packed B5G6R5 target at offset 6) refused. Refs: aurora-silicon#1598 Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
…ilter (#1709)
Live profiling of Unity/SCP:SL command-buffer recording showed hot misses
from hk_flush_dynamic_state_slow() into hk_get_fast_linked_slow() (taking
shader->linked.lock and hashing the 304 B vertex fast-link key) because
HK_SHADER_FAST_LINK_SLOTS was capped at 4 while uber vertex shaders
routinely exceed 4 vertex-input prolog layouts:
- Widen HK_SHADER_FAST_LINK_SLOTS from 4 to 16 and store a contiguous
fast_hash[16] array alongside fast[16] in shader->linked (plus cached
fast_key_hash in hk_linked_shader's existing padding).
- Publish new slots via a single __ATOMIC_RELEASE store to fast_count
after fast_hash[slot], fast[slot], and linked->fast_key are initialized,
so lock-free readers do one __ATOMIC_ACQUIRE load of fast_count instead
of up to 16 acquire loads on ARM64.
- Keep single-variant and dominant slot-0 hits hash-free by checking
slot 0 directly first; on a miss with count >= 2, compute the 32-bit
XXH32 key hash once, scan fast_hash[1..count-1] without dereferencing
non-matching candidates, verify full fast_key equality with memcmp on
hash match, and pass the precomputed hash through to
_mesa_hash_table_{search,insert}_pre_hashed() on overflow.
- Extend hk_fast_link_cache unit tests to verify 16 lock-free slots
without touching shader->linked.ht, #17+ fallback to ht, single-variant
no-hash path, hash-collision rejection via full memcmp, and 8-thread
concurrent publish/lookup stress across 24 keys.
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
…serve asahi: preserve raw F16 NaN bits across G18G tile reloads, zero-mask draws, and EOT
…st-dma-select agx: fold compact cheap-ALU no-preamble post-DMA branches to selects
…nd-epilog agx: admit 3-channel F16 MSAA tile stores in G18G tile stride
…verhead (#1712) Reduce recurring CPU work on command-buffer reset and first-bind dynamic graphics state copies: - Skip redundant 1.1 KiB default struct copies in vk_dynamic_graphics_state_clear() when the dynamic state is already at defaults, and skip zeroing the 776 B vertex-input and 268 B sample-locations side structs when unused. - Add an empty-source early return and a disjoint-set fast path in vk_dynamic_graphics_state_copy() for the common first-bind case where dst->set and src->set do not overlap, copying active fields directly and updating dirty/set/changed bitsets and generation in bulk. Accumulate changed bits in registers for overlapping copies and group multi-field states under single set checks. - Extend the skipped tail span in hk_reset_cmd_buffer_quiesced() across _dynamic_vi, _dynamic_sl, and all of direct_draw_fast, explicitly clearing only direct_draw_fast.valid and unsupported_linked_vs on reset and clearing push_range_count/dynbuf_range_count at arm entry. - Extend test-hk-cmdpool-submit-comp to cover the expanded reset span, active vs unused dynamic VI/SL clearing, and disjoint/overlapping vk_dynamic_graphics_state_copy() paths. Signed-off-by: Satya Benson <satya@benson.earth> Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Signed-off-by: Marcelo Alcantara <maralc@gmail.com>
Confidence Score: 4/5
[High impact] The sync reaches shared Mesa code and multiple Apple GPU driver paths. Fix the overlay’s Vulkan library path before merging so the downloaded build runs as advertised. Findings
SummarySyncs the integration branch to the newer upstream intake and retires two merged carries.
|
| DESTDIR="$PWD/stage" meson install -C build --no-rebuild | ||
| D="$PWD/dist"; mkdir -p "$D"; name="mesa-overlay-${sha:0:12}-fc$REL-aarch64" | ||
| tar --zstd -C stage -cf "$D/$name.tar.zst" . |
There was a problem hiding this comment.
Following the build-info.txt instructions loads the installed Vulkan driver instead of the downloaded build. The default per-architecture manifest keeps an absolute library path under /usr/lib64. VK_DRIVER_FILES selects that manifest, but LD_LIBRARY_PATH cannot redirect its absolute path. If the host driver is missing, Vulkan cannot load it.
Rewrite ICD.library_path relative to the staged manifest before creating the archive, as .github/workflows/asahi.yml already does.
There was a problem hiding this comment.
🔵 Needs a closer look
The 784-commit integration broadly changes Mac GPU synchronization, memory handling, and capability gates, but lacks packaged edge builds and affected-hardware validation beyond CI.
No open issues 🎉
What changed in this PR
Syncs integration/aurora-7.3 with aurora-wip at 85a66c8a6058, bringing upstream graphics, compiler, and runtime updates into the integration branch.
Changes:
- Advances intake by 784 commits and retires carries #416 and #1465, retaining #415.
- Updates Asahi capabilities, synchronization, memory handling, rendering, and shader compilation.
- Expands regression coverage, documentation, and CI infrastructure.
The description reports passing upstream CI; packaged builds and hardware smoke testing remain pending.
| File | Description |
|---|---|
| src/vulkan/wsi/wsi_common_drm.c | Copies acquire/release synchronization into a binary snapshot. |
| src/vulkan/wsi/meson.build | Registers DRM acquire and display tests. |
| src/vulkan/runtime/vk_semaphore.c | Updates loss-aware waits and deferred submission flushing. |
| src/vulkan/runtime/vk_queue.h | Adds queue tracking and deferred submission interfaces. |
| src/vulkan/runtime/vk_nir.c | Invokes an optional pre-inlining transform. |
| src/vulkan/runtime/vk_fence.c | Updates device-loss handling and host waits. |
| src/vulkan/runtime/vk_command_pool.h | Adds a submission lock. |
| src/vulkan/runtime/vk_command_pool.c | Initializes and destroys the submission lock. |
| src/vulkan/runtime/vk_command_buffer.h | Tracks pending submission state. |
| src/vulkan/runtime/vk_acceleration_structure.h | Extends build configuration and scratch initialization contracts. |
| src/vulkan/runtime/tests/vk_queue_lost_submit_test.c | Updates queue-list lifecycle setup. |
| src/vulkan/runtime/tests/vk_queue_dropped_signal_test.c | Updates queue-list lifecycle setup. |
| src/vulkan/runtime/tests/solaris/atomic.h | Supplies atomic declarations for tests. |
| src/vulkan/runtime/bvh/vk_bvh_helpers.h | Adds packed-key decoding and batched vertex-loop control. |
| src/vulkan/runtime/bvh/ploc_internal.comp | Handles packed 64-bit leaf keys. |
| src/vulkan/runtime/bvh/meson.build | Builds the packed-key sorting variant. |
| src/vulkan/runtime/bvh/leaf.h | Preserves application acceleration-structure references. |
| src/util/tests/u_idalloc_test.cpp | Tests sparse allocator segment rollover. |
| src/util/sparse_bitset.h | Makes first-set lookup const-correct. |
| src/util/rb_tree.h | Makes first-node lookup const-correct. |
| src/util/rb_tree.c | Updates the first-node lookup definition. |
| src/util/meson.build | Registers allocator tests. |
| src/util/driconf.h | Defines an optional renderer-name setting. |
| src/poly/tests/poly_heap_math_tests.c | Tests unit-based heap sizing boundaries. |
| src/poly/poly_heap_math.h | Introduces aligned heap-unit sizing. |
| src/mesa/state_tracker/st_program.c | Updates planar YUV lowering and alignment options. |
| src/mesa/state_tracker/st_cb_texture.c | Allows driver-preferred PBO upload draws. |
| src/kosmickrisp/vulkan/kk_cmd_draw.c | Resets large heap demand tracking. |
| src/intel/vulkan/genX_acceleration_structure.c | Reports whether update scratch was initialized. |
| src/gallium/include/pipe/p_screen.h | Adds the PBO upload preference callback. |
| src/gallium/drivers/zink/zink_types.h | Records queue global priority. |
| src/gallium/drivers/zink/zink_device_info.py | Adds global-priority extension discovery. |
| src/gallium/drivers/zink/zink_context.c | Reports the shared queue’s actual priority. |
| src/gallium/drivers/asahi/tests/test-agx-vs-query.c | Detects batch replacement using slot generations. |
| src/gallium/drivers/asahi/tests/test-agx-g17p-shadow-border.c | Expands native shadow-border coverage. |
| src/gallium/drivers/asahi/tests/test-agx-g17p-blit.c | Updates compression capability expectations. |
| src/gallium/drivers/asahi/driinfo_asahi.h | Registers the renderer-name option. |
| src/gallium/drivers/asahi/agx_swtnl.c | Handles layered vertex shaders with transform feedback. |
| src/gallium/drivers/asahi/agx_query.c | Handles allocation failure and queued query writers. |
| src/gallium/drivers/asahi/agx_fence.c | Submits pending work before fence operations. |
| src/gallium/drivers/asahi/agx_blit.c | Separates GPU blits and adjusts imageblock uploads. |
| src/compiler/spirv/nir_spirv.h | Declares the optional pre-inlining callback. |
| src/compiler/nir/nir.h | Adds the MSB-aligned YUV option. |
| src/compiler/nir/nir_lower_tex.c | Scales MSB-aligned YUV samples. |
| src/compiler/nir/nir_intrinsics.py | Defines sparse-state and ray-tracing intrinsics. |
| src/compiler/nir/nir_divergence_analysis.c | Classifies additional AGX system values. |
| src/compiler/nir/meson.build | Registers YUV lowering tests. |
| src/asahi/vulkan/tests/vulkan_b10g11r11_nan.vert | Adds a fullscreen vertex test shader. |
| src/asahi/vulkan/tests/vulkan_b10g11r11_nan.frag | Renders packed-float test patterns. |
| src/asahi/vulkan/tests/vulkan_b10g11r11_nan_store.comp | Writes packed-float test images. |
| src/asahi/vulkan/tests/vulkan_b10g11r11_nan_pattern.glsl | Defines shared NaN and infinity patterns. |
| src/asahi/vulkan/tests/vulkan_b10g11r11_nan_load.comp | Captures sampled and storage-image values. |
| src/asahi/vulkan/tests/vulkan_b10g11r11_nan_fetch.comp | Captures sampled-only image values. |
| src/asahi/vulkan/tests/test-native-feature-defaults.c | Updates ray-tracing and mesh feature expectations. |
| src/asahi/vulkan/tests/test-hk-tess-batch.c | Tests preservation of pinned barrier sites. |
| src/asahi/vulkan/tests/test-hk-tes-query.c | Updates descriptor-lowering arguments. |
| src/asahi/vulkan/tests/test-hk-submit-admission.c | Updates queue-list initialization and cleanup. |
| src/asahi/vulkan/tests/test-hk-shader-loop-bound-cache.c | Tests cached vertex scratch routing. |
| src/asahi/vulkan/tests/test-hk-root-size.c | Updates workgroup-coalescing capability checks. |
| src/asahi/vulkan/tests/test-hk-queue-sharing.c | Updates queue-list lifecycle handling. |
| src/asahi/vulkan/tests/test-hk-query-program.c | Tests query kernels across layouts and chips. |
| src/asahi/vulkan/tests/test-hk-pass-merge.c | Adds G15 pass-merge expectations. |
| src/asahi/vulkan/tests/test-hk-native-descriptor.c | Tests expanded M5 compressed MSAA formats. |
| src/asahi/vulkan/tests/test-hk-m5-store-window.c | Updates descriptor-lowering arguments. |
| src/asahi/vulkan/tests/test-hk-g17p-metadata-grid.c | Tests packed-float and YUV copy planning. |
| src/asahi/vulkan/tests/test-hk-g17p-linear-slice-copy.c | Tests copy-width variant selection. |
| src/asahi/vulkan/tests/test-hk-g16s-compression.c | Extends compression expectations to G15. |
| src/asahi/vulkan/tests/test-hk-drm-render-core.c | Tests attachment limits and range merging. |
| src/asahi/vulkan/tests/test-hk-coherent-image.c | Updates descriptor-lowering arguments. |
| src/asahi/vulkan/tests/hk_vulkan_multi_viewport_blend.vert | Adds a default-viewport test shader. |
| src/asahi/vulkan/tests/hk_vulkan_multi_viewport_blend.frag | Adds a constant-color blend shader. |
| src/asahi/vulkan/tests/hk_vulkan_multi_viewport_blend_index.vert | Adds explicit viewport selection. |
| src/asahi/vulkan/tests/hk_vulkan_imadshl_zero_factor.comp | Exercises zero-factor shared-address arithmetic. |
| src/asahi/vulkan/tests/hk_vulkan_heap_overflow.tese | Adds heap-overflow tessellation evaluation. |
| src/asahi/vulkan/tests/hk_vulkan_heap_overflow.tesc | Generates tessellation load for overflow testing. |
| src/asahi/vulkan/tests/brl_vulkan_ssbo_word_fields.comp | Exercises guarded buffer-field reads. |
| src/asahi/vulkan/tests/aurora_packtest.c | Uses the current merge-debug setting. |
| src/asahi/vulkan/hk_tess_batch.c | Preserves alias-pinned tail barriers. |
| src/asahi/vulkan/hk_ray_tracing_pipeline.h | Documents G17P per-raygen kernels. |
| src/asahi/vulkan/hk_ray_tracing_core.h | Clarifies recursion-limit documentation. |
| src/asahi/vulkan/hk_query_pool.h | Adds allocation tracking and submission rollback declarations. |
| src/asahi/vulkan/hk_query_oq.h | Makes retirement-stamp support device-aware. |
| src/asahi/vulkan/hk_physical_device.h | Extends heap limits and sparse specialization tracking. |
| src/asahi/vulkan/hk_pass_merge.h | Extends merge support to native AGX3B. |
| src/asahi/vulkan/hk_pack.h | Adds dispatch and intersector-window limits. |
| src/asahi/vulkan/hk_nir_shared_zero_init.h | Declares shared-memory initialization analysis. |
| src/asahi/vulkan/hk_nir_root_size.c | Excludes additional ray intrinsics from coalescing. |
| src/asahi/vulkan/hk_nir_ray_tracing.h | Adds M5 hardware ray-query configuration. |
| src/asahi/vulkan/hk_nir_lower_mesh.h | Tracks mesh output spill size. |
| src/asahi/vulkan/hk_nir_lower_gs.c | Updates the ray-query lowering call. |
| src/asahi/vulkan/hk_m5_acceleration_structure.h | Adds refit batching and barrier interfaces. |
| src/asahi/vulkan/hk_image.h | Updates native format and interchange gating. |
| src/asahi/vulkan/hk_image_view.h | Adds cached border-swizzle encoding. |
| src/asahi/vulkan/hk_image_view.c | Initializes border swizzles and broadens compression handling. |
| src/asahi/vulkan/hk_frame_anatomy.h | Accepts resolved synchronization for tracing. |
| src/asahi/vulkan/hk_frame_anatomy.c | Logs resolved render synchronization. |
| src/asahi/vulkan/hk_format.c | Corrects interchange capability documentation. |
| src/asahi/vulkan/hk_drm_render_core.h | Declares attachment copying and admission checks. |
| src/asahi/vulkan/hk_drm_render_core.c | Implements attachment admission checks. |
| src/asahi/vulkan/hk_device_memory.h | Simplifies memory addressing and declares reserve sizing. |
| src/asahi/vulkan/hk_descriptor_set.h | Tracks dirty push-descriptor data. |
| src/asahi/vulkan/hk_compute_kick.h | Adds packed-atomic coordination interfaces. |
| src/asahi/vulkan/hk_cmd_trace_rays.c | Documents G17P per-raygen dispatch. |
| src/asahi/vulkan/hk_buffer.h | Tracks replay requests and updates sparse gating. |
| src/asahi/vulkan/hk_buffer_view.c | Fully clears null descriptor records. |
| src/asahi/vulkan/hk_agx3_vdm_decode.h | Bumps the AGX3 shader binary version. |
| src/asahi/vulkan/hk_acceleration_structure.h | Adds batched refit program variants. |
| src/asahi/vulkan/bvh/agx3_refit_leaf.comp | Adds batched leaf refitting. |
| src/asahi/vulkan/bvh/agx3_envelope.comp | Adds batched envelope processing. |
| src/asahi/vulkan/bvh/agx3_batch_build_leaf.comp | Supports Gen1 batching and shared address resolution. |
| src/asahi/libagx/query_copy.h | Adds specialized single-counter query copying. |
| src/asahi/libagx/m5_as_metadata.h | Defines M5 structure metadata and instance relinking. |
| src/asahi/libagx/libagx_dgc.h | Streamlines robust index and empty-draw handling. |
| src/asahi/libagx/geometry.cl | Reduces atomic operations through subgroup accumulation. |
| src/asahi/libagx/compression.h | Adds packed-float decompression identification. |
| src/asahi/libagx/compression_subtile.h | Decodes raw packed-float subtile offsets. |
| src/asahi/lib/tests/test-hal200-draw-state.c | Tests viewport-independent primitive output records. |
| src/asahi/lib/tests/test-chip.c | Updates ABI size and capability expectations. |
| src/asahi/lib/tests/test-async-queue.c | Initializes and destroys the separate shader-address lock. |
| src/asahi/lib/pool.h | Adds allocation failure and fallback tracking. |
| src/asahi/lib/meson.build | Builds and tests native descriptor helpers. |
| src/asahi/lib/agx_vdm_mesh_core.c | Broadens Gen1 mesh command support. |
| src/asahi/lib/agx_va.c | Separates shader and general address-space locks. |
| src/asahi/lib/agx_scratch.h | Makes scratch allocation report success. |
| src/asahi/lib/agx_ppp_hal300_graphics_core.c | Uses chip-specific varying limits. |
| src/asahi/lib/agx_ppp_hal200_graphics_core.h | Corrects viewport-word documentation. |
| src/asahi/lib/agx_pbe_agx3_core.c | Expands compressed Gen10 MSAA format support. |
| src/asahi/lib/agx_nir_lower_tilebuffer.c | Preserves raw half-float tile values. |
| src/asahi/lib/agx_linker.c | Broadens linked-shader debug dumping. |
| src/asahi/lib/agx_hal200_draw_state.c | Prevents viewport count from repeating primitives. |
| src/asahi/lib/agx_g17p_compression.h | Separates interchange capability gating. |
| src/asahi/lib/agx_device.c | Accepts reserved addresses and separates shader heap locking. |
| src/asahi/lib/agx_device_virtio.c | Accepts reserved addresses and cleans up allocation failures. |
| src/asahi/lib/agx_bo.h | Declares allocation at a reserved address. |
| src/asahi/lib/agx_bg_eot.h | Adds checked shader creation and raw half-float reload support. |
| src/asahi/layout/layout.h | Widens layer offsets and page conversions. |
| src/asahi/genxml/tests/test-agx3-packing.c | Updates empty-draw coalescing tests. |
| src/asahi/compiler/test/test-spill-repeat-pair.cpp | Tests deeper rematerialization recipes. |
| src/asahi/compiler/test/test-spill-fallback.cpp | Tests scratch-free occupancy improvements. |
| src/asahi/compiler/test/test-preamble-texture-policy.cpp | Updates preamble-placement arguments. |
| src/asahi/compiler/test/test-preamble-bases.cpp | Expands AGX2 placement expectations. |
| src/asahi/compiler/test/test-nonneg-idiv.cpp | Tests vector-comparison guard rejection. |
| src/asahi/compiler/test/test-narrow-barriers.cpp | Tests barrier scope with vector comparisons. |
| src/asahi/compiler/test/test-m5-byte-to-float.cpp | Expands native byte-conversion checks. |
| src/asahi/compiler/test/test-insert-waits.cpp | Updates G14G smart-wait expectations. |
| src/asahi/compiler/test/test-inline-mrt.cpp | Adds G15 local-read coverage. |
| src/asahi/compiler/test/test-half-bitfield-extract.cpp | Adds AGX2 shared-unpack coverage. |
| src/asahi/compiler/test/test-dw-conv-3x3.c | Expands convolution compilation and unrolling checks. |
| src/asahi/compiler/test/test-divergence-load-agx.cpp | Tests uniform provoking-vertex state. |
| src/asahi/compiler/test/test-agx3-m5-program.c | Tests expanded varying limits. |
| src/asahi/compiler/test/test-agx3-graphics-program.c | Adds G15 inline-constant program coverage. |
| src/asahi/compiler/test/test-agx3-g17p-device-barrier.c | Updates native AGX3B coherent-store expectations. |
| src/asahi/compiler/agx3_transcode.h | Declares instruction-aware immediate lookup. |
| src/asahi/compiler/agx3_tile_core.c | Updates compute imageblock store encoding. |
| src/asahi/compiler/agx3_sr_core.c | Admits additional AGX3C special registers. |
| src/asahi/compiler/agx3_pack.h | Defines the SCS publish barrier scope. |
| src/asahi/compiler/agx3_pack.c | Encodes the SCS publish barrier. |
| src/asahi/compiler/agx3_graphics_program.c | Broadens inline-constant program support. |
| src/asahi/compiler/agx3_funop_core.c | Expands runtime unary register encoding. |
| src/asahi/compiler/agx3_cf_core.h | Adds wait-aware comparison interfaces. |
| src/asahi/compiler/agx_validate.c | Allows AGX3B split-coordinate validation. |
| src/asahi/compiler/agx_performance.c | Computes a tighter occupancy-based register budget. |
| src/asahi/compiler/agx_opcodes.py | Adds SCS batch and ray registers. |
| src/asahi/compiler/agx_nir_opt_nonneg_idiv.c | Rejects unsupported vector comparison proofs. |
| src/asahi/compiler/agx_nir_opt_iv_divmod.c | Rejects vector inputs in scalar invariance analysis. |
| src/asahi/compiler/agx_nir_narrow_barriers.c | Rejects vector comparisons when narrowing barriers. |
| src/asahi/compiler/agx_nir_m5_mesh.h | Adds mesh spill interfaces and state. |
| src/asahi/compiler/agx_nir_lower_texture.c | Exposes rectangle LOD lowering as a shared pass. |
| src/asahi/compiler/agx_nir_lower_fma_rte.c | Lowers weak FMA after explicit FMA repair. |
| src/asahi/compiler/agx_nir_linear.h | Clarifies buffer-bound assumptions. |
| src/asahi/compiler/agx_nir_algebraic.py | Adds pixel-coordinate and signed-division folds. |
| src/asahi/compiler/agx_mesh_abi.h | Defines the mesh spill root layout. |
| src/asahi/compiler/agx_lower_parallel_copy.c | Corrects overlapping-copy splitting and register accounting. |
| src/asahi/compiler/agx_lower_divergent_shuffle.c | Reuses shared shuffle classification. |
| src/asahi/compiler/agx_insert_waits.c | Enables smart waits across AGX2 compute. |
| src/asahi/compiler/agx_compile.h | Adds register-budget levels and preserves weak FMA. |
| src/asahi/clc/asahi_clc.c | Updates spill-decompression target selection. |
| src/amd/vulkan/radv_acceleration_structure.c | Reports whether update scratch was initialized. |
| docs/gallium/screen.rst | Documents PBO upload path selection. |
| docs/drivers/asahi.rst | Links render and tile ordering documentation. |
| carry.toml | Advances intake and removes merged carries. |
| .github/workflows/ci-image.yml | Builds, checks, and publishes the CI image. |
| .github/ci/gcp-pr.sh | Adds configured author IDs to CI eligibility. |
| .github/ci/Containerfile.mesa | Upgrades zstd in the CI image. |
| .github/aurora/agent-policy-test.sh | Centralizes policy-test branch configuration. |
Review effort: Balanced
What: Sync
integration/aurora-7.3to verified-greenaurora-silicon/mesa@aurora-wip85a66c8a6058(+784 upstream commits, including G15 native graphics constant programs/uniform exports aurora-silicon/mesa#1686, retirement-stamped occlusion queries onG15G/G15Caurora-silicon/mesa#1685, AGX3B 8-bit imageblock PBO uploads aurora-silicon/mesa#1683, and Borealis/AGX compiler and runtime updates through #1712), and retire merged carries aurora-silicon/mesa#416 and aurora-silicon/mesa#1465.Tested:
aurora-silicon/mesa@aurora-wip85a66c8a6058passedasahiCI (47519290929) andaurora-agent-policy(47519290991); remaining open carry aurora-silicon/mesa#415 (84f326f945dnet diff of7bcef61a9f4d) cherry-picks cleanly onto85a66c8a6058with zero conflicts.Risk: two-way door · all Macs (
edgeintegration branch only;carry.toml+ upstream sync).Not yet: packaged
edge/aarch64build (mesa-aurora+mesa-aurora-fex-guest) and hardware smoke test.Details
intake:8a40c215dec9->85a66c8a6058(784 new upstream commits).include/drm-uapi/asahi_drm.h): strictly additive optional tail field (max_mesh_workgroups+pad) and optional kernel-reported feature bits (DRM_ASAHI_FEATURE_SCHEDULED_VERTEX_SCRATCHbit 51,DRM_ASAHI_FEATURE_SUBMIT_REFUSAL_UNTOUCHEDbit 48,DRM_ASAHI_FEATURE_IDLE_VM_RECLAIMbit 49,DRM_ASAHI_FEATURE_ORDERED_FRAGMENT_BARRIERSbit 44), all backward-compatible withaurora-7.3kernels.mad()FP32 FMA repair)carry.toml:7bcef61a9f4d) — T6034 G15C 4-cluster 10-slot contract