LEONIDA_QUICK_FIND_WINDOWS: RX 6800, two sessions from a new game (runs ab-02
and ab-03, LEONIDA_AB by turns of 4 s): the frame -2.4 and -0.9 ms median.
LEONIDA_PORT_DESCRIPTORS: the boat mission (run ab-04): the frame -3.4 ms
(+-1.4) median; the player saw no flicker and no black textures.
LEONIDA_AHEAD_SPLIT=1 records the list ahead of a frame as two lists at once,
the buffer views' pass on the line's thread and the textures' on one beside
it, sent in that order. On an RX 6800 (driver 32.0.21030.2001, runs ab-02 and
ab-03 by turns of 4 s) it cut the submitting thread's wait for that list
7.6 -> 4.7 ms but not the frame (-1.6 +-1.3 and +0.8 +-1.1 ms median), so it
stays off. LEONIDA_AB can switch it.
The views' pool (4 threads, 8 wide) looks at the heap's slots for the list
ahead of each frame, 6-10 ms of the 10-14 the submitting thread stood for;
the records' pool (6, 10 wide) is the round the submitting thread waited
5-7 ms a frame for at the end of a submission (RX 6800, runs ab-01/ab-02).
The wide count is made, and how many take part follows the switch, so
LEONIDA_AB can take them by turns. Off by default; LEONIDA_VIEW_THREADS
still sets one fixed count.
A raw twin of a buffer view that does not begin on 16 bytes was to be moved
there by move_raw. On an RX 6800 (driver 32.0.21030.2001) the CPU descriptor
handles hold host pointers, not hardware descriptors, so move_raw never
applied and every unaligned twin was made null: 165-726 a frame, and the
programs that read them (the vegetation's data) read zeros.
Now such a twin is made from the multiple of 16 before its view, and the
bytes it begins early by go in bits 24..27 of the slot's stride word
(VIEW_BIAS_MASK), which translated programs add to their offsets through the
table of strides. In gameplay: 0 null and up to about 1,100 biased a frame.
Whether the foliage flicker is gone is not yet confirmed by the player.
LEONIDA_TWIN_BIAS=0 makes them null as before (programs add a bias of 0).
Tests: twin_bias_tests (the bias read from the table of strides, accesses
through twins beginning where the view does) and, in listed_raw_tests, the
off-alignment readback with the bias and a dump of buffer view descriptor
bytes.
Reproduce the null SRV in cold and cached per-recording descriptors, and compare an aligned public D3D12 SRV/UAV pair with explicit offsets. Inspired by singlag 02c889ff.
- Indirect mesh dispatch records run as [X, 1, 1], as the console reads them (X alone). The terrain's tessellation
writes (X, 0, 0), which D3D12 drops: the near ground was in depth but missing from the G-buffer, black with white
specks on dirt and sand edges up close. The single clamp (indirect.rs), the batched one (indirect/batch.rs) and the
bench's (indirect/bench.rs); unfilled slots (X past 65,535) still run empty. From VIctory-NVIDIA 216bca9
(invismann), through voidopcode/vilocity 41bccf0 (GPL-3.0-or-later). Tests on WARP:
warp_window_leaves_unfilled_slots_empty_and_uncharged feeds (519, 0, 0); warp_batch_clamps_as_the_clamp_of_one_does
checks [X, 1, 1] for every mesh record; both pass.
- Launcher: the model emitters CS_Emit_Dynamic_Model_Skinned, _AttachMesh and CS_Emit_Dynamic_Model (particles from
a character's body) take the paired form (LEONIDA_PAIRED_FOR); translated alone none translates for 32-lane host
waves and all three do paired. After voidopcode/vilocity 324fe01, 4244b51.
- Launcher: the files of NVIDIA's shader cache a precompile writes are noted; if one is gone at the next start (the
cache emptied by hand, or a full one moved aside) the pipelines are made again instead of being compiled in the
game (runs d76, d96: up to 480 ms a frame waiting for pipelines).
- The line: "frames waited from the title's present to ours" each second (after vilocity c04fdd7): the latency the
line adds between the title and the screen.
- findings: the frame rate measured against the PC's own load (a restart brought back background programs: 17.3 ->
12.8 frames a second for one build); LEONIDA_WRITE_SITES measured on/off/off/on: faults -1,000 a frame, the frame
unchanged, left unset.
AI-assisted (Claude). Tested on an RTX 4060 Ti, driver 616.64, Ryzen 5 7600X, Windows 11 (Series X profile, 1440p).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Compile the synthetic shaders in depth_bounds_pipeline_loads_and_filters_draws
as vs_6_0/ps_6_0 and check device_supports_depth_bounds_sm60 so running
with LEONIDA_D3D12_WARP=1 on Windows 10 22H2 (WARP max SM 6.2) succeeds
cleanly.
Refs: #2570
AI-assisted.
- `--mono` draws white keys and discs with black symbols, as the PS5's own button prompts look.
- In that look the d-pad is the DualSense's: four separate arrow keys pointing at the middle,
the pressed ones white and the rest grey (all white for the plain d-pad and for all four).
- Mono sprites have no see-through bounding box behind them: when a menu highlights an option,
the title's colour change showed that box as a black halo around the glyph.
- tests: no box behind any glyph in the mono look, the d-pad's key colours, the mono movie builds.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Lower the standalone parallel depth-bounds regression test's synthetic
shaders from vs_6_5/ps_6_5 to vs_6_0/ps_6_0 so Windows 10 22H2 WARP
(max SM 6.2) supports them, gate each device independently on
DepthBoundsTestSupported + D3D_SHADER_MODEL_6_0, and deduplicate by
adapter LUID so skipping WARP never skips hardware coverage.
Refs: #2570
AI-assisted.
D3D12-ALIAS-CAST-R9G9B9E5
Wine's builtin d3dcompiler_47 ignores HLSL [RootSignature(...)] attributes,
causing CreateRootSignature from shader bytecode to fail with E_FAIL when
running alias_cast_tests without native d3dcompiler_47.
Remove [RootSignature(...)] from alias_cast_tests HLSL test shaders and
serialize each test root signature explicitly with D3D12SerializeRootSignature
(D3D_ROOT_SIGNATURE_VERSION_1) via serialize_root/compile_cs.
AI-assisted.
- Translator: with LEONIDA_NAN_SCRUB=1 the floats an image store writes keep an infinity, as on the console, and
only NaN becomes 0 there (LEONIDA_NAN_SCRUB_STORE_INF=0: held at 65504 as before). The water's plain transmission
volumetrics store an infinity for "no surface along this ray"; held at 65504 it was a surface 65 km off (a black
disc toward the sun). After voidopcode/vilocity 767369a (GPL-3.0). Colours a pixel program writes are held as
before. Test the_nan_scrub_keeps_the_integer_bits_an_image_store_writes (card and WARP) updated; it passes.
- Loader: dir64_relocations reads whole entries of a block only and no page whose entry's place passes 4 GiB
(after edsuuu/VI-BR-PORT df2b835d7); test a_malformed_relocation_block_gives_nothing.
- Textures: LEONIDA_TEXTURE_HASH_BACKOFF (off unless asked; by turns under LEONIDA_AB): a guarded texture whose last
4 looks behind the guard found it as it was takes one of every 16 of its turns (after kylepelham/El1xr d9fc89a4,
GPL-3.0). A frame hashed 38 to 40 MB of such textures and found 0.0 changes the guard had not seen (run d69).
Test a_quiet_texture_takes_one_turn_in_n.
- Diagnostics: a recorded frame's present time (frames-times.txt in the capture folder) and a log line when the
scripted keys change, for the time from a key to the first frame that shows it.
- findings: the busiest faulting stores are the kind LEONIDA_WRITE_SITES rewrites; its notes are keyed by the
executable's hash.
Four recorded tours with this build (runs d76, d77, d87, d96): no one-frame dark floor, no white flash; the plain
tour on a cleared driver cache (d96) has no one-frame glitch at all.
AI-assisted (Claude). Tested on an RTX 4060 Ti, driver 616.64, Ryzen 5 7600X, Windows 11 (Series X profile, 1440p).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When DepthBoundsTestEnable is true with DepthEnable and StencilEnable false,
Microsoft WARP bypasses the depth-stencil stage completely and passes
fragments even when the depth buffer value lies outside [MinDepthBounds,
MaxDepthBounds].
Normalize host D3D12_DEPTH_STENCIL_DESC1 in pipeline::host so pipelines with
DepthBoundsTestEnable && !DepthEnable and a non-UNKNOWN DSVFormat enable
DepthEnable with D3D12_COMPARISON_FUNC_ALWAYS and D3D12_DEPTH_WRITE_MASK_ZERO
(a mathematical no-op on depth comparison and writes, valid on read-only DSVs
as well), exclude depth-bounds passes from GraphicsState::screen_pass, and
isolate RTV/DSV descriptors and pre-cut clears in
depth_bounds_pipeline_loads_and_filters_draws alongside a 4-thread parallel
WARP + hardware regression test.
Refs: #2570
AI-assisted.
D3D12-ALIAS-CAST-R9G9B9E5
- Call flush_listed() in HostHeap::make_listed before overwriting a stale
views.slot(at) descriptor so deferred LISTED_COPIES (LEONIDA_BATCH_DESCRIPTORS=1)
from earlier slots complete before the scratch slot is rewritten or nulled.
- Check TEST_ALIAS_CAST in alias_cast_create() so alias GPU tests stay hermetic
when LEONIDA_ALIAS_CAST=0 is set in the environment.
- Add D3D12 debug-layer GPU test covering queued make_listed copies across
mid-table VA replacement under batch_descriptors().
AI-assisted.
D3D12-ALIAS-CAST-R9G9B9E5
Merge origin/main and extend R32_UINT/R32_SINT -> R9G9B9E5_SHAREDEXP
relaxed format casting across both ID3D12Device10::CreateCommittedResource3
and ID3D12Device10::CreatePlacedResource2 (pool::texture_with_cast + ID3D12Device12
GetResourceAllocationInfo3) using D3D12_BARRIER_LAYOUT_COMMON and
&[DXGI_FORMAT_R9G9B9E5_SHAREDEXP] while keeping legacy D3D12_RESOURCE_STATES
transitions everywhere and leaving host.rs untouched.
Fold view_cast_serial into draw::entry_once keys and add D3D12 debug-layer
GPU tests covering both committed and placed 2D, 2D-array, and 3D R32_UINT
textures written via UAV and sampled in place as R9G9B9E5_SHAREDEXP.
AI-assisted.
In Gen.buffer_address (tools/rdna2spirv.py), emit
`OpShiftRightLogical %ulong wide %c64_32` followed by
`OpIEqual %bool hi_w %cl0` instead of
`OpULessThanEqual %bool wide %clffffffff`.
NVIDIA 580.82.07 NVVM aborts pipeline creation (`NVVM compilation failed: 3`,
VkResult -13) on the unsigned 64-bit compare when a literal V# folds `wide`
to `0 + idx * stride` (reported and A/B-tested on L4 by @kevincommits in
ubiquitarianism/leonida#1608#issuecomment-7208330785). Over uint64,
`(wide >> 32) == 0` is mathematically identical to `wide <= 0xFFFFFFFF`.
Since lower_addr64 (SHADER-423), the 64-bit compare still reaches the driver
with --int64-addresses, and by default in any module the lowering leaves in
its Int64 form (a 64-bit scalar op such as s_lshl_b64 elsewhere in the
shader). Where the lowering does apply, the new form lowers to a high-word
`== 0` test, without the pair compare's redundant low-word
`<= 0xFFFFFFFF` term.
tests/semantic/test_buffer_offset_wrap.py runs every access (including the
exact 32-bit boundary cases: `0xFFFFFFFC` dword, `0xFFFFFFFF` byte vs
`0x1_0000_0000`) three ways: lowered (default), --int64-addresses, and
default with Int64 kept. It checks that no compare with the 32-bit limit is
emitted in any of them (raw and after spirv_opt.optimize), that the Int64
forms test `(wide >> 32) == 0`, and that the modules pass spirv-val when it
is on PATH.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Measured 2026-11-29 by HTTP against the public docs.xbox.com index and
Microsoft Learn; page contents not read, nothing copied from the GDK.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
- play-nvidia.ps1: LEONIDA_THIN_THREADS=6. Two of eight list threads parked by turns of 4 s (LEONIDA_THIN_PARK),
standing at one save, two runs: the frame's median -0.83 +-0.16 ms (d69) and -0.94 +-0.52 (d73), the
submitting thread -0.49 +-0.12 and -0.74 +-0.62.
- findings: the fault handler is entered 2,400 to 2,950 times a frame, of which some 2,000 are single stores done
beside the guards, most of them storing what the memory already holds; the loader's rewrite of such places
(LEONIDA_WRITE_SITES) is not set by the launcher and is the next thing to measure.
- findings: the copies behind aliased views could go with relaxed format casting (driver 616.64 has it).
AI-assisted (Claude). Tested on an RTX 4060 Ti, driver 616.64, Ryzen 5 7600X, Windows 11 (Series X profile, 1440p).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#778 filled the sample-locations grids from 1 sample upwards, so every 1x depth-stencil image was created
sample-locations compatible and carried sample locations through its transitions. D3D12 only has programmable
sample positions for multisampled targets; since #778 the world phase loses the device on an RTX 5080. Keep 1 sample
out (SamplePositions::programmable_count): 1x depth images are plain again, MSAA keeps the feature.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gt9hwPPpwX5RYWwXCnj43U