Commit Graph
361 Commits
Author SHA1 Message Date
Dean 701616674a Merge pull request #10708 from Michael-KD/test/sdwa-cvt-f32-ubyte-measured
test(shader): pin SDWA v_cvt_f32_ubyte source selects measured on RDNA2
2026-10-26 11:10:38 +13:00
Adrià e317f41d59 Merge pull request #10440 from SuarezPM/ai/atomic64-keyed-tables
feat(shader): support 64-bit image atomics through keyed image tables
2026-10-25 11:58:35 +01:00
Dean b91a6a60c5 Merge pull request #10595 from TechLevelZero/fix/f32-conversion-denormal-modes
fix(shader): translate f32 conversions in f32 denormal modes 1 and 2
2026-10-25 23:54:07 +13:00
Dean 10a41a0d50 Merge pull request #10612 from imellag/test/agc-skip-cull-distance-without-support
test(agc): skip cull distance cases on devices without shaderCullDistance
2026-10-25 21:52:25 +13:00
Adrià c8d34aa8f4 Merge pull request #6009 from zmeizy/claude/minmax-f32-denormal-modes
fix(shader): translate f32 min and max in f32 denormal modes 1 and 2
2026-10-24 22:13:03 +02:00
Michael Krumland-DunningandClaude Opus 5.5 952cc18efa test(shader): pin SDWA v_cvt_f32_ubyte source selects measured on RDNA2
v_cvt_f32_ubyte0 to v_cvt_f32_ubyte3 take byte N of source 0 after
SRC0_SEL and SRC0_SEXT select and extend it, as measured with the
hardware oracle on RDNA2 (gfx1036) for all seven source selects with
and without SRC0_SEXT. The test checked four combinations derived from
the ISA guide; it now checks every combination against the measured
results, and the debt entry keeps only what is not measured: gfx1013.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 11:26:19 -07:00
Adrià d0e7fe7beb Merge pull request #5941 from zmeizy/claude/mullit-f32-denormal-modes
fix(shader): translate v_mullit_f32 in f32 denormal modes 1 and 2
2026-10-24 19:36:11 +02:00
Adrià e7e99adcc4 Merge pull request #6010 from zmeizy/claude/add-mul-f32-denormal-modes
fix(shader): translate f32 add and multiply in f32 denormal modes 1 a…
2026-10-24 18:20:07 +02:00
TechLevelZeroandClaude Opus 5.5 753767f86a fix(shader): translate f32 conversions in f32 denormal modes 1 and 2
The f32 conversions that only flush their inputs follow bit 0 of the
FLOAT_MODE f32 denormal field, as the f32 compares do: mode 1 keeps
denormal inputs like mode 3 and mode 2 flushes them like mode 0.
v_cvt_pk_u8_f32 also follows a round mode set at run time.

