Commit Graph

968 Commits

Author SHA1 Message Date
Adrià 2c4828a63d
Merge pull request #2072 from STUPIDCONTEM/fix/srt-signed-comparison
fix(shader): evaluate signed comparisons in SRT expressions
2026-10-10 10:07:30 +02:00
Adrià d185c31678
Merge pull request #2348 from Pipodi/fix/1d-storage-through-2d-stores
fix(shader): write 1D storage images through 2D image stores
2026-10-10 10:06:36 +02:00
Dean ac75a96dd7
Merge pull request #1908 from TheAggie/fix/libkernel-sched-other-priority
fix(libkernel): accept SCHED_OTHER in sched_get_priority_max/min
2026-10-10 21:05:56 +13:00
Adrià 0bc8313a25
Merge pull request #2177 from MarcZX100/codex/fix-color-compare-negative-wrap
fix(shader): normalize negative color comparison wrap indices
2026-10-10 10:02:56 +02:00
Adrià 700d5a64c8
Merge pull request #2312 from SleglJan/feat/shader-lds-float-atomics
fix(shader): LDS float atomics quiet signalling NaNs and flush denormals as the hardware does
2026-10-10 10:00:51 +02:00
Adrià af1a8edfe1
Merge pull request #2583 from gjonn/perf/async-registration-prepare
perf(agc): prepare registered shaders in the background
2026-10-10 10:00:11 +02:00
Adrià 034dd75f85
Merge pull request #2204 from XairRrR/feat/videoout-deferred-flip-buffer
feat(libs): resolve command-buffer flip buffers when the GPU reaches the flip
2026-10-10 09:59:35 +02:00
Adrià Franch f6d97ad3d2 test(agc): drop the 1D-T# image_load refusal that main now accepts
eb06284c7 made a read-only 2D image_load through a 1D T# valid, so the
test no longer pins a refusal. The TechnicalDebt line now says storage
loads still throw.
2026-10-10 09:57:16 +02:00
Alex Collini 6c4660b73c fix(shader): ignore y in 2D stores through a 1D storage image
Measured on RDNA2 (gfx1035) in review: image_store with DIM 2D through a
1D T# writes texel x for every y, including y = 0xffffffff. The T# type
decides the addressing and DIM only how many address VGPRs are read. The
store no longer drops y != 0.

The test now pins the second store at y = 1 with dmask 0x5: texel x holds
its components 0 and 2, components 1 and 3 are 0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 09:55:37 +02:00
Alex Collini 14d9b13cd8 fix(shader): write 1D storage images through 2D image stores
A compute program of PPSA26344 writes a 1D storage image with image_store
DIM 2D, and no runtime image mode matched its T#. A write-only 2D storage
access now also gets a 1D mode. A store through it is dropped when y is not
0, as a one-texel-high image bounds it; this mirrors the measured 3D loads
through 2D T#s of #2023 and is listed in TechnicalDebt as unmeasured.

Loads, atomics and image_store_mip through such a pair still throw.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 09:55:37 +02:00
XairRrR c9fe124c10 feat(libs): resolve command-buffer flip buffers when the GPU reaches the flip
A flip packet names a buffer index; the buffer was looked up when the
command buffer was submitted, so a title that registers its buffers
after submitting the first frame failed with "flip buffer is not
registered". The buffer is now resolved when the GPU reaches the flip,
as the hardware does. A flip whose buffer is still unregistered then
presents black and completes (see TechnicalDebt).

Uncharted: Legacy of Thieves Collection (PPSA05684) submits its first flip before registering its buffers and stopped with "flip buffer is not registered".
2026-10-10 09:54:29 +02:00
Adrià a29bae31af
Merge pull request #2572 from oneandonlydean/fix/carry-2237
fix(shader): read 2D image accesses through 1D T#s as measured
2026-10-10 09:54:13 +02:00
Adrià Franch ac03a5b718 docs(architecture): describe background shader preparation at registration
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-10 09:52:20 +02:00
Adrià d697af329d
Merge pull request #2351 from Faffu/fix/avplayer-nosync-late-frames
fix(avplayer): skip late video frames in no-sync mode while audio drives the clock
2026-10-10 09:50:52 +02:00
Adrià ada939d2eb
Merge pull request #2035 from CouchRiv/fix-shader-f64-snan-ieee0
fix(shader): quiet f64 signaling NaNs only in IEEE mode
2026-10-10 09:49:38 +02:00
Adrià f70a091f90
Merge pull request #2380 from SleglJan/fix/shader-trig-quarter-fold
fix(shader): make v_sin and v_cos linear within 2^-12 of a turn from a zero
2026-10-10 09:47:14 +02:00
Faffu 068da6a99f fix(avplayer): skip late video frames in no-sync mode while audio drives the clock
In SCE_AVPLAYER_AV_SYNC_MODE_NONE every decoded frame was handed out in
order, so a title that requests video slower than the film's frame rate
fell behind its audio (about 52 s by the end of the PPSA12544 intro).
While the title pulls audio, frames the audio clock has already passed are
now skipped; frames that are not late are handed out as before.

