Commit Graph
109 Commits
Author SHA1 Message Date
Dean 2bfe0045d8 Merge pull request #5940 from zmeizy/claude/pknorm-f16-denormal-inputs
fix(shader): flush v_cvt_pknorm_*_f16 denormal inputs by FLOAT_MODE
2026-10-17 18:21:25 +13:00
Adrià c9cabcaf84 Merge pull request #6008 from zmeizy/claude/ldexp-f32-denormal-modes
fix(shader): translate v_ldexp_f32 in f32 denormal modes 1 and 2
2026-10-17 04:14:45 +02:00
Adrià fd9e577d98 Merge pull request #6007 from zmeizy/claude/cmp-f32-denormal-modes
fix(shader): translate f32 compares in f32 denormal modes 1 and 2
2026-10-17 03:10:56 +02:00
Adrià db7d9de5e4 Merge pull request #5405 from Pipodi/feat/spanned-wave64-compute
feat(recompiler): run single-wave wave64 compute programs at one lane per invocation on 32-lane hosts
2026-10-16 21:05:55 +02:00
Adrià 0936dc910a Merge pull request #5943 from zmeizy/claude/f16-conversion-float-mode
fix(shader): round and flush f16 conversion results by FLOAT_MODE in every denormal mode
2026-10-16 20:39:11 +02:00
Alex ColliniandClaude Opus 5.5 5fb23f78de docs(debt): record how spanned barriers are checked and the full-subgroup rule
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 14:12:58 +02:00
Alex ColliniandClaude Opus 5.5 adf516f6f1 docs(debt): record why a spanned wave's LDS lock loop ballots per host subgroup
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 13:43:36 +02:00
Alex ColliniandClaude Opus 5.5 4adfa5fc72 docs(debt): record the Yotei device loss with APS5_SPANNED_WAVE=1
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 13:43:36 +02:00
Adrià Franch d8c2b71d12 docs(debt): D16 SINT image stores measured on RDNA2 2026-10-16 13:18:43 +02:00
ps54allandClaude Opus 5.5 a18d6e9a6b feat(shader): store D16 data to SINT storage images
image_store with D16 data to a storage image of a SINT format threw
"stores 16-bit data to an image of a SINT format", both when the
descriptor is decoded and in the SPIR-V image emitter, and the runtime
image modes left out the SINT conversions for such images. God of War
Ragnarok (PPSA08330) stops on it in compute shader 0x1052a17900 right
after its MFSR setup.

Each 16-bit half is now converted like the D16 format buffer stores
(EmitD16StoreComponent): sign-extended, then saturated to the
component width as for 32-bit data. The buffer form was measured on
RDNA2 in #331; the image form is not measured (TechnicalDebt).

