Commit Graph

901 Commits

Author SHA1 Message Date
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
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
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
Sasha Papo ef53b0614f feat(agc): store pending storage-image results at each flip with APS5_STORE_AT_FLIP
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 08:56:02 +02:00
Adrià Franch db491f0c7e docs(technical-debt): record that f32 tininess is detected after rounding on hardware
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-10 08:55:16 +02:00
Alex b64d413036 fix(shader): flush v_mullit_f32 denormals in the float modes that flush them
With f32 denormals flushed, as in the 0xc0 float mode titles use, the
hardware flushes all three v_mullit_f32 sources and its product like
v_mul_f32, so a positive denormal limit selects -FLT_MAX and a tiny
product gives zero. The recompiler kept denormals in every mode.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-10 08:55:16 +02:00
Adrià 40a7711a3e
Merge pull request #2229 from TheAggie/fix/agc-radv-htile-depth-clear
fix(agc): apply RADV's HTILE depth fast clears to the host depth surface
2026-10-10 08:54:11 +02:00
Alex e1f81abd85 fix(shader): quiet signaling NaN halves in v_pack_b32_f16 in IEEE mode
With IEEE_MODE=1 the hardware quiets each signaling NaN half that
v_pack_b32_f16 packs, after neg and abs; with IEEE=0 it copies the bits.
The recompiler always copied them. 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 08:52:03 +02:00
Adrià Franch 507f5707dc fix(progress): link include-shared libraries and label empty ones
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-10 08:49:58 +02:00
Adrià Franch 988394447a docs(TechnicalDebt): move the overlay bus line off the end of the section 2026-10-10 08:48:04 +02:00
MathiasDevelopes 85d1eb2e60 fix(libSceVideoOut): overlay-bus flips no longer replace the main output
A title that opens a main and an overlay port flips both, and every flip
was presented as a whole frame, so the window alternated between the two
buses: PPSA01736 shows its intro on the main bus and an empty overlay,
and the intro blinked black on every other frame. Overlay flips now
complete and signal their events without being shown. Compositing the
overlay over the main output is not implemented.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-10 08:48:03 +02:00
Adrià c20184aba7
Merge pull request #2162 from CouchRiv/fix-shader-fma-mix-f16-fused
fix(shader): round v_fma_mixlo_f16 and v_fma_mixhi_f16 once to f16
2026-10-10 08:46:56 +02:00
seven 5b9fdd111a fix(agc): count a pixel stage's colour attachments against maxPerStageResources
Vulkan counts the framebuffer colour attachments against maxPerStageResources
for the fragment stage. The draw's attachment count now seeds the fragment
stage's resource total in ShaderResources, so a pixel shader whose buffers and
images fit the limit but whose pipeline exceeds it throws instead of creating
an invalid pipeline. The draw resource cache key carries the attachment count,
so a cached build is never reused by a draw with more attachments.
2026-10-10 12:07:56 +05:30
Adrià Franch 1de9bbe7e4 docs(technical-debt): record the HTILE depth fast clear limits
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-10 08:37:16 +02:00
Adrià d43d50beb1
Merge pull request #2322 from jweidenh/codex/last-provoking-vertex
feat(agc): support last provoking vertex for native primitives
2026-10-10 08:36:55 +02:00
Alex 3a9da568fe fix(shader): round v_fma_mixlo_f16 and v_fma_mixhi_f16 once to f16
The f16 forms of v_fma_mix computed an f32 FMA and converted it to f16,
so a result that lands on an f16 tie after the f32 rounding was rounded
twice. RDNA2 rounds the exact product-sum once. They now use the exact
f64 path of v_interp_p2_f16 and flush f32 sources like v_fma_mix_f32.
They follow the f16 round and denormal fields on hardware, so another
f16 mode throws, as packed f16 does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 08:33:43 +02:00
XairRrR 295223f3eb feat(agc-driver): draw DB_RENDER_CONTROL depth clears
DEPTH_CLEAR_ENABLE (DB_RENDER_CONTROL bit 0, Mesa sid.h) makes the DB
write DB_DEPTH_CLEAR wherever the draw covers. Such a draw is now
rasterized as submitted with an always-passing depth write, no depth
bounds, no depth bias and the viewport depth range pinned to the clear
value, so it touches exactly the pixels the title's geometry covers.
Clearing a read-only or absent depth plane throws, at decode and in the
draw precheck. Depth and stencil clears combine; copy, resummarize and
decompress draws still throw.

