Commit Graph
179 Commits
Author SHA1 Message Date
Adrià 572130c764 Merge pull request #6767 from DavidSamir/fix/shader-interpolation-without-float64
fix(shader): interpolate 16-bit values with 64-bit integers on devices without Float64
2026-10-19 12:54:25 +02:00
Adrià 8e3d8b9bd8 Merge pull request #6723 from Tripchipp/fix/debt-file-unlinked-entries
fix(tools): keep debt entries without a core link in the index
2026-10-19 12:09:51 +02:00
David 2b81cc1c64 docs(debt): say how 16-bit interpolation is computed without Float64 2026-10-19 10:10:34 +02:00
Adrià Franch 6a894d4c1c Merge upstream/main into codex/fmask-image-reads 2026-10-19 09:48:51 +02:00
Adrià 9bfbedc562 Merge pull request #6613 from milescoviello/fix/vertex-barrier-before-memory
fix(shader): emit nothing for a vertex s_barrier that precedes every memory access
2026-10-19 09:38:07 +02:00
Dean 819ced2e1d Merge pull request #7674 from thuanquang/fix/mesh-layer-block
fix(shader): write a mesh shader's layer through a per-primitive block
2026-10-19 18:51:54 +13:00
Adrià 00666eeb36 Merge pull request #6470 from EagleBearerYS/fix/recompiler-once-per-pixel-sample-inputs
fix(recompiler): run a pixel shader the guest does not iterate once per pixel
2026-10-19 03:21:34 +02:00
milescovielloandClaude Opus 5.5 7092dde6ee fix(shader): emit nothing for a vertex s_barrier that precedes every memory access
A vertex-path program with LDS, GDS or memory writes refused any s_barrier. NGG passthrough
programs start with the s_barrier that orders GS_ALLOC_REQ, before any memory access, and some
write buffers later. A barrier that runs before every load, store, atomic, image or LDS access of
the program has nothing to order, so it emits no instruction, like the barrier of a program
without memory access. Barriers after a memory access still throw.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 01:07:58 +00:00
Adrià c176007f5c Merge pull request #6422 from Amoenus/codex/test-vcc-sampler-runtime-main940
test(agc): execute MIMG sampler tuples ending in VCC
2026-10-19 02:40:59 +02:00
Adrià 18bd700806 Merge pull request #6291 from santhoshkumar-dev/codex/fix-pixel-exec-helper-lanes
fix(shader): preserve pixel helper lanes in EXEC copies
2026-10-19 00:37:47 +02:00
Adrià 0fd3555ad6 Merge pull request #5958 from ps54all/feat/shader-converted-image-sample
feat(shader): sample converted unorm images in the shader
2026-10-19 00:24:10 +02:00
Yunus Shaikh d13a90d015 Merge main into fix/recompiler-once-per-pixel-sample-inputs
Resolves the shader debt file bullet by bullet: main's EmitSetAttribute entry, and this branch's PERSP_SAMPLE/LINEAR_SAMPLE and pixel-position entries.
2026-10-18 15:14:25 -07:00
Adrià 77fd2b6c5e Merge pull request #6317 from SleglJan/pr/clip-distance-full
fix(shader): leave out the all-zero position distance when guest distances fill all eight
2026-10-19 00:12:57 +02:00
thuanquangandClaude Opus 5.5 a9cd39045b fix(shader): write a mesh shader's layer through a per-primitive block
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 03:07:32 +07:00
Yunus Shaikh dc47a81b02 Merge main into fix/recompiler-once-per-pixel-sample-inputs 2026-10-18 11:30:31 -07:00
Dean e3c46940b3 Merge pull request #7527 from EagleBearerYS/fix/shader-selected-records-image-pair-limits
fix(shader): keep a shader's selected image-table records within the image and pair limits
2026-10-19 07:22:18 +13:00
Adrià cd04995e01 Merge pull request #6054 from Dextroid17/feat/srgb-copy-pr
feat(agc): sample 8 and 8_8 sRGB textures through an RGBA8 sRGB copy
2026-10-18 18:44:08 +02:00
Adrià FranchandClaude Sonnet 5.5 96c692c887 test(agc): expect 32-bit buffer atomics off a DWORD boundary to act on their containing dword
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-18 17:54:44 +02:00
Nahid DelicandClaude Opus 5.5 7e4ce1ab3d fix(shader): act on the containing dword for unaligned 32-bit buffer atomics
The RDNA2 ISA (8.1.7) ignores the two low address bits of dword or wider
non-formatted accesses in alignment mode DWORD. MXGP 26 (PPSA30839) sets
bits with buffer_atomic_or at odd byte offsets, which recorded an
unaligned BDA fault and dropped the atomic. A 32-bit buffer atomic now
acts on the dword that holds its address; 64-bit atomics off an 8-byte
boundary still fault.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 17:54:44 +02:00
ps54allandClaude Opus 5.5 8545c23013 feat(shader): sample converted unorm images in the shader
10_11_11_UNORM (format 30) images are read and written through an
R32_UINT view, so the hardware sampler cannot filter them. image_sample
of a 2D or 2D array view now fetches the one or four texels at LOD 0,
decodes them and blends them in the shader, with bilinear weights on
the 8-bit grid, for point or bilinear filtering with wrap or
clamp-to-edge addressing.

