Commit Graph
2141 Commits
Author SHA1 Message Date
Dean d43e6bd663 Merge pull request #12185 from Gonic0/fix/recompiler-user-data-call-across-branches
fix(recompiler): link user-data calls whose target copy precedes forward branches
2026-10-29 07:27:53 +13:00
Adrià beb20cfcdf Merge pull request #11719 from milescoviello/perf/srt-evaluator-requirements
perf(shader): reuse the evaluator's requirement list across values
2026-10-28 17:35:37 +01:00
Adrià ecfad8e66c Merge pull request #11711 from danielcadev/fix/runtime-formatted-store-expansion
fix(shader): bound runtime formatted-store expansion
2026-10-28 17:35:31 +01:00
Dean d5b654d21c Merge pull request #11949 from 00xDisaster/fix/windows-include-path-quoting
build(windows): quote the forced standard-stream include path
2026-10-29 03:34:16 +13:00
Dean 0c4d871f18 Merge pull request #12253 from Michael-KD/fix/fma-f32-denormal-modes
fix(shader): translate the fused f32 fma forms in f32 denormal mode 2
2026-10-29 00:32:38 +13:00
Dean 7d223dd6da Merge pull request #12252 from Michael-KD/fix/f32-rounding-frexp-denormal-modes
fix(shader): translate f32 fract, floor, ceil and frexp_mant in f32 denormal modes 1 and 2
2026-10-29 00:32:22 +13:00
Dean 3a40945e62 Merge pull request #12298 from oneandonlydean/revert-11199-helper-lane-masks
revert(shader): restore pixel helper lanes in guest lane masks (#11199)
2026-10-28 22:57:31 +13:00
Dean e40163ef16 Merge pull request #11967 from milescoviello/perf/ir-instruction-pool
perf(shader): allocate a program's instruction list nodes from a pool
2026-10-28 22:53:40 +13:00
Dean 94341855b4 Merge pull request #11916 from Bram910/fix/shader-pack-mapping-ownership
fix(shader): preserve ownership of mapped shader pack entries
2026-10-28 22:53:02 +13:00
Dean 3917fa85ce Merge pull request #12188 from Gonic0/fix/shader-lds-lock-fences-moltenvk
fix(shader): fence the LDS lock's critical section on MoltenVK
2026-10-28 22:51:00 +13:00
Dean 7c7cfacc2d Merge pull request #12173 from MarcZX10/fix/shader-tessellation-instance-patches-zero-control-points
fix(shader): do not divide by zero control points when keying tessellated draws
2026-10-28 22:50:20 +13:00
Adrià a444a18d93 Merge pull request #11507 from hugodearaujo/fix/agc-short-cube-sampling
fix(agc): sample cube descriptors with fewer than six slices as six faces
2026-10-28 10:14:50 +01:00
Dean b332780eec revert(shader): restore pixel helper lanes in guest lane masks (#11199)
This reverts merge 7fc0ae6008. On NVIDIA, where helper lanes take part in ballots, clearing helper bits from every pixel ballot breaks derivatives along triangle edges (bright lines and specks on a cloud surface in PPSA21564). See the report on #11199.
2026-10-28 22:11:10 +13:00
Dean 87b810a1db Merge pull request #12211 from XairRrR/fix/shader-paired-wave-zero-branch
fix(recompiler): take a paired wave64 zero branch when some invocations are inactive
2026-10-28 21:32:27 +13:00
Adrià 7fc0ae6008 Merge pull request #11199 from QRMOE/fix/shader-pixel-helper-lane-masks
fix(shader): keep pixel helper lanes out of guest lane masks
2026-10-28 08:54:16 +01:00
Dean 00e85fea39 Merge pull request #10348 from oneandonlydean/perf-D2-v47
fix(agc): clamp an exported pixel depth to the viewport depth range
2026-10-28 18:25:05 +13:00
Michael Krumland-DunningandClaude Opus 5.5 254d7b416f fix(shader): translate the fused f32 fma forms in f32 denormal mode 2
v_fma_f32, v_fmac_f32, v_fmamk_f32 and v_fmaak_f32 threw "f32 denormal
mode 2 is not implemented" whenever FLOAT_MODE flushed f32 denormal
inputs but kept denormal results.

On RDNA2 (gfx1036) at round to nearest even, mode 2 flushes the inputs
and rounds the fused result once with gradual underflow, which the host's
Fma gives under DenormPreserve 32. The translation now matches all 5,596
measured triples for the four forms at IEEE 0 and 1. Mode 1 keeps
throwing: there the hardware flushes a result that is tiny after rounding
with an unbounded exponent even when the addend is nonzero.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 22:05:57 -07:00
Michael Krumland-DunningandClaude Opus 5.5 126b7b98a0 fix(shader): translate f32 fract, floor, ceil and frexp_mant in f32 denormal modes 1 and 2
All four threw "f32 denormal mode N is not implemented" whenever
FLOAT_MODE kept only one side of the f32 denormals.

On RDNA2 (gfx1036), in every f32 round mode and at IEEE 0 and 1, mode 2
gives the results of mode 0 and mode 1 those of mode 3 with a denormal
result flushed, which only v_fract_f32 of a positive denormal produces.
The translation now matches all 118 measured inputs in modes 1 and 2.
Mode 1 of the three that run host float operations on a kept denormal
needs DenormPreserve 32, as v_min_f32 does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 22:05:57 -07:00
Adrià e5c952d51f Merge pull request #9806 from frankea/fix/hull-masked-control-point
fix(shader): evaluate a control point masked out of the packed hull register
2026-10-28 05:35:24 +01:00
Adrià ed94f8443f Merge pull request #11699 from Filip722/perf/shader-pixel-entry-mask
perf(shader): reuse starting pixel lane predicates
2026-10-28 04:59:08 +01:00
XairRrR 86f97e8ac4 fix(recompiler): take a paired wave64 zero branch when some invocations are inactive
A wave64 program held as 32 invocations x 2 lanes decided s_cbranch_execz,
s_cbranch_vccz and s_cbranch_scc0 by balloting the per-lane "zero"
condition and requiring all 64 bits set. OpGroupNonUniformBallot sets the
bit of an inactive invocation to 0 (SPIR-V specification,
OpGroupNonUniformBallot: "The bit is set to one if the corresponding
invocation is active and the Predicate for that invocation evaluated to
true; otherwise, it is set to zero"), and an invocation that returned
from the entry point is no longer active. When one invocation stopped,
e.g. after a BDA fault, the zero branch was never taken for the others:
a loop leaving through s_cbranch_execz never ended.

The RDNA2 ISA branches when the whole register is zero ("if (EXEC == 0)",
"if (VCC == 0)", "if (SCC == 0)", SOPP S_CBRANCH_EXECZ / VCCZ / SCC0), so
the branch now asks whether any active invocation still has a lane with
the bit set, as the wave32 path does: not any(own lane set || other
lane set). Inactive invocations then count as lanes with the bit clear.
The non-zero kinds keep any(own || other).

The execution test runs a wave64 program in which lane 0 faults and
stops its invocation, then takes each zero and non-zero branch; before
this change the other lanes fell through all three zero branches.

AI-assisted: yes
2026-10-28 04:37:56 +01:00
Nicolas GonzalezandClaude Opus 5.5 2f25ab919f fix(shader): fence the LDS lock's critical section on MoltenVK
SPIRV-Cross emits the lock's acquire compare-exchange and release
exchange as relaxed Metal atomics, so the plain LDS loads and stores of
a locked 64-bit update were not ordered against the lock and contended
ds_add_u64 lost updates on an Apple M5 Pro. On MoltenVK the driver now sets
SpirvTarget::ldsLockFences, and the lock brackets its critical section
with workgroup-scope acquire and release OpMemoryBarriers, which become
threadgroup atomic_thread_fence with no execution barrier.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 23:37:56 -03:00
Nicolas GonzalezandClaude Opus 5.5 6037a12ee7 fix(recompiler): link user-data calls whose target copy precedes forward branches
FindUserDataCalls required the s_mov copy of the user-data callee pointer to
sit in the call's basic block, so a compute shader that copies s[0:1] at entry
and calls after an execz guard was left with an unresolvable s_swappc_b64.
Fall back to reachingWriter, as FindTableCalls already does.

The UserDataCallAfterBranch execution test dispatches such a shader with two
callees and checks every lane's result.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 22:43:10 -03:00
MarcZX10 59fef11858 test(shader): key a tessellated instanced draw with zero control points
The instance patch count has to be zero instead of crashing, and a regular
configuration still divides the index count by the control points.
2026-10-28 01:05:38 +00:00
MarcZX10 ce51c9cbbc fix(shader): do not divide by zero control points when keying tessellated draws
TessellationInstancePatches divided the draw's index count by the
tessellation configuration's inputControlPoints. A request replayed from a
serialized capture is not validated for that field, so a configuration with
zero control points and an instanced draw raised SIGFPE while the cache key
was built, before ShaderInputInfoBuilder could reject the configuration with
its intended error. The function now reports no instance patches for zero
control points and leaves the rejection to the builder.
2026-10-28 01:05:38 +00:00
Dean Galvin c116f4f2f0 Merge branch 'main' into perf-D2-v47
# Conflicts:
#	docs/dev/debt/libSceAgcDriver.md
2026-10-28 13:52:37 +13:00
Dean cccdaa2734 Merge pull request #11826 from oneandonlydean/carry/3699-f16-fma
fix(shader): take the fused result when an f16 fma's sum is exact
2026-10-28 13:52:08 +13:00
Dean e6d04bf3c6 Merge pull request #11564 from JJenkx/fix/shader-folded-bitcast-nan-reuse
fix(shader): reuse folded bitcasts and NaN tests within blocks
2026-10-28 13:51:50 +13:00
Dean c96d9fff00 Merge pull request #11440 from hamb3r/fix/agc-shader-memory-descriptor-epoch
fix(agc,shader): unify descriptor pendingWrite policy and enforce invalidation epochs
2026-10-28 13:51:32 +13:00
Dean 58dfa6689f Merge pull request #10337 from Filip722/submit/scalar-20261023
perf(shader): use 32-bit scalar buffer bounds
2026-10-28 13:46:36 +13:00
Dean 899b2d361f Merge pull request #10336 from Filip722/submit/log2-20261023
perf(shader): skip log2 correction outside the near-one range
2026-10-28 13:46:20 +13:00
Dean 951d170bc1 Merge pull request #9890 from savvaniss/perf/gcn-buffer-format-lookup
perf(recompiler): translate GCN buffer formats without a private table
2026-10-28 13:46:04 +13:00
Adrià de004fed72 Merge pull request #11348 from Serph91P/fix/shared-uint-sampler-pr
fix(shader): select point samplers for direct Uint images
2026-10-28 01:32:37 +01:00
Dean b0bed62fa5 Merge pull request #10228 from mrfelek/claude/project-thread-f9yg74
fix(shader): plan an image table for a T# read at a first-lane offset
2026-10-28 12:56:15 +13:00
Dean c28b600917 Merge pull request #9978 from BKlaasWerkman/fix/image-ms-array-storage-only
fix(shader,agc): declare ImageMSArray only for multisampled arrayed storage images
2026-10-28 12:02:55 +13:00
Adrià f5fefb982c Merge pull request #11305 from joedeangelis533-bot/review/tessellation-depth-upstream-20261025
feat(agc): remap unsupported tessellation viewport depth ranges
2026-10-27 22:27:35 +01:00
Adrià b9623a5c26 Merge pull request #11297 from mrfelek/perf/probe-f32-flush-nvidia
perf(agc): use the NVIDIA driver's f32 denormal flush when the startup probe matches
2026-10-27 22:09:23 +01:00
Dean Galvin d4a296d863 Merge main into perf-D2-v47: depth export tail moves to request version 49
Main took request serialization version 48 for the fragment barycentric
built-ins flag (#9193). The depth export clamp bounds are now written at
version 49 and read only for versions from 49, so a version 48 request as main
writes it still decodes, with default bounds. Tests: version 49 is the
emitted prefix, 50 the first unsupported one, a depth exporting request
without its bounds decodes at 48, 47 and 46 (the last two without main's
barycentric byte), and a version 48 two-sample dithered request decodes as
written.
2026-10-28 08:24:34 +13:00
Adrià e0cd1259a9 Merge pull request #11254 from Michael-KD/fix/scalar-buffer-runtime-word3
fix(shader): ignore a runtime V#'s type for scalar buffer loads as RDNA2 does
2026-10-27 16:28:28 +01:00
Adrià 6f7cb75291 Merge pull request #9193 from imellag/feat/shader-barycentric-builtins-moltenvk
feat(recompiler): read I/J from barycentric built-ins on MoltenVK
2026-10-27 16:21:05 +01:00
Disaster a07835c9f9 build(windows): quote the forced standard-stream include path 2026-10-27 17:57:47 +03:00
milescovielloandClaude Opus 5.5 007c0bf37e perf(shader): allocate a program's instruction list nodes from a pool
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 13:43:13 +00:00
Bram910 c2bf2c595e fix(shader): preserve ownership of mapped shader pack entries 2026-10-27 13:11:19 +01:00
frankea 724cabcffd fix(shader): evaluate a control point masked out of the packed hull register 2026-10-27 12:03:47 +01:00
Adrià 768e92f8b6 Merge pull request #9743 from frankea/fix/hull-reads-control-point-outputs
fix(shader): read other control points' off-chip outputs in hull programs
2026-10-27 12:00:31 +01:00
Dean Galvin 1bf274a817 Merge main into perf-D2-v47: depth export tail moves to request version 48
Main took request serialization version 47 for the two-sample dithered
alpha-to-coverage value. The depth export clamp bounds are now written at
version 48 and read only for versions from 48, so a version 47 request as main
writes it still decodes, with default bounds. Tests: version 48 is the
emitted prefix, 49 the first unsupported one, and a version 47 two-sample
dithered request (with and without depth export) decodes as written.
2026-10-27 22:37:31 +13:00
Dean Galvin 636c0564ef merge: main into carry/3699-f16-fma 2026-10-27 20:59:33 +13:00
Daniel Castrillon bfe961a3ae Merge remote-tracking branch 'origin/main' into fix/runtime-formatted-store-expansion 2026-10-27 02:09:04 -05:00
Adrià 76dec1794b Merge pull request #8998 from MarcZX10/codex/f32-image-store-rtz-8282
fix(agc): round 16-bit float image stores toward zero
2026-10-27 07:59:23 +01:00
hugodearaujo b9f4f65904 fix(shader): encode both new image fields under disk cache format 49
main took format 48 and a 45th ImageResource field (optionalDescriptor) with #8077; the merge kept both sides's 48 and 44.
2026-10-27 03:46:24 -03:00