agc_driver_image_store_sint now stores D16 data with DMASK 0xf and 0x5
to all eight SINT formats and after an image_atomic_add on 32_SINT,
instead of expecting the refusal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 13:18:38 +02:00
Adrià 7758abac13 Merge pull request #5841 from simonbronk/feat/line-reads-through-2d-array
fix(shader): read explicit-LOD and level-zero 2D-array samples through 1D T#s as measured
2026-10-15 23:00:50 +02:00
Adrià 56f5a6eef7 Merge pull request #5757 from hypermoist/perf/vector-window-unindexed-slots
perf(recompiler): keep the vector window's unindexed slots out of the array
2026-10-15 15:58:23 +02:00
simonbronkandClaude Opus 5.5 63db31fdd1 fix(shader): read explicit-LOD and level-zero 2D-array samples through 1D T#s as measured
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 15:36:02 +02:00
Adrià 23dcb82499 Merge pull request #5648 from Amoenus/codex/buffer-resource-vcc-tuple
fix(shader): accept buffer resource tuples ending in VCC
2026-10-15 13:55:14 +02:00
Adrià 821c69e504 Merge pull request #5509 from billythemenace2/fix/shader-cube-tsharp-2d-access
fix(shader): read cube T#s through DIM 2D image_sample and image_load as face 0
2026-10-15 13:25:34 +02:00
hypermist a4639ad2fb Merge upstream main into perf/vector-window-unindexed-slots 2026-10-15 16:02:16 +13:00
hypermistandClaude Opus 5.5 16914b8fa5 docs(debt): describe the narrowed vector window and its measurement
The relative vector addressing entry still said every window register
lives in one function-scope array. It now describes the array of the
bounded slots, the per-slot variables, the OpSwitch fallback and
APS5_NO_WINDOW_NARROWING, with the RTX 3060 measurement.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uzy15wqYTt6iWyxYXEzUWo
2026-10-15 16:01:41 +13:00
Dean ab9a476840 Merge pull request #5583 from BlizzyInc/fix/sample-through-1d
fix(shader): read explicit-LOD 2D samples through 1D T#s as measured
2026-10-15 12:34:15 +13:00
Adrià 596a0d70aa Merge pull request #5472 from eljackjoestar-cmd/codex/rgba8-uint-force-degamma
fix(shader): decode forced degamma on biased RGBA8_UINT samples
2026-10-15 00:01:33 +02:00
Adrià 6870cc26ba Merge pull request #5492 from billythemenace2/fix/shader-lds-add-f32-denormals
fix(shader): flush ds_add_f32 denormals and NaNs as the hardware does
2026-10-14 23:53:34 +02:00
Adrià Franch 1df5ae9a33 docs(debt): cube faces read through DIM 2D blend neighbouring faces near the edges 2026-10-14 23:39:07 +02:00
billythemenace2andClaude Opus 5.5 3b96840e68 fix(shader): read cube T#s through DIM 2D image_sample and image_load as face 0
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-14 23:37:33 +02:00
mitul72 e52e140f5c fix(shader): read explicit-LOD 2D samples through 1D T#s as measured
A 2D image_sample_l through a 1D T# now takes the 1D runtime mode, as
image_sample_lz already does, instead of failing the runtime image
interface. Measured on RDNA2 (gfx1036) with tools/hw-oracle against the
same sample with DIM 1D: u inside, on and past the edges, v of 0, 0.5, 1,
-0.25 and 3, LOD -1 to 6 on a 5-level R32_FLOAT texture, point, linear and
linear-mip filtering, wrap, clamp and border addressing, and HEIGHT or
DEPTH 3. All 4725 rows matched: the 1D T# decides the addressing and v is
ignored.

The execution test samples a 5-level 1D T# with distinct mip contents at
LODs -1 to 6, fractional ones included, with u inside, on and past the
edges, under point filtering with wrap and clamp and linear filtering with
linear mips and wrap, clamp and border addressing. Every result must match
the same image_sample_l with DIM 1D bit for bit; point-filtered results
must also be the expected texel of the expected level, and linear-mip
results the blend of the two levels the LOD selects.
2026-10-15 10:33:22 +13:00
eljackjoestar-cmd 76eb60af61 fix(shader): decode forced degamma on biased RGBA8_UINT samples 2026-10-14 23:25:53 +02:00
Adrià f2aa48a8e2 Merge pull request #5402 from codingreapermaps/feat/agc-fractional-even-partitioning
fix(agc): accept fractional-even tessellation partitioning
2026-10-14 22:57:20 +02:00
Adrià 6a8ba98b50 Merge pull request #5176 from n-delic/feat/ds-ordered-count
feat(shader): add GDS ordered counts and ordered-append dispatches
2026-10-14 22:52:36 +02:00
Adrià 0a9a32646e Merge pull request #5461 from eljackjoestar-cmd/codex/single-level-volume-bias
fix(shader): sample single-level volumes through biased 2D accesses
2026-10-14 22:49:08 +02:00
billythemenace2andClaude Opus 5.5 731575c802 fix(shader): flush ds_add_f32 denormals and NaNs as the hardware does
ds_add_f32 and ds_add_rtn_f32 now follow the measured hardware: both
operands are flushed to a signed zero when bit 0 of the f32 denormal field
is clear and the result when bit 1 is clear, the sum is rounded to nearest
even, a NaN data operand is stored quieted, else a NaN old value is stored
quieted, and +inf + -inf stores 0xffc00000. Measured on gfx1010 and, in
#5492, on gfx1031.

