Commit Graph

1435 Commits

Author SHA1 Message Date
d2a564b66a Merge pull request #2865 from azsekazvamdimitar/feat/rtx3090-vram-perf-and-translator
d3d12/vulkan + rdna2spirv: staged VRAM arena, DMA readback batching, parallel shadows, stream-pool fix & wave64 perf (RT-ARENA-DEVICE-LOCAL-STAGED)
2026-12-01 18:17:55 +01:00
7ea14a36b2 Merge pull request #2438 from timbot103/shader-nvvm-mubuf-offset-fit
rdna2spirv: check high 32 bits for buffer offset fit to avoid NVVM crash (SHADER-NVVM-MUBUF-OFFSET-FIT)
2026-12-01 16:22:24 +01:00
0f557b12a4 Merge pull request #2360 from ShotTechOp/fix/bitcmp64-mixed-and-special-srcs
rdna2spirv: handle mixed mask pairs, wave32 VCC, and mask bit indices in s_bitcmp0/1_b32/b64 (SHADER-BITCMP64-MIXED-AND-SPECIAL-SRCS)
2026-12-01 16:21:09 +01:00
580634ac4b Merge pull request #2367 from budanga/fix/compute-worker-spawn-quota
rdna2spirv: start a tool again when a Windows job refuses it with ERROR_NOT_ENOUGH_QUOTA (COMPUTE-WORKER-SPAWN-QUOTA)
2026-12-01 16:20:22 +01:00
f3529eeb0c Merge pull request #2355 from ShotTechOp/fix/bitset-mask-and-dst
rdna2spirv, lane_masks: handle lane-mask destinations and sources in s_bitset0/1_b32 (SHADER-BITSET32-MASK-AND-DST)
2026-12-01 16:19:57 +01:00
cfbe765e61 Merge pull request #2099 from BubsMcgee/rt-image-get-lod-cube
rdna2spirv: translate image_get_lod on a cube (IMAGE-GET-LOD-CUBE)
2026-12-01 16:16:57 +01:00
9e5d907e36 Merge pull request #1415 from Tortoche/test-5237
OLD-5237: rdna2spirv: the PS FRONT_FACE VGPR holds 0xffffffff / 0 (SHADER-892)
2026-12-01 16:15:32 +01:00
57c57a2b97 Merge pull request #665 from LouisRiverstone/carry-old-9923
docs/design.md: one copy of each rule in the Global atomics row (OLD-9923)
2026-12-01 16:13:57 +01:00
67176dd526 Merge pull request #137 from ProjectLeonida/old-pr/9868
rdna2spirv: keep NaN-pattern constants out of float-typed selects in image_bvh (#6623)
2026-12-01 16:13:34 +01:00
1bfd5e7844 Merge pull request #95 from ProjectLeonida/old-pr/9827
rdna2spirv: guard image_bvh PhysicalStorageBuffer loads on active EXEC lanes
2026-12-01 16:13:23 +01:00
d1cd2cef65 Merge pull request #57 from ProjectLeonida/old-pr/9779
tools: --shard balances by file size, so the parallel stage waits for nobody (output byte-identical)
2026-12-01 16:13:11 +01:00
8ebe7cc2e8 d3d12/vulkan + make_game: ReBAR DMA readback, budgeted staged slabs, test fixes & CLI wiring 2026-12-01 16:40:36 +02:00
098f7ff761 rdna2spirv: guard v_readfirstlane in --mesh-native-wave32 and lower --spirv-opt SSA threshold to 512 KiB
- Exclude v_readfirstlane from --mesh-native-wave32 until per-use uniformity
  analysis proves the source wave-uniform (with ms_native_readfirstlane.asm
  and test_mesh_native_wave32.py regression test + docs/design.md update).
- Lower SPIRV_OPT_LARGE_BYTES from 750 KiB to 512 KiB so library/lib_cs_03245
  and siblings use the safe SSA pass set instead of --scalar-replacement=0
  (avoiding NVIDIA 590.48.01 compiler SIGSEGV during warmup).

AI-assisted.
2026-12-01 16:38:32 +02:00
4e483f7ce0 rdna2spirv: TO_DATA merges, --compute-serial-waves, --mesh-native-wave32, --spirv-opt
On top of PR #2566 (8db8335d2), combines verified translator performance and
correctness improvements for NVIDIA Wave32 GPUs (tested on RTX 3090 24 GB,
driver 590.48.01):

- Cherry-pick PR #2501 lane_masks.insert_data_merges (TO_DATA) fixing
  lib_cs_03010 bit-scanning loops (91-370 ms/call -> < 2.5 ms/frame).
- Add --compute-serial-waves for >64-thread barrier/LDS/atomic-free compute
  shaders (lib_cs_00977 + lib_cs_00986: 160 ms/frame -> < 2.4 ms/frame) while
  preserving unmodified PR #2566 d88b2deea VulkanMemoryModel coherency.
- Add --mesh-native-wave32 for strictly partition-invariant mesh shaders
  (9,116 / 9,282 dxbc MS shaders), running all threads natively in 1 Wave32
  pass with zero %x_buf LDS/barriers (-13% to -35% on hot mesh shaders).
- Add --spirv-opt (-O below 750 KiB, safe SSA pass set at >= 750 KiB to avoid
  NVIDIA 590.48.01 --scalar-replacement=0 compiler segfaults, with automatic
  fallback + spirv-val check).

AI-assisted. Verified with semantic tests and retail boots on RTX 3090 (590.48.01).
2026-12-01 16:37:33 +02:00
3e7b34a52a Merge pull request #2799 from aznohonza/docs/quad-any-partial
rdna2spirv: quad_any's docstring says partial quads are exact (DOC-QUAD-ANY-PARTIAL)
2026-12-01 14:51:25 +01:00
3fbc120df4 Merge pull request #1397 from whoalin1/mask-regs-data-read
rdna2spirv: a VALU data read of a lane-mask operand yields the wave's mask word
2026-12-01 12:53:35 +01:00
a726736ec2 Merge pull request #1774 from Tauwni/fix/explicit-lod-bias-moltenvk
rdna2spirv: --explicit-lod-bias applies the S# LOD bias where MoltenVK drops the sampler's; ps_ssharp passes on Macs (SHADER-EXPLICIT-LOD-BIAS-MVK)
2026-12-01 12:45:24 +01:00
d696c86509 rdna2spirv: fix quad_any's other stale partial-quad wording 2026-12-01 08:04:17 +01:00
88139a27ef rdna2spirv: extend the BitFieldUExtract workaround to cvt_i16/snorm and d16 saturate
The review of 97535ad found three more OpBitwiseAnd & 0xFFFF sites whose
operand is an %int-derived bitcast feeding a preserve-high-half merge,
the same shape NVIDIA's shader compiler miscompiles:

- v_cvt_i16_f16: OpConvertFToS %int -> Bitcast -> And, then write_lo16
  or the op_sel merge (the u16 sibling is %uint and safe)
- v_cvt_norm_i16_f16: the snorm path has the same structure (unorm safe)
- saturate_int16 signed path: SClamp %int -> Bitcast -> And reaches the
  preserve merges through the d16 image/buffer stores

All emit OpBitFieldUExtract %uint x, 0, 16 instead, spec-identical.
Audited every remaining And & 0xFFFF site: the rest are %uint-derived,
operand-side, packed-Or consumers, or constant masks.

RTX 4070 SUPER spot-checks of v_cvt_i16_f16/v_cvt_norm_i16_f16 (VOP2
form; llvm-mc rejects op_sel on these) produce the right words on both
the old and new modules, so the bug does not reproduce on this shape;
the extract removes the risky pattern regardless. Full semantic suite:
487 files, 6279 tests, 0 failures.

Co-Authored-By: Devin <noreply@cognition.ai>
2026-11-30 22:29:44 +00:00
944d4bd8cf rdna2spirv: emit OpBitFieldUExtract for the VOP3 16-bit result mask (NVIDIA And-&-0xFFFF miscompile)
NVIDIA's shader compiler (RTX 4070 SUPER, wave32) corrupts the preserved
high half of a 16-bit VOP3 result when OpBitwiseAnd & 0xFFFF consumes a
value that passed through %int ops and the result merges with
(old & 0xFFFF0000): v_add_nc_i16 v14, v3, v12 op_sel:[1,1,0] clamp wrote
0x1113AAA8 for 0x0002AAA8. BitFieldUExtract reads the same low 16 bits
and dodges the peephole; SClamp on %int and select-based clamps do not.
AMD (gfx1036, Vulkan and hw_oracle) and the CPU interpreter are
unaffected.

Co-Authored-By: Devin <noreply@cognition.ai>
2026-11-30 22:29:43 +00:00
da87c72c64 rdna2spirv: preserve gather dispatch and parked wave32 lanes after merge
Restore both depth-compare gather opcodes. Pass the current wave mode when a writelane mask operand checks an already parked lane, matching the slot analysis and the read/write paths.

Refs #1397. AI-assisted with OpenAI Codex (GPT-6.2 Sol).
2026-11-30 22:23:09 +00:00
570b441d70 translator: lane-mask data reads gather the wave word under narrowed EXEC
A lane mask in an SGPR, EXEC or VCC is one wave-wide word on hardware.
The EXEC-coverage gate added earlier in this pull request could not prove
the independent-SGPR restore idioms crosslane_fuzz uses, so it fell back
to this lane's 0 / ~0 bit for exactly the programs the read is meant to
fix. It also encoded the wrong control-flow model: EXEC narrowing is a
per-lane value here, not a SPIR-V edge. Mask-data readers are already
kept out of lane-local `if (active)` runs, and the eager wave-mask store
keeps lowering from moving the subgroup gather into an EXEC-selected
arm, so lanes EXEC has off still contribute their mask bits.

Remove the gate and the CFG EXEC provenance analysis it needed, gather
the mask word for every lane-mask data read, and cover narrowed SGPR and
VCC reads, an independent all-ones SGPR EXEC restore, and the composed
vector-bitwise mask words. The vector-bitwise expectations now check the
uniform mask words and the resulting per-lane cndmask bits and popcounts
rather than the old fallback artifact.

Co-Authored-By: SWE-2.1 Max <noreply@google.com>
2026-11-30 22:23:09 +00:00
b3cc377020 translator: s_mov copies of EXEC keep the narrowing's tag through SGPR round-trips
Review follow-up on the mask-word gather gate (#1397): `s_mov_b32 s4,
exec_lo` under an unknown EXEC narrowing recorded nothing for s4, so the
later `s_mov_b32 exec_lo, s4` restore minted a fresh ("n", id) tag in
_exec_src_ex. mask_exec_sigs coverage then failed and the read kept this
lane's 0 / ~0 bit, while the equivalent literal `s_mov_b32 exec_lo, -1`
resolved to a constant half-state and gathered — register and literal
restores of the same runtime value disagreed.

_mov_sgpr_vals now returns an ("al", halves) alias for an EXEC source
whose half-state is an unknown narrowing, the same scheme saveexec uses:
exec_lo gives (state, None), exec_hi (None, state), exec gives each half
in its own register for b64 moves. _exec_src_ex already resolves those
aliases, so the restore reproduces the original tag and the gather stays
exact; untracked SGPR sources still mint a fresh narrowing and stay
conservative.

Tests: two semantic cases (wave32 and wave64) assert the register
round-trip gathers OpGroupNonUniformBitwiseOr identically to the literal
-1 restore; cs_exec_copy.asm (+ fixture, check.py/run_gpu_tests.py dump
entries) stores the mask word, exec_lo's own word and the literal-restore
word side by side on real hardware — PASS on RTX 4070 and Radeon
(64-wide), wave64 exec filters 9/9 on AMD.

Co-Authored-By: Devin <noreply@cognition.ai>
2026-11-30 22:22:44 +00:00
1725e0818a translator: gate mask-word gathers on EXEC coverage; scalar mask number reads
Review fixes for the mask-as-data change:

- The wave-mask gather is a group op over the lanes EXEC leaves active,
  and drivers differ on whether lanes EXEC has off still vote: NVIDIA,
  AMD and KosmicKrisp return the whole subgroup's bits, MoltenVK's
  ballot/reduce saw only the lanes a narrowed EXEC left on and produced
  the EXEC value instead of the frozen mask word (cs_mask_vgpr_exec).
  mask_word_read_ok now gathers only when a CFG must-analysis
  (mark_exec_state) proves every lane that can hold a set bit of the
  mask is EXEC-active at the read: each EXEC half is tracked as clean,
  a constant mask, or an unknown narrowing (s_mov/s_cselect resolve
  constants, saved-EXEC aliases and unchanged EXEC, so the common
  restore idioms still gather), and mask_exec_sigs records every EXEC
  state seen while each mask register held a mask. Unproven reads keep
  this lane's 0 / ~0 bit, the pre-change answer.
- Scalar number ops read a lane mask operand as data too
  (MASK_NUMBER_READERS, #1043's NUMBER_READERS): s_add_u32 s20, s10, K
  after v_cmp wrote s10 yields the wave's mask word, while mask moves
  and mask logic ops keep this lane's bit for the saveexec idioms.
- wave64_emulate_opt treats ins["mask_words"] (a mask read that will
  gather) as a cross-lane exchange for the lane-local fold planner and
  barrier scheduler, covering the scalar readers as well.
- test_slot67_operand_forms' expectedFailure comes off: the packed
  vcc_hi word now reaches the data read.

Co-Authored-By: Devin <noreply@cognition.ai>
2026-11-30 22:22:13 +00:00
51b0b9d340 translator: a VALU data read of a lane-mask operand yields the wave's mask word
A lane mask (EXEC/VCC or a mask-tracked SGPR) that a VALU op reads as a
32-bit value — v_mov_b32 of it into a plain VGPR, or any VALU source
where the mask is data rather than a mask operand — materialized each
lane's own 0 / ~0 bit. Hardware holds the whole wave's mask word there
(tools/crosslane_fuzz.py's op_maskdata model: the uniform word written
to the active lanes), so every lane gets the word, the same in each.

- src_u materializes the wave mask word (lane_mask_word) for SGPR and
  EXEC/VCC operands when the instruction's VGPR destination makes the
  read a data read (mask_read_is_data); SGPR/EXEC/VCC destinations keep
  this lane's bit, which mask_src readers rely on. Mask-holding VGPRs
  already store the word, so their reads are plain loads.
- mask_src extracts this lane's bit back out of a mask-holding VGPR
  (_vgpr_mask_lane_bit), half-aware in wave64 via mask_half.
- mask_data_src keeps instructions that materialize the word out of
  EXEC-gated active runs (a subgroup op can't sit inside if (active)).
- v_readfirstlane_b32 of a mask VGPR broadcasts the first active lane's
  copy — the only lane guaranteed fresh after an EXEC-gated v_mov_b32 —
  as the word itself into a VGPR destination (VGPR writes are never
  mask-tracked), or this lane's bit for a mask-tracked SGPR/special
  one; fixes cs_wavemask lanes 48-63.

Found by tools/crosslane_fuzz.py (#293). docs/design.md's whole-wave
mask contract updated.

Co-Authored-By: Devin <noreply@cognition.ai>
2026-11-30 22:21:36 +00:00
4ab693c814 rdna2spirv: quad_any's docstring says partial quads are exact
The comment still claimed an absent invocation in a partial non-fragment
quad gave an undefined value natively, while the non-fragment branch
reads every lane's activity with OpGroupNonUniformBallot. Wording only.

DOC-QUAD-ANY-PARTIAL.
2026-11-30 22:25:18 +01:00
d99ba5c095 Merge main: drop the macos job as main does, keep this PR's runtime.yml path filters
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 20:24:47 +01:00
bd466f8839 Merge pull request #2730 from OreoFR/carry/pr-2362
reprend #2362: rdna2spirv: forward DPP src0 neg/abs to op readers instead of eager 32-bit modify (SHADER-DPP-F16-AND-SIGN-MODS)
2026-11-30 17:24:41 +01:00
1c78b8219e Merge pull request #2728 from OreoFR/carry/pr-65
reprend #65: rdna2spirv: translate FLAT loads and stores as global accesses
2026-11-30 17:24:22 +01:00
35e75b7a9d Merge pull request #2731 from OreoFR/carry/pr-2174
reprend #2174: rdna2spirv: seed the POPS collision word so the wait loop ends (SHADER-POPS-COLLISION-SEED)
2026-11-30 17:24:02 +01:00
c663c2a85e Merge pull request #2724 from OreoFR/carry/pr-282
reprend #282: fix(rdna2spirv): order image_sample, image_gather4, image_bvh and ignore ds_nop in --wave64-emulate
2026-11-30 17:02:20 +01:00
f474c74b04 Merge origin/main (f9f3ec4c6) into the carry of #2174
Current main after #2566. New conflict on top of the earlier carry merge:
tools/rdna2spirv.py, _translate (straight-line and CFG paths): main passes
extra=meta_extra to _shader_meta.collect and reads the literal samplers
after it; the PR's g.note_pops_word(insns) runs right after that block,
before fit_shared_memory / needs_barrier_rounds as before.

Co-authored-by: QemmHD <290605352+QemmHD@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 14:30:43 +01:00
de2acaf955 Merge origin/main (f9f3ec4c6) into the carry of #2362
Current main after #2566. New conflict on top of the earlier carry merge:
docs/design.md, DPP row: main rewrote the absent-lane part of the row
(present-lane ballot for FI=1); main's text is kept and the PR's sentence on
Gen.dpp_insn forwarding neg/abs is inserted at the same place as before,
after the HW-DPP-NEG-INVALID-LANE sentence.

Co-authored-by: ShotTechOp <95485630+ShotTechOp@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 14:30:06 +01:00
5b34dc36fd Merge origin/main (f9f3ec4c6) into the carry of #65
Current main after #2566; no new conflicts on top of the earlier carry merge.

Co-authored-by: tiagonogueiraa-bit <360313680+tiagonogueiraa-bit@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 14:28:57 +01:00
af0e265607 Merge origin/main (f9f3ec4c6) into the carry of #282
Current main after #2566; no new conflicts on top of the earlier carry merge.

Co-authored-by: totonii <totonicontato@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 14:19:23 +01:00
e7d32a034a Merge origin/main (f9f3ec4c6) into the carry of #1994
Current main after #2566; no new conflicts on top of the earlier carry merge.

Co-authored-by: ShotTechOp <anurag7870977875@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 14:19:22 +01:00
ab09fd1f86 Merge main: keep --no-ftz32 and --integer-dot-fallback next to --explicit-lod-bias
tools/rdna2spirv.py: main's float-only typed implicit sample (OpImageSampleImplicitLod)
is used only without --explicit-lod-bias; with the flag the Grad path still
scales the derivatives by the S# bias.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 11:46:44 +01:00
b8508a974b Merge branch 'main' of https://github.com/ProjectLeonida/mandy into fix/rendering-correctness
# Conflicts:
#	tests/semantic/test_interp_computed_ij_fallback.py
2026-11-30 04:36:05 -05:00
f0703cdef4 rdna2spirv: check high 32 bits for buffer offset fit to avoid NVVM crash
In Gen.buffer_address (tools/rdna2spirv.py), emit
`OpShiftRightLogical %ulong wide %c64_32` followed by
`OpIEqual %bool hi_w %cl0` instead of
`OpULessThanEqual %bool wide %clffffffff`.

NVIDIA 580.82.07 NVVM aborts pipeline creation (`NVVM compilation failed: 3`,
VkResult -13) on the unsigned 64-bit compare when a literal V# folds `wide`
to `0 + idx * stride` (reported and A/B-tested on L4 by @kevincommits in
ubiquitarianism/leonida#1608#issuecomment-7208330785). Over uint64,
`(wide >> 32) == 0` is mathematically identical to `wide <= 0xFFFFFFFF`.

Since lower_addr64 (SHADER-423), the 64-bit compare still reaches the driver
with --int64-addresses, and by default in any module the lowering leaves in
its Int64 form (a 64-bit scalar op such as s_lshl_b64 elsewhere in the
shader). Where the lowering does apply, the new form lowers to a high-word
`== 0` test, without the pair compare's redundant low-word
`<= 0xFFFFFFFF` term.

tests/semantic/test_buffer_offset_wrap.py runs every access (including the
exact 32-bit boundary cases: `0xFFFFFFFC` dword, `0xFFFFFFFF` byte vs
`0x1_0000_0000`) three ways: lowered (default), --int64-addresses, and
default with Int64 kept. It checks that no compare with the 32-bit limit is
emitted in any of them (raw and after spirv_opt.optimize), that the Int64
forms test `(wide >> 32) == 0`, and that the modules pass spirv-val when it
is on PATH.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 09:09:38 +10:00
cf0557ffc3 Merge pull request #909 from markankamaransheogarat-sys/ubiq/spirv-tool-tree-cleanup
SPIRV-TOOL-TREE-CLEANUP: rdna2spirv, make_game: terminate spirv-as/val children on abort and sweep stale .spirv-*.tmp
2026-11-29 20:01:11 +01:00
eff40832ef Merge remote-tracking branch 'refs/remotes/mandy/main' into fix/rendering-correctness
# Conflicts:
#	runtime/shims/d3d12_com.cpp
#	runtime/shims/d3d12_vulkan_device.cpp
#	runtime/src/command_list.h
#	runtime/src/vulkan_replay.h
#	runtime/test/gfx10_descriptors_test.cpp
2026-11-29 11:51:06 -05:00
59ce2c87b0 Merge origin/main into carry/pr-65
tools/rdna2spirv.py: main's d16 "destination is also read" check (now
DST_ALSO_READ, plus buffer_load_format_d16_hi_x) gains the PR's flat_load_
prefix. docs/design.md: main's 8/16-bit global row is kept and the PR's
"Flat memory" row follows it.

Co-authored-by: tiagonogueiraa-bit <360313680+tiagonogueiraa-bit@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 17:23:56 +01:00
51445af783 Merge origin/main into carry/pr-282
Conflict in the x_memory_order docstring (tools/rdna2spirv.py): main already
ignores ds_nop (80417b9c4), so the PR's part still new is ordering
image_sample, image_gather4 and image_bvh; its docstring is kept. The PR's
parity test probe gains x_one_lane, which main's Gen.x_memory_order reads.

Co-authored-by: totonii <totonicontato@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 17:14:37 +01:00
fd5ad13bd9 Merge pull request #2154 from whoalin1/shader-stage-cache-crossroot
rdna2spirv: cache shader stages per carve root
2026-11-29 16:44:05 +01:00
ce792f55fb Preserve all 32 bits in dynamic R32_UINT loads 2026-11-29 09:38:14 -05:00
a58d22fe2e Merge upstream ProjectLeonida/mandy main (ddfe24fba) into fix/rendering-correctness 2026-11-29 09:37:37 -05:00
cd5ee11079 rdna2spirv(r9b): unconditional CS/MS LDS bounds, PS EarlyFragmentTests, mesh epilogue & PS quad swizzle
Round 9b translator fixes for rendering correctness and Mandy d3d12/ parity:

1. Unconditional CS & MS LDS OOB bounds (Mandy 21633b328 parity):
   - Record g.lds_declared from PSV0.shared for MS and RSRC2.LDS_SIZE for CS.
   - Whenever g.lds_declared > 0 (opt-out --no-lds-bounds), set
     g.lds_dwords = g.lds_bound = min(g.lds_declared, 16384) so every LDS
     read, write, sub-dword, wide, and atomic op goes through lds_access()
     (OOB reads return 0, OOB writes/atomics dropped instead of wrapping).

2. PS DB_SHADER_CONTROL bit 12 EarlyFragmentTests (Mandy f33940415/bf479a3cd):
   - Add fssm_header.db_shader_control() reading u32 at E + 0x138 (0x24C for
     rec = 0xB0; 3,023/12,101 corpus PS have bit 12 DEPTH_BEFORE_SHADER set).
   - Emit OpExecutionMode %main EarlyFragmentTests (opt-out --no-early-depth)
     and record early_depth in shader_meta when bit 12 is set and the PS does
     not export depth/stencil (no exp mrtz, DB_SHADER_CONTROL & 0x7 == 0, no
     OSG1 SV_Depth*/SV_StencilRef).

3. Defensive mesh epilogue & PS helper-lane quad swizzle:
   - MeshEXT and --mesh-compute epilogues explicitly write CullPrimitiveEXT =
     true (1) and (0, 0, 0) when %mli < %msp and !%ms_has_prim.
   - Lower quad-local ds_swizzle_b32 in PS via OpGroupNonUniformQuadBroadcast /
     OpGroupNonUniformQuadSwap (GroupNonUniformQuad capability) so Vulkan 2x2
     helper invocations participate on AMD RADV while EXEC-masked lanes still
     read 0.

Verified: compileall, check_no_game_data.py, 6,674/6,674 semantic tests (0
failures), 200/200 corpus slice (200/200 spirv-val), plus targeted LDS MS
(5/5), LDS CS (60/60), early-depth PS (120/120), and PS quad-swizzle (50/50)
corpus slices (100% spirv-val). AI-assisted.
2026-11-29 09:25:40 -05:00
57050af6c3 Merge origin/main into carry/pr-2362
dpp_insn: main's v_cvt_f32_f16 pass-through kept; every other op gets neg/abs forwarded on args[first] (main's index) instead of the eager 32-bit modify, as the PR does. design.md DPP row: PR sentence on main's text.

Co-authored-by: ShotTechOp <95485630+ShotTechOp@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 13:51:29 +01:00
173c5d41a6 Merge origin/main into carry/pr-2174
vk_harness: main's has_cap scan of both stages, plus needs_interlock = has_cap(fs_code, 5378) from the PR.

Co-authored-by: QemmHD <290605352+QemmHD@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 13:51:23 +01:00
b10cae3b99 rendering(r5c): guard V# s_buffer_load and buffer_* ops on SQ_RSRC_BUF.TYPE == 0
GFX10.3 V# buffer descriptors require w[3][31:30] == 0 (SQ_RSRC_BUF.TYPE == 0); descriptors with w[3][31:30] != 0 are image T#s or non-buffer resources. Previously Gen.scalar_load and Gen.buffer_address ignored w[3][31:30], so an async-compute s_buffer_load reading a console-heap slot overwritten with a T# computed a huge limit and dereferenced an unmapped VA (SQC data GPUVM fault at t ~184-203 s).

Gate Gen.scalar_load (sbuf == True) and Gen.buffer_address on uint32(w[3]) < 0x40000000 (skipping the runtime check when w[3] is a known literal < 0x40000000 and forcing OOB when >= 0x40000000), document the rule in docs/design.md, and add 7 semantic + CPU ReadLog regression tests.
2026-11-29 06:34:53 -05:00