Fixes #1635

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 09:42:20 +02:00
Jan Šlégl 4fb613ec40 fix(shader): flush LDS float atomic inputs for FP_DENORM_FLUSH_IN as well
On RDNA2 (gfx1036) ds_min/max/cmpst(_rtn)_f32 and _f64 flush both operands
when bit 0 of the type's denormal field is clear: field 2 flushes like field
0, field 1 keeps like field 3, in IEEE 0 and 1. The flush decision now tests
that bit. agc_driver_lds_float_atomic_modes adds FLOAT_MODE 0x50 (both fields
1) and 0xa0 (both fields 2), and the TechnicalDebt entry records the measured
fields.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012GLfKH7Sqe51wX254k1XsV
2026-10-10 09:40:42 +02:00
Jan Šlégl c2a9491e96 fix(shader): LDS float atomics quiet signalling NaNs and flush denormals as the hardware does
ds_min/max/cmpst_f32 and ds_min/max/cmpst_f64 with their _rtn forms follow the
rule measured on RDNA2 (gfx1036): both operands are flushed to a signed zero
when the type's denormal field flushes, a signalling-NaN data operand is stored
quieted, else a signalling-NaN old value, else a quiet NaN loses, else the
ordered compare decides, and the flushed value is written. The shared f32
path used the host's float compares, so its NaN and denormal results were the
driver's; the shared f64 path lacked the signalling-NaN rules the buffer path
has. Both now use AtomicFloatBits. The translation marks the shared float
atomics with the mode's flush in MemoryInfo.

The new agc_driver_lds_float_atomic_modes pins 32 operand pairs per type in
the titles' mode, with both fields kept and with both flushed. The 64-bit
test's model gets the signalling-NaN rule and one lane kind now feeds the
signalling NaN of its table into min/max.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012GLfKH7Sqe51wX254k1XsV
2026-10-10 09:40:41 +02:00
Alex d199fbc708 fix(shader): quiet f64 signaling NaNs only in IEEE mode
The f64 unary instructions, v_ldexp_f64, v_div_fixup_f64 and
v_cvt_f64_f32 always quieted a signaling NaN. The hardware does that
only with IEEE_MODE=1, as #1867 measured for the f32 and f16 forms;
with IEEE=0 the NaN comes out unchanged, measured on gfx1036.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-10 09:40:09 +02:00
Adrià Franch 64193dd96d docs(technical-debt): measured v_sin and v_cos error inside the bands
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-10 09:39:14 +02:00
Jan Šlégl 909281c994 fix(shader): make v_sin and v_cos linear within 2^-12 of a turn from a zero
After #1979 the cycle is exact, but the driver's sine of the radians loses
tiny results to its absolute error, and near the zeros of sine at k + 0.5
and of cosine at k ± 0.25 the f32 radians drop the low bits of the cycle.
Measured on RDNA2 (gfx1036), the hardware returns the input times 6.2831826
for every input below 2^-12 of a turn and stays within 7 ULP of the f32 2π
times the distance at the half and quarter turns.