The new MemoryInfo field is stored in the shader disk cache (field count
31, minimum record 79 bytes, FormatVersion 34). The parts that depend only
on the data operand are computed once, before the CAS loop.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-14 22:48:34 +02:00
Adrià 2077b5383a Merge pull request #5456 from billythemenace2/fix/shader-2d-compare-on-1d-tsharp
fix(shader): compare through 2D image_sample_c on 1D T#s
2026-10-14 22:48:28 +02:00
Adrià 4e210a1064 Merge pull request #5314 from XairRrR/fix/shader-front-face-all-bits
fix(shader): honour SPI_BARYC_CNTL.FRONT_FACE_ALL_BITS for the front-face input
2026-10-14 22:43:51 +02:00
Adrià FranchandClaude ade067251c docs(debt): move the single-level volume bias line off the end of the section
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-14 21:58:28 +02:00
eljackjoestar-cmd 89777fcaa1 fix(shader): sample single-level volumes through biased 2D accesses 2026-10-14 21:58:18 +02:00
billythemenace2andClaude Opus 5.5 0851c08b60 fix(shader): compare through 2D image_sample_c on 1D T#s
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-14 21:54:00 +02:00
Adrià 31d951edea Merge pull request #5375 from billythemenace2/fix/shader-3d-access-on-1d-tsharp
fix(shader): read 1D T#s through 3D image_sample and image_load accesses
2026-10-14 21:40:54 +02:00
XairRrR 8dbf06798c fix(shader): honour SPI_BARYC_CNTL.FRONT_FACE_ALL_BITS for the front-face input
The front-face VGPR was always +1.0 / -1.0, which is its form only while
FRONT_FACE_ALL_BITS is clear (current Mesa reads it with fgt 0 / fsign).
With the bit set, as Mesa 22.0 RADV programs it, a back face reads 0 and
a front face non-zero: ACO then tests it with v_cmp_lg_u32 0. Uncharted:
Legacy of Thieves Collection (PPSA05684) sets the bit and its two-sided
cloth shaders test v_cmp_lt_u32 0, so -1.0 (0xbf800000) made every back
face a front face: the insides of the menu skeleton's rags kept their
front normals and were lit white by the spot light behind them.

The pixel stage info now carries the bit (request version 26, cache and
draw keys), the decode reads SPI_BARYC_CNTL when FRONT_FACE is an active
input, and the translator turns the builtin into 0xffffffff / 0. The
exact front value is not measured (docs/dev/debt/shader.md).

AI-assisted: yes
2026-10-14 21:37:48 +02:00
Nahid DelicandClaude Opus 5.5 3a7e82a178 fix(shader): address ordered counts by offset0 alone
On ds_ordered_count M0 holds the ordered wave ID, not a GDS address as
for ds_append: radeonsi and ACO pass the wave ID as the intrinsic's
pointer and keep the counter address in offset0. Reading M0 as the base
and size skipped the add whenever M0[15:0] was 0, so every wave got the
same range. The test now runs the ordered pass with M0 = 0 and M0 = 7.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 21:23:52 +02:00
Nahid DelicandClaude Opus 5.5 46a1cc0fc3 feat(shader): add GDS ordered counts and ordered-append dispatches
ds_ordered_count adds the first active lane's value to a GDS counter and
returns the previous value, like ds_append adds the lane count. Waves are
not serialized in launch order: each still gets its own range. Ordered
swap and multi-dword counts stay refused. DISPATCH_DIRECT and
DISPATCH_INDIRECT accept ORDERED_APPEND_ENBL (bit 3) of the initiator.
Compute shaders of MXGP 26 (PPSA30839) use both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 21:23:52 +02:00
codingreapermapsandClaude Opus 5.5 f8e8aca5c1 fix(agc): accept fractional-even tessellation partitioning
VGT_TF_PARAM.PARTITIONING 3 now compiles to Vulkan's fractional-even
spacing, which radeonsi programs as PART_FRAC_EVEN. Its factors are
bounded at 64 like integer partitioning; Vulkan raises the remaining
ones to at least 2, the D3D11 range for this mode.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 21:16:21 +02:00
Dean 4c1de0c0ca Merge pull request #4706 from TripyFox/fix/3274-indirect-calls
feat(shader): link callees of calls whose target is loaded from a table
2026-10-15 08:15:26 +13:00
zmeizyandClaude Opus 5.5 f11382faf4 fix(shader): translate v_ldexp_f32 in f32 denormal modes 1 and 2
Mode 1 keeps subnormal inputs and flushes a result below 2^-126 to a
zero of its sign; mode 2 flushes subnormal inputs and rounds a subnormal
result in the f32 round mode, as measured on RDNA2 (gfx1030) in every
f32 round mode at IEEE=0 and IEEE=1. Both modes threw before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 21:39:55 +03:00
zmeizyandClaude Opus 5.5 659eddb107 fix(shader): translate f32 compares in f32 denormal modes 1 and 2
v_cmp_X_f32 and v_cmpx_X_f32 flush their denormal inputs by bit 0 of the
FLOAT_MODE f32 denormal field, as measured on RDNA2 (gfx1030): mode 1
keeps them and mode 2 flushes them. Both modes threw before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 21:39:54 +03:00
Dean 43ea7688cf Merge pull request #5511 from JJenkx/perf/spirv-bounded-redundancy
perf(shader): avoid redundancy traversal map copies
2026-10-15 07:38:13 +13:00
TripyFoxandClaude Opus 5.5 3c1f43948b fix(shader): fault only where a table call misses its linked callees
An s_swappc_b64 whose target is not resolved compiles to a faulting call
only at the fallback the table-call linker emits; the linker lists those
calls in the request (GuestContext::linkedCallFallbacks), and every other
computed call is refused at compile time again, as on main. The new
agc_driver_compute_table_calls test runs a linked two-record table on
Vulkan in wave32 and wave64, with SCC 0 and 1 reaching the callee, and a
record past the table reporting the UnlinkedCall fault.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-15 06:44:25 +13:00
TripyFoxandClaude Opus 5.5 9c8fb780e8 feat(shader): link callees of calls whose target is loaded from a table
An s_swappc_b64 whose target pair comes from an s_buffer_load of a buffer
whose descriptor is loaded from user data now calls the targets that buffer
holds: at dispatch the driver reads the buffer, links one copy of each
distinct callee after the caller and rewrites the call into a compare chain
that s_call_b64s the matching copy. A target that matches no copy, and any
other computed call, records an UnlinkedCall fault that the driver reports,
instead of failing the shader at compile time.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-15 06:44:07 +13:00
billythemenace2andClaude Opus 5.5 bd09862e55 fix(shader): read 1D T#s through 3D image_sample and image_load accesses
A 3D image access bound to a 1D T# matched no runtime image mode and threw
"image descriptor is incompatible with the static runtime image interface"
(SONIC SUPERSTARS, PPSA06888, which reads a 1x1 1D T# as 3D with a plain
image_sample and an image_load). Add a 1D mode for 3D accesses whose only
uses are image_sample_lz, plain image_sample or mip-less image_load.