A shader gets the converted sample mode only after a converted
descriptor reaches one of its sampled images: that capture throws
ConvertedSampleRequired and the driver prepares the program again
with GuestContext::convertedSamples.

The R10_G11_B11 float format is sampled natively since #7271 and keeps
its refusal on the converted path.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 17:43:35 +02:00
Dean 385ed71f2c Merge pull request #7368 from CrimsonMac/fix/device-lds-mixed-width-atomics
fix(shader): use 64-bit buffer atomics for device-memory LDS
2026-10-19 01:51:59 +13:00
Yunus Shaikh 364fb665c1 docs(shader): note that selected image-table records merge past the image and pair limits 2026-10-18 04:33:39 -07:00
Dextroid17 192a37d026 test(agc): force the sRGB sample copy with APS5_SRGB_SHADER_DECODE=copy 2026-10-18 07:27:15 -04:00
Dextroid17 97354b7fd1 docs(debt): sRGB 8 and 8_8 textures read an RGBA8 sRGB copy 2026-10-18 07:27:15 -04:00
Kovalev Vladislav 9b42649a93 fix(agc): reconcile FMASK reads with current main 2026-10-18 16:53:33 +06:00
Crimson cb28abeb89 fix(shader): fault on misaligned 64-bit device-memory LDS atomics 2026-10-18 12:31:11 +03:00
David debf6ee684 docs(shader): say how the barycentric tessellation stages pass clip distances 2026-10-18 13:08:53 +04:00
Jan ŠléglandClaude Opus 5.5 5c29d125e1 fix(shader): leave out the all-zero position distance when guest distances fill all eight
A vertex or tessellation evaluation program whose PA_CL_VS_OUT_CNTL
enables eight guest clip distances (CLIP_DIST_ENA 0xff, both distance
vectors) failed to compile with "guest clip distances plus the all-zero
clip position distance exceed 8 clip distances", at registration and at
the draw. A program whose guest clip and cull distances together take
eight (four of each, say) compiled, but its draw failed in the pipeline
validator with "more than eight clip and cull distances in one shader".

The all-zero position distance is now added only while the guest clip and
cull distances leave one of the eight slots free. Otherwise the program
keeps its guest distances, and a primitive with a vertex at clip position
(0,0,0,0) is not removed; the EmitSetAttribute debt entry says so.

agc_position_invariance compiles one program with seven and eight clip
distances, and with three and four clip distances beside four cull
distances: the clip distance arrays are 8, 8, 4 and 4, so the all-zero
position distance is in the first and third only.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 10:40:52 +02:00
Crimson af0af833c1 fix(shader): use 64-bit buffer atomics for device-memory LDS
Compute LDS beyond the device's shared-memory limit lives in a storage
buffer, and its 64-bit atomics took a lock in that buffer. AMD's Windows
driver compiles the lock's acquire and release to s_barrier, which inside
the divergent lock loop pairs with the program's own barriers, so the
device-memory case of agc_driver_lds_lock_budget read half its sum.