Within 2^-12 of a turn from a zero the lowering now returns the linear term
of the exact distance to that zero, with the hardware's constant at the
integers and the f32 2π elsewhere; everywhere else it keeps the driver's
sine or cosine of the radians. agc_driver_sin_cos_near_zero pins 32 inputs
per type from the oracle with per-lane tolerances.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012GLfKH7Sqe51wX254k1XsV
2026-10-10 09:39:01 +02:00
Nahuel Genchi eb06284c78 fix(shader): read 2D image accesses through 1D T#s as measured
A compute shader in Astro Bot samples an image as 2D while the bound
T# is 1D, and the recompiler refused it. Offer a 1D runtime mode for
sampled images used only by image_sample_lz and mip-less image_load,
which reads the texel the first coordinate selects, as measured on
RDNA2 in #2237.
2026-10-10 09:35:34 +02:00
ale 0bea402a1c feat(shader): follow FP16_OVFL in every f16 result
With FP16_OVFL=1 the hardware writes an f16 result that would round to
infinity as the largest finite value of that sign, unless a source
operand is infinite. v_div_fixup_f16 keeps the infinity it writes for a
zero denominator or an infinite numerator. Measured on RDNA2 (gfx1036)
at IEEE=0 and IEEE=1 with f16 denormals kept and flushed.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-10 04:32:38 -03:00
Adrià e8b47b9270
Merge pull request #2043 from CouchRiv/fix-shader-cube-sc-tc-snan
fix(shader): quiet signaling NaN cube results in IEEE mode
2026-10-10 09:28:56 +02:00
Adrià f198c8ff97
Merge pull request #2036 from CouchRiv/fix-shader-minmax-f16-f64-ieee
feat(shader): follow IEEE_MODE in f16 and f64 min and max
2026-10-10 09:28:37 +02:00
Adrià 51b8cef4f9
Merge pull request #1969 from lubaxe/fix/agc-null-vertex-buffer-descriptor
fix(agc): read zero for vertex attributes behind a null V#
2026-10-10 09:28:06 +02:00
Adrià 41e34915b8
Merge pull request #1777 from MathiasDevelopes/feat/libkernel-random-device
feat(libkernel): open /dev/random and /dev/urandom for reading
2026-10-10 09:27:46 +02:00
Adrià d99babe24c
Merge pull request #1607 from saarthakpant/fix/agc-per-stage-color-attachments
fix(agc): count a pixel stage's colour attachments against maxPerStageResources
2026-10-10 09:25:20 +02:00
MarcZX100 9ffd06eab0 docs(shader): identify llvmpipe wrap regression version 2026-10-10 07:24:07 +00:00
MarcZX100 15673a94ea docs(shader): record unverified color compare wrap 2026-10-10 07:23:24 +00:00
Adrià b23bd7323f
Merge pull request #1831 from yabanana/fix/macos-descriptor-array-ranges
fix(agc): preserve descriptor array ranges in draw snapshots
2026-10-10 09:22:08 +02:00
Adrià 5596e5bd62
Merge pull request #1837 from EdouardSence/fix/agc-shader-header-copies
fix(agc): accept bound copies of a registered shader header that differ only in user_data
2026-10-10 09:20:19 +02:00
Adrià eba8525acb
Merge pull request #1924 from fisherjoey/fix/depth-bias-per-face
fix(agc): draw each face with its own depth bias
2026-10-10 09:19:03 +02:00
Sasha Papo f1c15c2cda docs: record the null vertex buffer V# as not measured on hardware
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 09:17:49 +02:00
Alex 6d1fe2b499 feat(shader): follow IEEE_MODE in f16 and f64 min and max
The f16 min/max/min3/max3/med3 now pick NaN results on the bits and
quiet a signaling NaN only with IEEE=1. With IEEE=0, v_min_f64 and
v_max_f64 return the other operand for a NaN, not a quieted NaN. This
completes #1826 for these forms, as measured on RDNA2 (gfx1036).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-10 09:16:09 +02:00
Adrià Franch b49ffef75a docs(technical-debt): record the /dev/random and /dev/urandom emulation 2026-10-10 09:13:07 +02:00
Adrià 97b985f157
Merge pull request #2046 from CouchRiv/fix-shader-mullit-flush
fix(shader): flush v_mullit_f32 denormals in the float modes that flush them
2026-10-10 09:13:07 +02:00
Adrià Franch aee2d25655 docs(debt): v_cubema no longer left to the driver
Its signaling NaN result is quieted with IEEE=1 by the cube sentence above.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-10 09:13:06 +02:00
Alex 2185d82522 fix(shader): quiet signaling NaN cube results in IEEE mode
With IEEE_MODE=1 the hardware quiets a signaling NaN that v_cubesc,
v_cubetc or v_cubema_f32 returns, keeping the sign the instruction gives
it; with IEEE=0 the bits pass through. Same rule as #1867, measured on
gfx1036 in both modes.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-10 09:13:00 +02:00
Adrià a86ffd3368
Merge pull request #1995 from lubaxe/feat/agc-store-pending-at-flip
feat(agc): store pending storage-image results at each flip with APS5_STORE_AT_FLIP
2026-10-10 09:12:46 +02:00
ah 5f6da63e4a
fix(shader): evaluate signed comparisons in SRT expressions
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RPEHi56pUMbT1X4VZwStm9
2026-10-10 02:08:12 -05:00
Daniele Giovane 1730b29c4a fix(agc): preserve descriptor array ranges in draw snapshots 2026-10-10 09:07:26 +02:00
EdouardSence cd1f76c831 fix(agc): accept bound copies of a registered shader header that differ only in user_data
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 09:06:48 +02:00
Adrià ca412953ea
Merge pull request #2042 from CouchRiv/fix-shader-pack-b32-f16-snan
fix(shader): quiet signaling NaN halves in v_pack_b32_f16 in IEEE mode
2026-10-10 09:05:54 +02:00
Adrià c8e266577a
Merge pull request #1934 from fisherjoey/fix/shader-ancillary-moved-word
fix(shader): carry a packed pixel ancillary through phis when every reader extracts a modelled field
2026-10-10 09:05:48 +02:00
Joey Fisher e0084a56b0 fix(agc): draw each face with its own depth bias
A draw that rasterizes both faces with different front and back depth
bias was rejected, since Vulkan has one depth bias per draw and the
cull mode is pipeline state. Such a draw is now recorded twice in the
same pass: front faces with the back faces culled and the front bias,
then back faces with the front faces culled and the back bias. A face
whose offset is disabled gets no bias.
2026-10-10 09:04:37 +02:00
Adrià 40a5b8fae9
Merge pull request #2142 from MathiasDevelopes/fix/videoout-overlay-bus-flips
fix(libSceVideoOut): overlay-bus flips no longer replace the main output
2026-10-10 09:01:37 +02:00
Adrià 6717a118ca
Merge pull request #2576 from adriadam10/fix/progress-empty-libs
fix(progress): link include-shared libraries and label empty ones
2026-10-10 09:00:44 +02:00
Adrià 3a1c79f387
Merge pull request #2219 from XairRrR/feat/agc-depth-clear-draws
feat(agc-driver): draw DB_RENDER_CONTROL depth clears
2026-10-10 08:59:33 +02:00