Measured on RDNA1 (RX 5700 XT, gfx1010) with the hardware oracle:
image_sample_lz reads the texel u selects and ignores v and r with every
addressing mode; a plain image_sample takes its texel and LOD from u alone;
image_load reads the x texel for any y when z is 0 and returns zero for any
other z, as the 3D-on-2D load measured in #2023 does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QQNVXyqeecpyneonkYL6H1
2026-10-14 18:32:22 +01:00
Adrià Franch 3c17b3dbb2 docs(debt): update the relative patch index line for instanced draws 2026-10-14 19:08:18 +02:00
Claude 793224067f fix(shader): round and flush f16 conversion results by FLOAT_MODE in every denormal mode
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ha6Tsy62AFUyp9a5Mf7vjA
2026-10-14 16:25:23 +00:00
Claude 9399cc93aa fix(shader): flush v_cvt_pknorm_*_f16 denormal inputs by FLOAT_MODE
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ha6Tsy62AFUyp9a5Mf7vjA
2026-10-14 16:18:32 +00:00
Celegans12 34525fdf7a feat(agc): implement image tables loaded through 64-bit pointers
Plan runtime-indexed T# and S# columns read through a 64-bit pointer.
Preserve the console offset alignment, signed immediate and key bounds.
Track the descriptor dwords consumed by each table in its invocation.
Reject table reads when a writable buffer or storage image overlaps them.
Cover the overlapping-storage fault and isolated second-table behavior.
2026-10-14 16:43:57 +02:00
Celegans12 d9e47d1e98 feat(agc): implement image and sampler tables indexed at runtime offsets
Materialize runtime-indexed image and sampler records into descriptor
tables while keeping descriptor selection in the shader. Report invalid
active entries through the existing deferred fault buffer.

Bind fragment tables in the fragment set when pipeline libraries split it,
and reserve a physical descriptor for empty tables. Reject unsupported
sampler, border, cube and anisotropic pairings per entry. Keep one column
per heap access shape, one T# shared by several image operations included
(milescoviello's #5550 case), and narrow it to the union of its keys'
domains when every key has one (SleglJan's key-domain changes). Plan
columns read at (key << n) & mask over their whole domain (tibzejoker's
fix). Read records in runs through SleglJan's bulk reader, and reject
entries whose surface has no mapped byte, as Tamalero proposed. Store
table columns in disk plans; update the runtime ABI and disk format. Bound
table-sized entries in the resource cache (65,536 table elements) and the
dispatch cache (256 MiB of captured words), evicting LRU.
2026-10-14 16:43:57 +02:00