Measured on RDNA2 (gfx1036) with the hardware oracle.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 16:23:33 +01:00
Adrià 522e32e3b6 Merge pull request #7550 from gjonn/fix/shader-resinfo-any-descriptor-dimension
fix(shader): answer image_get_resinfo on any T# dimension
2026-10-24 15:30:15 +02:00
Adrià 18e85391b4 Merge pull request #9746 from imellag/fix/shader-empty-loop-continue
fix(shader): route a loop's back edge through an empty continue block when its latch holds instructions
2026-10-24 14:53:54 +02:00
Emanuele 0a8503d73d docs(shader): end the clip and cull distance debt sentence before the cull distance note 2026-10-24 14:53:25 +02:00
Emanuele 2d35e00af2 test(agc): skip cull distance cases on devices without shaderCullDistance
The driver refuses a draw that enables a cull distance when the device
has no shaderCullDistance, and agc_driver_vertex_clip_cull_distances,
agc_driver_vertex_clip_cull_draw (with and without the draw key) and
agc_driver_vertex_user_data_tail ran their cull distance cases anyway,
so on MoltenVK all four failed at that refusal. They now skip only
those cases when the target lacks CapabilityCullDistance, as they
already skip the mesh case without VK_EXT_mesh_shader, and the shader
debt entry records the refusal.
2026-10-24 14:43:12 +02:00
Tripchipp f346a79f76 docs(debt): keep the TYPE=0 entry clear of the unnormalized S# line 2026-10-24 11:25:41 +02:00
Tripchipp a5c8c3249d docs(debt): link the TYPE=0 null image entry to the recompiler 2026-10-24 11:25:41 +02:00
Adrià 2af46e4bcf Merge pull request #8450 from thuanquang/docs/debt-converted-unorm-image-loads
docs(shader): remove the stale converted unorm image loads entry
2026-10-24 11:24:57 +02:00
Adrià feffbca83e Merge pull request #8425 from thuanquang/docs/debt-packed-ancillary-whole-word
docs(shader): say that the whole packed ancillary word carries the layer field too
2026-10-24 11:24:32 +02:00
Adrià 11d08593b6 Merge pull request #8410 from thuanquang/docs/debt-f32-compare-denormal-modes
docs(shader): say that the f32 compares do not throw in f32 denormal modes 1 and 2
2026-10-24 11:21:31 +02:00
Adrià 4007c64f1e Merge pull request #8406 from thuanquang/docs/debt-interp-f16-lavapipe
docs(shader): drop the stale lavapipe skip from the 16-bit interpolation entry
2026-10-24 11:19:46 +02:00
Adrià 51e17a78bc Merge pull request #8403 from thuanquang/docs/debt-unnormalized-sampler-uses
docs(shader): list the samples unnormalized S#s are accepted for
2026-10-24 11:19:24 +02:00
Adrià 2b2055fa4f Merge pull request #8281 from thuanquang/docs/f64-denormal-debt
docs(debt): correct stale f64 denormal and RSRC1 float mode statements
2026-10-24 11:06:19 +02:00
Adrià a228fd9548 Merge pull request #8276 from thuanquang/docs/volume-array-sample-debt
docs(shader): state the gap first for 2D-array samples through a 3D T#
2026-10-24 11:06:00 +02:00
Dean 34c97ca9d9 Merge pull request #9046 from mehmetbayoglu/fix/recompiler-cache-line-endings
fix(recompiler): hash shader cache sources with normalized line endings
2026-10-24 20:22:23 +13:00
thuanquangandClaude 46a13989b9 docs(shader): remove the stale converted unorm image loads entry
Co-Authored-By: Claude <[email protected]>
2026-10-24 13:03:22 +07:00
Adrià a5a2c946a3 Merge pull request #10396 from CrimsonMac/fix/lds-misaligned-atomic64-fault
fix(shader): fault on misaligned 64-bit LDS atomics under the workgroup lock
2026-10-24 07:33:30 +02:00
memob 776040e96d Merge remote-tracking branch 'origin/main' into fix/recompiler-cache-line-endings
# Conflicts:
#	core/shader/recompiler/ShaderCacheVersion.cmake
2026-10-24 00:02:21 -04:00
Adrià FranchandClaude Opus 5.5 7b4b9d9814 fix(shader): zero the resinfo layer count for DIMs without layers
image_get_resinfo returns 0 in its third component when the instruction's
DIM has no layers (1D, 2D, 2D MSAA) and the T# is not 3D, as measured on
RDNA 2 in #7550. Keep 1D-array T#s on their first layer and MSAA T#s
refused, and record the unmeasured forms in the shader debt file.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 04:21:06 +02:00
thuanquangandClaude 71f70d803f docs(shader): count bits 16-28 among the ancillary word bits that have a source
Co-Authored-By: Claude <[email protected]>
2026-10-24 08:27:20 +07:00
Dean f45a8d2bdc Merge pull request #9274 from zmeizy/claude/f32-hardware-flush-float-mode
fix(shader): take the hardware f32 flush only in shaders that flush f32 denormals
2026-10-24 14:20:09 +13:00
Adrià 11d6efa06c Merge pull request #9305 from tibzejoker/fix/bit-exact-reciprocal
feat(shader): bit-exact RDNA v_rcp_f32 behind APS5_EXACT_RCP
2026-10-24 02:47:43 +02:00
SuarezPM 9c3ffcf5b0 feat(shader): support 64-bit image atomics through keyed image tables
Table T#s keyed at runtime feeding image_atomic64_* now lower to
OpAtomic* on the table Atomic64View instead of faulting, mirroring
the 32-bit path: gate, dedup identity, binding flags and view
selection. Packed formats and BY element counts still fault; hosts
need VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT for the view format.
2026-10-23 21:14:39 -03:00
Dean 2fcc60cf37 Merge pull request #5426 from Prophet069/codex/review-scratch-offsets-20261013
fix(shader): decode GFX10 scratch offsets as one dword
2026-10-24 11:57:41 +13:00
Adrià e7f46f5c89 Merge pull request #8489 from wachi35676/fix/shader-amd-lds-fence-scope
fix(shader): widen LDS atomic fences to device scope on AMD's proprietary driver
2026-10-24 00:02:07 +02:00
Adrià 495b7c10ab Merge pull request #8792 from SuarezPM/ai/image-atomics-keyed-tables
feat(shader): support 32-bit image atomics through keyed image tables
2026-10-24 00:00:03 +02:00
Adrià dcd7e3a61e Merge pull request #8564 from JAB-dev/feat/agc-4-4-4-4-partial-writes
feat(agc): merge partial writes into 4_4_4_4 UNORM color targets
2026-10-23 23:23:11 +02:00
Adrià a0e858ff7b Merge pull request #8881 from thuanquang/fix/writelane-spill-window
fix(shader): keep a v_writelane lane known across computed-index window stores
2026-10-23 23:17:12 +02:00
Crimson cd329c060a fix(shader): fault on misaligned 64-bit LDS atomics under the workgroup lock 2026-10-23 23:59:53 +03:00
Adrià FranchandClaude Sonnet 5.5 86d9e49f2e docs(shader): note APS5_EXACT_RCP reaches v_rcp_f16 and position W
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-23 22:50:13 +02:00
thibautandClaude Opus 5.5 3654f15bfa feat(shader): bit-exact RDNA v_rcp_f32 behind APS5_EXACT_RCP
v_rcp_f32 and v_rcp_iflag_f32 lower to the driver's 1/x, whose low bits
differ from the console's on NVIDIA and Intel. With APS5_EXACT_RCP set,
normal inputs with normal results take the RDNA reciprocal datapath
instead: a cubic over 32 segments of the mantissa in 32-bit integer
arithmetic, the linear term rounded to nearest even, and a 2,761-entry
table of one-ULP corrections, looked up only when the dropped bits fall
next to the rounding cut (6.25 % of inputs). This reproduces all 2^23
mantissas of an RDNA2 (gfx1031) sweep. Other inputs keep 1/x.