With shaderBufferInt64Atomics the device-memory LDS now uses a 64-bit view
of the buffer instead: 64-bit atomics are compare-exchange loops on it and
32-bit atomics stay native, so no lock is taken. Without the feature the
lock is kept. The per-workgroup slice is rounded up to an even dword count
so that the 64-bit view stays aligned.
2026-10-18 05:47:30 +03:00
Dean 5a240614e4 Merge pull request #7351 from thuanquang/fix/amd-robust-buffer-access2
fix(agc): keep robustBufferAccess2 off on AMD's proprietary driver
2026-10-18 15:20:22 +13:00
Yunus Shaikh 2848253fe4 Merge main into fix/recompiler-once-per-pixel-sample-inputs 2026-10-17 19:06:51 -07:00
Dean 0e94c5d434 Merge pull request #6243 from EagleBearerYS/perf/shader-direct-cpu-evaluable-images
perf(shader): select the record of a T# whose offset the CPU evaluates
2026-10-18 15:00:57 +13:00
thuanquangandClaude Opus 5.5 48b394d1ec fix(agc): keep robustBufferAccess2 off on AMD's proprietary driver
Since #4048 enabled robustBufferAccess2, AMD's Windows driver draws
nothing in agc_driver_layered_volume_draw and agc_driver_layered_volume_vertex,
and the selected loads make the high half of agc_driver_subvector_loop's
wave64 skip its loop. Until the cause is found, that driver does not get
the feature, and its loads keep their selections.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 08:42:00 +07:00
Dean e0644fbce1 Merge pull request #7212 from milescoviello/perf/denormal-free-guarded-products
perf(shader): drop the result flush of a product behind its tiny-product check
2026-10-18 13:56:43 +13:00
Dean 63da333b7a Merge pull request #4048 from Mouad-Scriptz-0/perf/recompiler-select-load-guards
perf(recompiler): select guest memory loads instead of branching around them
2026-10-18 13:56:36 +13:00
Yunus Shaikh 8c6765be71 Merge main into perf/shader-direct-cpu-evaluable-images
Main's #7325 adds verifyChainedTableOffset to the image table tests
where this branch adds its selected-record tests. Keep both, with
main's call after this branch's.
2026-10-17 17:32:11 -07:00
Yunus Shaikh ddf072e6f3 Merge main into fix/recompiler-once-per-pixel-sample-inputs
Main's EmitSetAttribute debt entry now says the generated rect-list and
barycentric tessellation stages forward the vertex shader's clip array.
It sits next to this branch's PERSP_SAMPLE and pixel position entries,
which main left as they were; keep main's entry and this branch's two.
2026-10-17 17:03:27 -07:00
Yunus Shaikh 4cb0512329 Merge main into perf/shader-direct-cpu-evaluable-images
Main's #7101 reads a key buffer's words in one call where this branch
names the reason a narrowing is skipped. Keep main's bulk read and
count both of its unmapped-page skips as unmapped.
2026-10-17 15:58:42 -07:00
David a968198710 Merge remote-tracking branch 'origin/main' into feat/shader-barycentric-tessellation
# Conflicts:
#	core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp
#	docs/dev/debt/shader.md
2026-10-18 02:30:39 +04:00
David 91d5f577ea docs(shader): record the tessellation route of the barycentric emulation 2026-10-18 02:17:01 +04:00
thuanquangandClaude Opus 5.5 7b45d1034e fix(shader): run buffer atomics through a V# off a DWORD boundary
The binding plan refused every buffer atomic through a V# whose base is
not a multiple of 4. On RDNA2 such an atomic works when base + offset is
on a DWORD boundary and stops the dispatch otherwise, which the runtime
buffer atomic already does, so the refusal is dropped.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 03:22:06 +07:00
milescovielloandClaude Opus 5.5 6e0886d76d perf(shader): drop the result flush of a product behind its tiny-product check
A v_mul_f32 in a FLOAT_MODE that flushes f32 denormals emits the
nearest-even tininess check, the NaN result selection and then a
result flush. The check already turns every product that rounds below
2^-126 into a zero of its sign, so the flush can't change what it
keeps. DenormalFlushEliminator now proves that: a select arm guarded
by the tiny-product check of the same denormal-free factors, an arm a
select takes only when its own bits are NaN, and an and with a mask
that has no significand bits are denormal-free.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 16:34:08 +00:00
Yossi Yadgar b1fa1b94f1 docs(debt): note how 16-bit interpolation reads its parameters without the extension 2026-10-17 15:18:41 +03:00
Dean 677354d9da Merge pull request #7018 from thuanquang/fix/mul-lo-u16-24-bit-factors
fix(shader): read low-half 16-bit multiply factors as 24-bit fields
2026-10-18 00:30:09 +13:00
Yunus Shaikh 7b3826a42d Merge main into fix/recompiler-once-per-pixel-sample-inputs
main d7262bd6d6 adds the single-sample scan entry after the custom MSAA
sample locations entry in the AGC debt file. Keep it after this
branch's version of that entry.
2026-10-17 03:04:20 -07:00
thuanquangandClaude Opus 5.5 e5cc0bc0ff feat(shader): translate packed f16 in the f16 denormal modes that flush
v_pk_add/mul/fma/fmac/min/max_f16 threw in f16 denormal modes 0-2. On
RDNA2 (gfx1031) bit 6 clear flushes each denormal input lane to a zero
of its sign, and bit 7 clear flushes an add result below 2^-14 and a
mul or fma result whose exact value rounded to 11 significant bits
with an unbounded exponent is below 2^-14, as the scalar forms do;
min/max flush only their inputs. Packed f16 still throws for f16
rounding other than nearest even.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 21:23:10 +13:00
Dean adb0e7a8cb Merge pull request #7040 from thuanquang/fix/fma-mix-f16-input-flush
fix(shader): flush v_fma_mix_f32 f16 sources by the f16 denormal field
2026-10-17 21:21:53 +13:00
Dean bf0bec93ff Merge pull request #7041 from thuanquang/fix/div-fixup-f64-input-flush
fix(shader): flush v_div_fixup_f64 src1 and src2 by the f64 denormal field
2026-10-17 21:21:49 +13:00
Dean a60ac1fbed Merge pull request #7034 from thuanquang/fix/f16-fma-denormal-flush
fix(shader): flush v_fma_f16 family denormals by the f16 denormal field
2026-10-17 20:52:18 +13:00
Dean 17cfb1f4cb Merge pull request #7031 from thuanquang/fix/f16-pack-denormal-flush
fix(shader): flush v_cvt_pkrtz_f16_f32 and v_pack_b32_f16 f16 denormals
2026-10-17 20:22:25 +13:00