The shader cache paragraph named a format number that did not match
ShaderDiskCache::FormatVersion (48 against 56 on this branch). Name the
constant instead of repeating its value, so the text cannot go stale
when the version moves. The rejection of other formats and of other
compiler source versions is unchanged.
Apply review request from 2026-11-06.
Co-authored-by: MarcZX10 <[email protected]>
SpirvTarget::float16WidenNans and float16NarrowNans shape the emitted
SPIR-V, but the request serializer did not write them, so a request saved
on a device whose probe matched replayed with the emulated NaN rebuild.
Format version 54 writes both flags after the shader image minimum LOD flag;
versions 53 and older read them as false. agc_shader_replay's --f16-widen-nans
and --f16-narrow-nans still force them on.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01PHJtpJ4hw3KWJhobipK8ia
Native OpFConvert and UnpackHalf2x16 round and handle denormals as RDNA does
under RoundingModeRTE and DenormPreserve 16, but Vulkan leaves the NaN they
return to the driver, so every conversion rebuilds RDNA's NaN with integer
selects (about 55 words per f32 to f16 conversion, 29 per f16 to f32).
ProbeFloat16Conversions runs when the device is created: v_cvt_f32_f16 over
all 65,536 halves and v_cvt_f16_f32, v_cvt_pkrtz_f16_f32 and a round trip
over every NaN payload class, signalling NaNs, denormals, ties and overflow,
under four float modes, each compiled with the rebuilt NaN and with the
native result, inputs read from a buffer. SpirvTarget::float16WidenNans and
float16NarrowNans are set per direction only when every result matches; both
are in the recompile cache key. APS5_NO_NATIVE_F16_NANS skips the probe.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01PHJtpJ4hw3KWJhobipK8ia
With APS5_MIMALLOC set, libkernel restarts the title with
libmimalloc.so from libs/ first in LD_PRELOAD, as it does on macOS
with DYLD_INSERT_LIBRARIES. The macOS restart becomes one
implementation with platform pieces (MimallocRestart.cpp): on Linux
the executable is the target of /proc/self/exe and the arguments
those of /proc/self/cmdline. The restart is a priority 101
constructor, so it runs before libkernel's other initializers. It
gives the standard streams back from an ANYPS5_LOG_FILE copy before
execv, which also fixes the macOS restart under that variable, and
refuses a path the preload list cannot hold.
The build copies libmimalloc.so beside the libraries except in ASan
and TSan builds, the Linux release archives ship it, and the restart
tests run on Linux too, with a new case for ANYPS5_LOG_FILE.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015W3M6NbYpmwWkzkL8YNLaF
In registration form a vertex module decodes the V# stride, swizzle,
bounds mode and format of every vertex buffer load at run time. Vertex
artifacts are now emitted specialized, as one above
registrationWordLimit already was; pixel artifacts keep registration
form. A vertex stage's pre-rasterization library is built at its first
draw instead of at registration.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015W3M6NbYpmwWkzkL8YNLaF
Since #8697 every device with shaderDenormPreserveFloat32 and an independent
f32 denormal behaviour gets DenormPreserve 32. RADV on Vega (GCN 5, Mesa
26.0.8) miscompiles the preserving forms of the transcendental ops: its
v_log_f32 lowering picks the denormal scale with a v_cndmask_b32 that reads
two SGPRs, which GFX9 cannot do, so log2(2.0) is 25.0 in some lanes and
agc_driver_log_near_one, vop1_float_unary, fp16_overflow and
float16_result_modifiers fail.
ProbeFloat32DenormPreserve runs v_log_f32, v_sqrt_f32, v_rsq_f32, v_rcp_f32
and v_exp_f32 on normal values with and without the mode, after the flush
probe. The mode only changes denormal handling, but Vulkan does not require
these ops to be correctly rounded, so Float32ResultsAgree accepts each of
the 256 result pairs when they are no further apart than the width of the
interval the Vulkan precision bound allows around the exact result (sqrt's
bound inherited from 1.0 / inversesqrt(), an absolute 2^-21 for log2 inputs
in [0.5, 2.0]). When one falls outside, float32DenormPreserve
stays off and the device keeps its default f32 denormal handling.
The pipeline library paragraph listed per-face depth bias, split alternate
alpha blends, rect lists, geometry shaders and a stage without a variant id
as the pipelines created whole. libraryKeys in Pipeline.cpp also builds a
pipeline whole for barycentrics emulated through generated tessellation
stages, for tessellation on MoltenVK, for a pixel shader with a fragment
shader interlock or with its LDS array in a storage buffer, and for every
pipeline under APS5_PIPELINE_STATS=1, and it tests a stage's
RecompileResult::Identity rather than a variant id. The paragraph now lists
these cases and names libraryKeys.
AI-assisted: yes
Follows oneandonlydean's review: on Windows a converted app0 module is
put ahead of the host library only for imports that name its library,
so a bundled module serves those imports, not every NID it exports.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Follows rooklz's review. The bullet now covers Windows and Linux only,
says the Windows stub looks up by symbol name before NID, and states
that Windows searches the host libSceLibcInternal.prx and libc.prx
before the bundled libc.prx for libSceLibcInternal imports, skipping
its exports that only return zero.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
An import binds to the first module that exports its NID. The Windows
entry stub searches converted app0 modules before libs, and on Linux the
guest modules loaded at startup come before the host libraries in
DT_NEEDED. A title that ships libc.prx therefore runs its own libc for
the NIDs that module exports.
Co-Authored-By: Claude Opus 5.5 <[email protected]>