It is off by default: the tables add about 13k SPIR-V words to each
shader that uses it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017EjjFU1FjMR11oWDYs8UMo
2026-10-23 22:50:09 +02:00
Adrià 11e8ad2934 Merge pull request #8713 from SeifKaroui/fix/shader-unused-phi-cycles
fix(shader): remove unused phi cycles before resource planning
2026-10-23 22:46:22 +02:00
SuarezPM 548267bfa3 feat(shader): support 32-bit image atomics through keyed image tables
Table T#s keyed at runtime no longer fault on image_atomic_*32: the
table operation stays supported, elements carry the atomic flag through
dedup into the descriptor binding, and the table path binds AtomicView
like the direct path. 64-bit atomics stay unsupported, packed and BY
formats stay unsupported, and the debt entry records the relaxed
Device-scoped emission and the remaining gaps.
2026-10-23 21:22:29 +02:00
JAB-devandClaude Sonnet 5.5 8d54357e79 Merge branch 'main' of https://github.com/boykopovar/AnyPS5 into feat/agc-4-4-4-4-partial-writes
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-23 21:18:00 +02:00
Adrià 1e1ab77684 Merge pull request #8495 from yabanana/fix/borrowed-memory-regions
fix(shader): reject temporary owners for borrowed memory regions
2026-10-23 20:47:29 +02:00
thuanquangandClaude b6b5b80374 docs(shader): say that the f32 compares do not throw in f32 denormal modes 1 and 2
Co-Authored-By: Claude <[email protected]>
2026-10-24 01:45:52 +07:00
thuanquangandClaude f9b5b9767c docs(shader): drop the stale lavapipe skip from the 16-bit interpolation entry
Co-Authored-By: Claude <[email protected]>
2026-10-24 01:44:22 +07:00
thuanquangandClaude 3a8199606a docs(debt): say when agc_driver_f64_fma_subnormals skips
Co-Authored-By: Claude <[email protected]>
2026-10-24 01:44:20 +07:00
thuanquangandClaude 92579f545a docs(debt): correct two stale f64 denormal statements
The shader float mode entry said "Other f64 arithmetic does not model
these denormal controls". On main, v_add_f64, v_mul_f64, v_floor_f64,
v_ceil_f64, v_fract_f64, v_frexp_mant_f64, v_frexp_exp_i32_f64,
v_div_fixup_f64, the f64 compares and ds_min/max/cmpst_f64 read the
f16/f64 denormal field, and each has its own entry. The sentence now
names the f64 arithmetic whose translation still does not read it.