Uncharted: Legacy of Thieves Collection (PPSA05684) clears with draws
that set DB_RENDER_CONTROL to 0x3 and stopped with "depth/stencil
clear, copy, resummarize or decompress draws (DB_RENDER_CONTROL) is
unsupported (register 0x0 = 0x00000003)".
2026-10-10 08:33:04 +02:00
Adrià 55a631bb4a
Merge pull request #1281 from SirDarky/fix/shader-mad-legacy-rounded-product
fix(shader): round the v_mad_legacy_f32 product before the add
2026-10-10 08:31:19 +02:00
Adrià 0aaadd6457
Merge pull request #1599 from andrey231/fix/storage-keep-baseline
fix(agc): store GPU results over CPU-stamped bytes the CPU left unchanged
2026-10-10 08:28:10 +02:00
Adrià 23ed501f4a
Merge pull request #1511 from cubersu/fix/libc-swprintf-wcsrtombs-utf16
fix(libc): format guest wide strings in swprintf as 16-bit units
2026-10-10 08:26:15 +02:00
jweidenh 3a8cf3a38b feat(agc): support last provoking vertex for native primitives 2026-10-10 08:26:14 +02:00
Adrià b5315f046d
Merge pull request #2381 from SleglJan/docs/shader-scalar-measurements
docs(shader): record the measured s_call_b64 and null s_swappc_b64 behaviour
2026-10-10 08:25:58 +02:00
Adrià 1a668689d6
Merge pull request #2133 from queeeef/fix/agc-3d-access-on-2d-texture
fix(shader): bind 2D textures to 3D sample and load accesses as measured
2026-10-10 08:25:22 +02:00
Adrià 530b6a4270
Merge pull request #2226 from EdouardSence/fix/agc-conservative-uncertainty-disabled
fix(agc): accept disabled conservative rasterization with uncertainty-region bits
2026-10-10 08:20:08 +02:00
Marcus 5377db48fd fix(shader): round the v_mad_legacy_f32 product before the add
VOP3 0x140 is v_mad_legacy_f32 on gfx10.1. Measured on gfx1010 (RX 5700
XT) in wave32 and wave64, IEEE 0 and 1 and f32 denormal modes 0 to 3, it
rounds the product before the add, flushes f32 denormal sources, product
and result in every mode, and gives a +0 product for a zero factor.

The translation multiplies, applies the zero rule and flushTinyProduct,
adds, and keeps the nanResultF32 wrapper. f32DenormalFlushFor returns 3
for the instruction before reading FLOAT_MODE. A sum of two zeros takes
its sign on the bits, as lavapipe returned -0 for +0 + -0. The execution
test pins the measured results and compares NaN bits exactly. RDNA2
(gfx1031), where the encoding is v_fma_legacy_f32 and fused, is noted in
TechnicalDebt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 08:18:55 +02:00
Adrià accf6bffc5
Merge pull request #2477 from itsbo5/feat/libScePad-bias-correction
feat(libScePad): implement scePadSetAngularVelocityBiasCorrectionState
2026-10-10 08:18:16 +02:00
Adrià 3064754c6a
Merge pull request #1547 from russhil/feat/shader-barycentric-emulation
feat(shader): emulate fragment barycentrics with a generated geometry stage
2026-10-10 08:15:00 +02:00
Adrià 40aeb97d57
Merge pull request #1152 from alfalfa-star/perf/linux-direct-memory-import-chunks
perf(agc): share one dma-buf import per 64 MiB of Linux direct memory
2026-10-10 08:14:40 +02:00
fisherjoey 79653e00be fix(shader): carry a packed pixel ancillary through a phi into field extracts 2026-10-10 00:14:18 -06:00