The v_floor_f64 entry said its modifier run used 16 of the 23 measured
values. The run's list holds 13 of them plus -1.5, 2.75 and 1 - 2^-53.

Co-Authored-By: Claude <[email protected]>
2026-10-24 01:43:29 +07:00
Muhammad Wasif Ali WasifandClaude Opus 5.5 98df163cc6 fix(shader): widen LDS atomic fences to device scope on AMD's proprietary driver
The recompiler orders an LDS atomic, and the compare-exchange loop that
writes a byte or a halfword of LDS (ds_write_b8/b16), with a
workgroup-scope OpMemoryBarrier after the update. AMD's proprietary
Windows driver 32.0.21042.62 (Radeon 0x13c0, RDNA 2) compiles that
memory barrier to s_barrier, as the code objects in its pipeline cache
show. Such updates usually sit in branches that only some waves of a
workgroup take, so those waves execute extra s_barriers, which pair
with the other waves' barriers, and the other waves read LDS before it
is written. An OpMemoryBarrier is not an execution barrier and SPIR-V
allows it in non-uniform control flow, so the SPIR-V is valid; a
device-scope OpMemoryBarrier compiles to GL0 and GL1 cache
invalidations without s_barrier there.

PS5LM Plus (PPSA99581, llama.cpp's Vulkan backend) drifted into
garbage on that driver with flash attention on. Its flash-attention
shader stores two halfwords to LDS in a branch that two of its four
waves take, inside the KV loop. The driver's code had 23 s_barrier for
the guest's 21; a replay of the dispatch differed from NVIDIA in 159
words, up to 1.7e38, and now has 21 and differs only in the last bit
of 9 words.

On that driver the fence is now device scope, which orders everything
the workgroup-scope fence did. Other drivers keep the workgroup scope.
The flag is part of the shader cache key, and agc_shader_replay takes
--device-scope-lds-memory-barriers to replay a request the way that
driver compiles it. The LDS update helper already fences, so the
second, identical fence after it in ds_min/max_f32 and the other
read-modify-write LDS operations is dropped.

agc_driver_lds_subword_store_branch stores a halfword to LDS in a
branch that waves 0-1 of four take, delays those waves and then
exchanges LDS slots across one s_barrier. Before, thread 64 read a
stale slot on the AMD driver; it passes on AMD and NVIDIA now.
agc_subgroup_barrier checks the driver quirk and that ds_write_b16,
ds_add_u32 and ds_max_f32 each emit one fence of the expected scope.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01BM2kfDbr6MydxsfTckZJDR
2026-10-23 20:34:25 +02:00
Adrià a19e7f6fdc Merge pull request #7888 from mazen320/fix/pixel-function-lds-buffer
fix(shader): keep an unbounded pixel LDS array in a storage buffer
2026-10-23 20:12:31 +02:00
Adrià d2e42c334d Merge pull request #8429 from milescoviello/fix/fmask-narrow-formats
fix(agc): read FMASK of up to 8 samples in every storage width
2026-10-23 20:08:28 +02:00