#984 builds compute pipelines lazily and queues every one for a warm-up on a worker thread; a queued job holds its PipelineState, and through it the device, until the worker has run it. A test that releases everything and then reads rt::d3d12_xs::device_proxy_ref_count races with that worker: d3d12_fspx_compute fails at 'device_proxy_ref_count == 1' on #984's head, and on the merge d3d12_compute fails the same way on llvmpipe (main's case there creates pipelines it never dispatches, which only the warm-up ever builds). Both pass on main.
The warm-up stays as it is. device_proxy_ref_count, a helper only the tests call, now lets the layer under the proxy finish such work first: the Vulkan device registers PipelineCompiler::wait_idle through set_reference_settler, and the pool reports itself idle when no job is queued or running. The tests are unchanged.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
#984 carries the probes its author followed a frame of the retail title with, marked LOCAL DIAGNOSTIC and in places 'not for upstream'. Several wrote to stderr with no switch from paths that run for every draw: record_draw (a mutex, a set lookup and up to a dozen lines per draw), ClearRenderTargetView, the submission's table dump, PresentX (present_diag and the plane dump), the presenter's path line, the heap and CopyDescriptorsSimple lines of the device proxy, the per-view CBV and SRV lines, the per-pipeline description string and the console-heap census.
They stay, for the next person who has to follow a frame, behind one switch: LEONIDA_LOCAL_DIAGNOSTICS=1 (runtime/src/local_diagnostics.h, a row in runtime/README.md). Unset, none of them runs. Not changed: the diagnostics that already had a switch of their own (LEONIDA_CAPTURE_SOURCE, LEONIDA_MEM_PROBE, LEONIDA_XG_TRACE, --trace) and the replay's unresolved/unsupported lines, which report a dropped draw or list at the 1st, 2nd, 4th... occurrence.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
#984's new slot 25 case first checks that the PC device refuses a depth-stencil texture with unordered access. Microsoft's runtime (WARP) does; Wine's vkd3d sizes the texture without validating the flag pair, so under Wine device_proxy and device_proxy_trace failed at that line (on #984's head as well as on the merge; both pass on main, which has no such case). The control now runs only where the host is Microsoft's, the way the other host comparisons do it (host_wine.h). The checks of the proxy itself are unchanged and run everywhere.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
RDNA2 ignores the VOP3 output modifier of the f64 VALU arithmetic and rounding
ops while f64 denormals are kept, which is the MODE this translator models. I
measured it with tools/hw_oracle raw kernels on a gfx1036 iGPU (the Radeon
iGPU of a Ryzen 7 7800X3D, Windows driver 31.0.24002.92, code object v5),
wave32 and wave64 identical, over the four combinations of MODE.IEEE and
denorm_mode_16_64. mul:2 / mul:4 / div:2 changed nothing for v_add_f64,
v_rcp_f64, v_rsq_f64, v_sqrt_f64, v_trunc_f64, v_ceil_f64, v_floor_f64 and
v_rndne_f64 while f64 denormals were kept, applied only with MODE.IEEE off and
the denormals flushed, and clamp applied in every one of those runs. The two
f64 call sites that still forwarded a full modifier list now hand
clamp_mods_f64 only the clamp they act on, and the rows that described the
scaling for those ops are corrected to what the hardware does.
This is SHADER-721, the binary64 counterpart of the f16 omod row (#4542,
"an f16 destination ignores omod"). The row for v_add_f64 records the sweep and
how it was confirmed and keeps the LLVM VOP3 citation main already had; the
rcp/rsq/sqrt and rounding rows keep the measurements others contributed (the
v_sqrt_f64 ulp errors, @timelery's sweep of the four rounding ops) and only
change the sentence about the omod. One contradiction is removed on the way:
main's rounding row said the translator applies the modifiers "as those rows
do" while the code applied them to ops whose own row says they are ignored.
Ops with their own rows are left exactly as they are - v_cvt_f64_i32/u32,
v_cvt_f32_f64, v_frexp_mant_f64, v_div_fixup_f64 and v_ldexp_f64 keep what
their rows measure. The same rule probably reaches the first three as well, and
tests/semantic/test_alu_ldexp_f64.py already knows it for ldexp; I raised that
in #5256 as a finding instead of folding unmeasured ops into this change.
Counted over the whole corpus, not a sample: 216 v_add_f64 in 5 of the 26,503
listings, none carrying an omod or a clamp, and no f64 mnemonic in the corpus
carries one, so no game shader changes behaviour here. The two translated
fixtures that do carry a modifier move to the unmodified result, which is what
the sweep predicts: cs_f64_add now reads 0x0 0x3ff40000.
Expectations follow the rule in tests/semantic/test_valu_add_f64.py,
tests/semantic/test_f64_round.py, tests/test_f64_output_modifiers.py,
tests/test_f64_transcendentals.py and the two fixtures with their runners.
tools/f64_diff.py keeps its f64-omod case as a known divergence and
tests/test_f64_diff.py now expects it to mismatch the ISA reference rather than
match it: the reference applies the omod the ISA text describes, the translator
no longer emits it, and that case is the one MODE in which the hardware does
apply it. ps_f64_mods, cs_f64_add and ps_f64_round pass on an NVIDIA RTX 4090
(driver 32.0.16.2124) and on the gfx1036 iGPU above, 3/3 on both; cs_f64_add
reads the same words on Intel UHD 630 / Mesa ANV at this head (@gertify).
tests/test_docs_env_vars.py fails when the runtime reads a LEONIDA_* variable that no document names; #984 brings 32 of them (the test fails on its head too). Each is described in a new table in runtime/README.md, from the code that reads it: the default, what the switch changes, and which ones are diagnostics only. None is removed: every one is behind its own switch already and off, or the default path of the retail boot.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The merge kept main's form of device slot 81 (GetFrameStatisticsX: an attached presentation answers first) and with it main's answer when nothing is attached, S_FALSE with a zero count. No retail run has been through that answer: it is a reading of the public samples. #984, the tree that was measured to boot through the story load, answers the same call with S_OK and a zero count, and E_POINTER for a null count or for a count above zero with no array (its GetFrameEventsX handler). Nothing attaches a presentation in gta6rt, so this is the answer the title gets.
main's structure stays (the configurable route, the logged name, the handler first); only the answer without a handler is #984's. Both forms write the count through the third argument, so the two do not disagree about the layout. The mock tests (env-slots-invalid, check_presentation_wiring), the header comment and the row in docs/d3d12_vulkan.md say the same.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
#984 lists the generated m15 shader files as sources of two targets, d3d12_translated_draw_test and its new d3d12_rect_list_test. With a Makefile generator each target then runs the translation command itself; under a parallel build both ran at once, each removing the folder the other was writing, and the build stopped with 'Translation did not produce validated SPIR-V for: vs_m15, ps_m15' (seen in the clang-cl build of the merge; it is a race, so #984's head happened to build). d3d12_rect_list_test now depends on d3d12_translated_draw_test for the files, as tiny_guest_draw does.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
#984 adds pso_stream_test under BUILD_TESTING, outside the Windows block. It includes d3d12.h and takes MSVC options, so the portable configure on Linux and macOS failed to compile it (c++: cannot specify -o with -c and multiple files). Define it only when gta6rt is built, like the other proxy tests.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
main's failed-resize case (a3090aab2) builds a VulkanSwapchain with eight arguments; #984 gave the constructor a ninth, DeviceFaultDiagnostics*, with no default. Pass nullptr, as #984's own case in this file does.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Merges main at 1154976d4 into the integration branch at 273b3bdf9 (merge base ece4ba5b3). 42 files conflicted;
this commit is the resolution only. Build and test repairs follow in their own commits.
Rule of resolution: where both sides added different things, both stay; where both made the same change in two
forms, main's reviewed form stays and whatever #984's form did in addition is carried into it; where the two
changed the same code for different purposes, both purposes are kept.
Xbox proxy code (runtime/shims/d3d12_xs_device.cpp, d3d12_xs_device.h, d3d12_xs.cpp, d3d12_xs_alloc_size.h,
d3d12_xs_desc_clean.h, registry.cpp):
- d3d12_xs_device.cpp is #984's file with main's differing pieces ported in: env_slot and the configurable device
routes, XboxQueueSlotRoutes, PresentationHandler / set_presentation_handler, the console caller rule for device
slots 61 and 74 (#383, #385), route_xbox_device_slot, slot 81 as GetFrameStatisticsX, create_host_device, the
console-form rule for slots 25 and 56, the console list IID of #359, and the forms of queue slot 18 (#403) and
list slot 139 (#396).
- Kept from #984: the list proxy with handle translation, queue slots 16/17 as Signal/Wait, the fence's
completed-value mirror, the shared FrameTokenSource, PresentX through queue_present_x when no handler is
attached (slot 30, or 32 on a queue detected as the newer layout), slots 27/53/55/57/70/71/133, the wider
pc_resource_desc, S_OK for queue slots past the PC table.
- Dropped: #984's GetFrameEventsX and LEONIDA_XS_FRAME_EVENTS_SLOT, its second-word rule for slot 61, its
undetected-layout rule for queue slot 18, its list IID mapping to GraphicsCommandList6; main's copy of the base
list proxy, its null-view slot 70 and its refusing slot 133.
Proxy tests (runtime/test/xs_proxy_mock_test.cpp, device_proxy_test.cpp, queue_proxy_test.cpp):
- Checks of both sides, each run once; main's forms of the render-target size and layout checks with #984's extra
cases added; main's --env-slots-74 and #984's --env-slots-70.
- Adapted to the merged code: the queue tail answers S_OK, slot 73 answers an unknown IID with the list proxy,
the queue slot 18 case installs a console caller. Dropped: #984's slot 81 GetFrameEventsX cases.
D3D12/Vulkan layer (runtime/shims/d3d12_com.cpp, d3d12_vulkan_device.cpp, runtime/src/command_list.h,
frame_pacer.h, shader_library.h, vulkan_backend.h, vulkan_replay.h, runtime/test/command_list_test.cpp,
d3d12_close_parity_test.cpp, d3d12_execute_indirect_validation_test.cpp, replay_texture_barrier_test.cpp,
vk_pipeline_check.cpp, vk_test_device.h):
- Resource::create_texture: #984's title images (deferred placed, pending streamed, title pool) and main's
ordinary textures (#1413 shared blocks, #1364 staging fallback) are exclusive branches chosen by the texture's
origin, so both pools run on disjoint sets of textures.
- frame_pacer.h is main's pacer (#402) with #984's FrameTokenSource as the token counter.
- main's forms kept for ExecuteIndirect (#1066, #377), the barrier into LAYOUT_UNDEFINED (#1055), the B4G4R4A4
stand-in, per-face stencil masks, the unaligned tile staging (#528) and the device-lost flag (#980).
- shader_library.h: main's block inflate; #984's `bulk` parameter now defaults to true so main's callers keep it.
- Dropped: #984's B8G8R8A8 stand-in for B4G4R4A4 targets, its refusal of separate stencil masks, its zero-count
refusal in ExecuteIndirect, its wider UNDEFINED -> UNDEFINED release and the test case for it.
Other shims (runtime/shims/dstorage.cpp, file_system.cpp, gameinput.cpp, xgameruntime_offline.cpp,
runtime/test/xgameruntime_offline_test.cpp, xmem_test.cpp):
- ReadFile and DirectStorage reads: #984's pinned kernel_writes read, then main's touch_pages retry on
ERROR_NOACCESS. main's rt::fs::read_file is folded into #984's read_file.
- gameinput: main's strict LEONIDA_INPUT_SCRIPT parser with #984's rsup/rsdown entries.
- Speech synthesis: main's one silent voice and handle checks; #984's accept-anything form dropped.
Build, tools, docs (runtime/CMakeLists.txt, runtime/cmake/translator_deps.cmake, scripts/build_runtime.ps1,
make_game.py, tools/rdna2spirv.py, shader_disasm.py, shader_ir.py, shader_library.py,
runtime/test/shaders/cs_imgload_tfe.asm, cs_imgload_d16_tfe.asm, docs/README.md, boot.md, d3d12_vulkan.md,
runtime/README.md):
- Unions of the test, target and source lists; spirv_loop_guard.py added to translator_deps.cmake.
- rdna2spirv.py: main's DPP compare rule (#957), SMEM vcc base (#647) and widen_wave64_masks (#1021); #984's
restore_skipped_instructions and restore_dot4_inline_sel. #984's duplicate widen_wave64_valu_masks dropped.
- shader_disasm.py and shader_ir.py: main's structure with #984's one-line-per-dword llvm-mc input and wave flags.
- shader_library.py: main's structure with #984's --compute-hashes and per-state compute variants.
One file that did not conflict is changed here: tools/rdna2_decode.py. Git kept both sides' decoders for a VOPC
compare with a DPP operand, and #984's narrower one shadowed main's; it is main's file again.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Merging.
**Why merged:** TEST-PIPELINE-LIBRARY-HOST-ADAPTER, test-only: prints which host D3D12 adapter was actually used, so host-comparison results can be tied to a GPU. This was the first independent Windows build; KernelSmoker's review was static.
**Why it's good:** d3d12_pipeline_library and _host pass both plain and under validation, and print "host D3D12 adapter: NVIDIA GeForce RTX 4070 SUPER".
Tested on Windows 11 / RTX 4070 SUPER (NVIDIA 621.24), VS 2022 + Ninja RelWithDebInfo, Vulkan SDK 1.4.363.0. Merged alone onto main 0f98d193c, its ctests pass both plain and with LEONIDA_VK_VALIDATION=1. Cumulative with the rest of this batch on main 507029d1e: the repo-consistency set gives 578 passed / 5 skipped / 0 failed, compileall is clean, and full ctest is 317/318 with the usual 11 skips; the only failure is main's pre-existing d3d12_depth_resolve. All d3d12_* tests under validation: 119/120 with 0 VUIDs. The semantic suite has only the known environment-only failure. git merge-tree against current main 9c5e70661: no conflicts. Security read of the three-dot diff: no binaries, game data, downloads, network calls or CI changes.
AI-assisted (Claude Code, Claude Opus 5.5).
Merging.
**Why merged:** D3D-COPY-TIMESTAMP-CAPS: timestamp bits are tracked per queue family, and transfer-only families count as 0 bits because they can't reset or resolve queries. This was the first native Windows run of the fixed head; madhyn's Wine run was on an older head, and KernelSmoker ran vk_queue on Linux. Behaviour change: OPTIONS3.CopyQueueTimestampQueriesSupported can now be TRUE, and a copy queue that gets a transfer-only family returns E_FAIL from GetTimestampFrequency and GetClockCalibration instead of borrowing the graphics family's bits.
**Why it's good:** d3d12_vulkan_device, d3d12_query_rules, vk_queue, vk_queue_query_sync and vk_queue_constructor_oom: 5/5 both plain and under validation on the 4070 SUPER.
Tested on Windows 11 / RTX 4070 SUPER (NVIDIA 621.24), VS 2022 + Ninja RelWithDebInfo, Vulkan SDK 1.4.363.0. Merged alone onto main 0f98d193c, its ctests pass both plain and with LEONIDA_VK_VALIDATION=1. Cumulative with the rest of this batch on main 507029d1e: the repo-consistency set gives 578 passed / 5 skipped / 0 failed, compileall is clean, and full ctest is 317/318 with the usual 11 skips; the only failure is main's pre-existing d3d12_depth_resolve. All d3d12_* tests under validation: 119/120 with 0 VUIDs. The semantic suite has only the known environment-only failure. git merge-tree against current main 9c5e70661: no conflicts. Security read of the three-dot diff: no binaries, game data, downloads, network calls or CI changes.
AI-assisted (Claude Code, Claude Opus 5.5).
Merging.
**Why merged:** RT-INFLATE-MATCH-COPY: the inflater copies repeated matches in blocks (doubling memcpy that only reads finished output; distance at least 1 and bounds-checked) and reduces Adler-32 every 5552 bytes (the standard NMAX). sodove measured it 8-14x faster, and whoalin1's host tests pass.
**Why it's good:** shader_library, startup_trace, dstorage and d3d12_pipeline_library* pass both plain and under validation; shader_library_corpus is skipped, the same as on main.
Tested on Windows 11 / RTX 4070 SUPER (NVIDIA 621.24), VS 2022 + Ninja RelWithDebInfo, Vulkan SDK 1.4.363.0. Merged alone onto main 0f98d193c, its ctests pass both plain and with LEONIDA_VK_VALIDATION=1. Cumulative with the rest of this batch on main 507029d1e: the repo-consistency set gives 578 passed / 5 skipped / 0 failed, compileall is clean, and full ctest is 317/318 with the usual 11 skips; the only failure is main's pre-existing d3d12_depth_resolve. All d3d12_* tests under validation: 119/120 with 0 VUIDs. The semantic suite has only the known environment-only failure. git merge-tree against current main 9c5e70661: no conflicts. Security read of the three-dot diff: no binaries, game data, downloads, network calls or CI changes.
AI-assisted (Claude Code, Claude Opus 5.5).
Merging.
**Why merged:** RT-STREAM-TRANSFER-BARRIER: a transfer-write → transfer-read/write barrier goes before every vkCmdCopyBuffer, so back-to-back streamed copies are ordered. moffington measured SyncVal at 10 errors on the base and 0 on the head. Plaaasma (4070 Ti), iFeyz (RX 9070 XT) and whoalin1 (gfx1035) passed it. LEONIDA_ORDER_BUFFER_COPIES=0 turns it off (documented in docs/d3d12_vulkan.md).
**Why it's good:** replay_*, vk_bc_zero_init, vk_queue* and d3d12_close_parity: 16/16 both plain and under validation. A negative control on the cumulative build checked that the test really catches a missing barrier: with the barrier on, `--expect-unordered` fails; with the env var at 0, the ordered check fails and `--expect-unordered` passes. It also passes on top of #1055's vulkan_replay.h change. It adds one barrier per buffer copy, a small sync-policy cost with an opt-out.
Tested on Windows 11 / RTX 4070 SUPER (NVIDIA 621.24), VS 2022 + Ninja RelWithDebInfo, Vulkan SDK 1.4.363.0. Merged alone onto main 0f98d193c, its ctests pass both plain and with LEONIDA_VK_VALIDATION=1. Cumulative with the rest of this batch on main 507029d1e: the repo-consistency set gives 578 passed / 5 skipped / 0 failed, compileall is clean, and full ctest is 317/318 with the usual 11 skips; the only failure is main's pre-existing d3d12_depth_resolve. All d3d12_* tests under validation: 119/120 with 0 VUIDs. The semantic suite has only the known environment-only failure. git merge-tree against current main 9c5e70661: no conflicts. Security read of the three-dot diff: no binaries, game data, downloads, network calls or CI changes.
AI-assisted (Claude Code, Claude Opus 5.5).
Merging.
**Why merged:** VK-ZERO-INIT-FILL-ALIGN: zero_compressed_image aligns the fill to max(4, fmt.bytes) and rounds the usable size down, so vkCmdFillBuffer's offset and size are 4-aligned. That also makes the copy offset 4-aligned on transfer queues, which closes the VUID-07737 gap noted on #434. kawaii-shakal (ASan mock) and Sangonapou (RTX 3080 Ti) checked it.
**Why it's good:** vk_bc_zero_init, vk_queue and the replay_* tests: 12/12 both plain and under validation.
Tested on Windows 11 / RTX 4070 SUPER (NVIDIA 621.24), VS 2022 + Ninja RelWithDebInfo, Vulkan SDK 1.4.363.0. Merged alone onto main 0f98d193c, its ctests pass both plain and with LEONIDA_VK_VALIDATION=1. Cumulative with the rest of this batch on main 507029d1e: the repo-consistency set gives 578 passed / 5 skipped / 0 failed, compileall is clean, and full ctest is 317/318 with the usual 11 skips; the only failure is main's pre-existing d3d12_depth_resolve. All d3d12_* tests under validation: 119/120 with 0 VUIDs. The semantic suite has only the known environment-only failure. git merge-tree against current main 9c5e70661: no conflicts. Security read of the three-dot diff: no binaries, game data, downloads, network calls or CI changes.
AI-assisted (Claude Code, Claude Opus 5.5).
Merging.
**Why merged:** RT-DEVICE-LOST-LOG: when the device is lost, the layer prints one stderr line per device. An atomic exchange keeps the context path and the dispatcher path from both printing. KernelSmoker approved it (llvmpipe and RTX 3090).
**Why it's good:** vk_fence_dispatcher_sync, vk_queue and vk_queue_query_sync pass both plain and under validation.
Tested on Windows 11 / RTX 4070 SUPER (NVIDIA 621.24), VS 2022 + Ninja RelWithDebInfo, Vulkan SDK 1.4.363.0. Merged alone onto main 0f98d193c, its ctests pass both plain and with LEONIDA_VK_VALIDATION=1. Cumulative with the rest of this batch on main 507029d1e: the repo-consistency set gives 578 passed / 5 skipped / 0 failed, compileall is clean, and full ctest is 317/318 with the usual 11 skips; the only failure is main's pre-existing d3d12_depth_resolve. All d3d12_* tests under validation: 119/120 with 0 VUIDs. The semantic suite has only the known environment-only failure. git merge-tree against current main 9c5e70661: no conflicts. Security read of the three-dot diff: no binaries, game data, downloads, network calls or CI changes.
AI-assisted (Claude Code, Claude Opus 5.5).
xdxr_build_check had no TIMEOUT, so the `ctest --timeout 120` that
docs/testing.md suggests applied to it, and a slower host scores a Timeout
(212 s measured on a 4 GB Pascal card). A per-test TIMEOUT takes precedence
over --timeout, as for d3d12_queue_handover.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014sDZDAAcsauTL6d8ie67Qo
Merged on top of the merge made for #396 (main 507029d1e plus RT-QUEUE35,
RT-ALLOC9 and RT-LIST139). No conflicts.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Merged on top of the merge made for #395 (main 507029d1e plus RT-QUEUE35
and RT-ALLOC9). No conflicts.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Merged on top of the merge made for #391 (main 507029d1e plus RT-QUEUE35).
One conflict, in docs/d3d12_vulkan.md: both sides added a row at the same
place of the Xbox-only table. Both are kept: this branch's
"Command-allocator slot 9" row, then main's "Device slot 81, queue
PresentX/SuspendX/ResumeX" row. The code and the tests merged without
conflicts.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Two files conflicted; in each, both sides had added something at the same
place and both are kept.
runtime/shims/d3d12_xs_device.cpp: this branch's
queue_execute_command_lists() next to main's XboxQueueSlotRoutes and
xbox_queue_slot_routes() (the PresentX, SuspendX and ResumeX routes).
runtime/test/xs_proxy_mock_test.cpp: main() runs check_xbox_queue_slots()
and then check_presentation_wiring().
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Conflict in docs/design.md: this branch rewords the "Wave64 graphics: partition invariance
(SHADER-10)" row; main left that row as it was and added the SHADER-W64-WQM-UVOTE row after it.
Kept this branch's SHADER-10 row and main's new row below it. runtime/test/shaders/w64_graphics.py
merged without conflicts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conflict in docs/boot.md, the --overlay switch: main now says the overlay defaults to
<game-dir>\overlay and the package is never written; this branch adds the per-process T: folder
inside the overlay. Kept main's sentence and appended the T: text after it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every committed and placed texture made its own vkAllocateMemory and
released it with its own vkFreeMemory, about 100 us and 200 us on an
RTX 3080. Small device-local textures now take ranges of 64 MiB blocks
(runtime/src/image_memory.h). Render targets, depth buffers, CPU-visible
textures and textures over an eighth of a block keep their own
allocation. A range goes back to its block through the deferred
deletion queue, and a texture in a reused range is zeroed before a
shader reads it.
Tests: image_memory (CPU) and d3d12_texture_memory (GPU).
Three files conflicted; in each, both sides had added something and both
are kept.
runtime/shims/d3d12_xs_device.cpp: this branch still had the Xbox device
slot routes inline, followed by its fixed handlers for slots 86, 101 and
108; main has since moved the same six routes into
route_xbox_device_slot() (#385). The generic path now calls the helper and
then the three fixed handlers, so a configured route still wins over
them, as this branch's second commit intends. device_slot_overridden()
has main's list plus 86, 101 and 108.
runtime/shims/d3d12_xs_device.h: the comment lists both sides' slots.
runtime/test/xs_proxy_mock_test.cpp: the mock device keeps main's case 13
(CheckFeatureSupport) and this branch's case 68
(GetResourceAllocationInfo2); check_xbox_slots keeps main's slot 41 and 61
cases, one combined list of handled slots, and this branch's slot 86, 101
and 108 cases.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Merging.
**Why merged:** GPU-PIN-EXIT-STATUS: in check.py and run_gpu_tests, a helper that exits non-zero is always a failure, never a subgroup-pin SKIP, so a crashing helper can't hide as a skip. KernelSmoker approved it after an RTX 3090 GPU run, and the author compared it against #125.
**Why it's good:** run_gpu_tests, shader_checks and run_gpu_tests_paths: 177 passed.
Tested on Windows 11 / RTX 4070 SUPER: merged alone onto main 0f98d193c. With it in, the repo-consistency set (cmake/translator-deps, shader_stage_resume, runtime_paths, docs, make_game, no-game-data, run_semantic_tests, ctest_registration) gives 578 passed / 5 skipped / 0 failed, and check_no_game_data on the changed files is clean. git merge-tree against current main: no conflicts. Security read of the three-dot diff: no binaries, game data, downloads, network calls or CI changes.
AI-assisted (Claude Code, Claude Opus 5.5).
Takes the updated head of #1034's branch, which holds main 6558d5318 (#1012, GPU-CMP-F64, is merged there). Git merged
it without conflicts (git merge-tree, exit 0), and the tree is the one a direct merge of main gives. GitHub had
reported a conflict since #1012 merged, with the branch and main on two merge bases (68d1331e5 and 50407827c). Merging
#1034's head instead of main leaves this branch with one merge base with main when #1034 merges.
The merged tree was tested before the push: every standalone test file under tests/ passes except
tests/test_ci_registration.py, which fails on main 6558d5318 alone (#1365 fixes it).
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Takes the updated head of #1034's branch, which holds main 6558d5318 (#1012, GPU-CMP-F64, is merged there). Git merged
it without conflicts (git merge-tree, exit 0), and the tree is the one a direct merge of main gives. GitHub had
reported a conflict since #1012 merged, with the branch and main on two merge bases (68d1331e5 and 50407827c). Merging
#1034's head instead of main leaves this branch with one merge base with main when #1034 merges.
The merged tree was tested before the push: every standalone test file under tests/ passes except
tests/test_ci_registration.py, which fails on main 6558d5318 alone (#1365 fixes it).
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Brings the branch up to date with main 6558d5318, which now holds #1012 (GPU-CMP-F64), the pull request this one was
stacked on. Git merged it without conflicts (git merge-tree, exit 0). GitHub had reported a conflict since #1012
merged, with the branch and main on two merge bases (68d1331e5 and 50407827c); main is an ancestor of this commit.
The merged tree was tested before the push: every standalone test file under tests/ passes except
tests/test_ci_registration.py, which fails on main 6558d5318 alone (#1365 fixes it).
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Three files conflicted; in each, both sides had added something and both
are kept.
runtime/shims/d3d12_xs_device.cpp: this branch moved the Xbox device slot
routes into route_xbox_device_slot(), which slot 74's handler asks first,
while main added a sixth route to the inline chain: GetFrameStatisticsX
(routes.frame_statistics, slot 81), answered by the presentation handler
or with S_FALSE and a zero count. The helper is kept and that route is
moved into it unchanged, between wait_event and queue_x as on main.
runtime/test/xs_proxy_mock_test.cpp: run_env_slots keeps this branch's
on_slot74 parameter next to main's EnvPresenter struct, and main() runs
check_slot74() and then check_presentation_wiring().
docs/d3d12_vulkan.md: both table rows, in slot order (74, then 81).
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
One conflict, in docs/d3d12_vulkan.md: both sides added a row to the same
table. Both are kept, in slot order: this branch's "Device slot 61" row,
then main's "Device slot 81, queue PresentX/SuspendX/ResumeX" row.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
main now holds #1021 (SHADER-W64-SDST-PAIR), which this branch was stacked on. No conflict by hand: the
TEST-W64-SDST-PAIR-GPU row stays right under #1021's row in docs/design.md.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Merging.
**Why merged:** RT-TITLE-MEMORY-CAP: `LEONIDA_TITLE_MEMORY_MB` (MiB, clamped to 2048..65536) overrides what `XSystemGetAppMemoryUsageLimit` and `XMemGetWorkingSetStatistics` report. I held this earlier for one reason: the env var wasn't documented, so `test_docs_env_vars` failed. The author fixed that in 6cb16a4fa (runtime/README.md overrides table). Kokonotcu's idea of a different default budget was accepted as a follow-up.
**Why it's good:** the env read is bounded: `GetEnvironmentVariableA` into a 32-byte buffer, then `strtoull`, rejecting a sign, trailing text, 0 and overflow. Tested on Windows 11 / RTX 4070 SUPER, VS 2022 + Ninja RelWithDebInfo, merged onto main 2a5ff9714 together with #992:
- the repo-consistency set (now including test_ctest_registration) gives 578 passed / 5 skipped / 0 failed;
- docs tests give 47 passed, including test_docs_env_vars;
- full ctest gives 316/317, where the only failure is main's pre-existing `d3d12_depth_resolve`, and xmem and xgameruntime pass;
- `d3d12_*` tests under validation give 119/120 with 0 VUIDs.
git merge-tree against current main 89d7dfcf5: no conflicts.
Small follow-ups, not blockers: the README row says "Caps", but a value above host RAM raises the reported limit (up to 64 GiB). The parsing is duplicated in xgameruntime.cpp and xmem.cpp, so a shared helper would keep them in sync. Separately, the xmem check "mapping them does not charge them" measures system-wide commit charge, so it can flake on a heavily loaded machine. It passed 120/120 repeats on an idle one, and that's unrelated to this PR.
AI-assisted (Claude Code, Claude Opus 5.5).
Merging.
**Why merged:** RT-GAMESAVE-COMMIT-ROLLBACK: a game-save commit() backs up each blob to "<blob>~b~" and, if a step fails, undoes the applied steps newest-first, so a failed save can't leave a half-written container. At startup it removes the stray "~" temporaries a commit that died midway left behind, only inside the container directory and leaving backups alone. moffington ran it under Wine: 76 checks pass, versus 5 expected failures with the new tests against the old code.
**Why it's good:** xgameruntime_gamesave passes both plain and under validation.
Tested on Windows 11 / RTX 4070 SUPER (NVIDIA 621.24), VS 2022 + Ninja RelWithDebInfo, Vulkan SDK 1.4.363.0. Merged alone onto main 4a50cafc7, its ctests pass both plain and with LEONIDA_VK_VALIDATION=1. Cumulative of this batch (13 PRs) on main 540d5111f: the repo-consistency set gives 573 passed / 5 skipped / 0 failed, compileall is clean, and full ctest is 316/317 with the usual 11 skips; the only failure is main's pre-existing d3d12_depth_resolve. All d3d12_* tests under validation: 119/120 with 0 VUIDs. The full semantic suite has the same single environment-only failure as main. git merge-tree against current main 51a6074d2: no conflicts. Security read of the three-dot diff: no binaries, game data, downloads, network calls or CI changes.
AI-assisted (Claude Code, Claude Opus 5.5).
Merging.
**Why merged:** VK-XDXR-POSTBUILD-READBACK-STAGE: in vulkan_replay prepare(), an XDXR postbuild that has sources now sets wrote_readback and adds the COMPUTE_SHADER stage to the readback flush, so its results are visible to the CPU read. kawaii-shakal independently ran it 8/8 both plain and under validation.
**Why it's good:** vk_xdxr_postbuild_readback, replay_readback_stages, xdxr_* and d3d12_xdxr_rt*: 9/9 plain and 9/9 under validation. The new vk_xdxr_postbuild_readback is the extra test in the cumulative count.
Tested on Windows 11 / RTX 4070 SUPER (NVIDIA 621.24), VS 2022 + Ninja RelWithDebInfo, Vulkan SDK 1.4.363.0. Merged alone onto main 4a50cafc7, its ctests pass both plain and with LEONIDA_VK_VALIDATION=1. Cumulative of this batch (13 PRs) on main 540d5111f: the repo-consistency set gives 573 passed / 5 skipped / 0 failed, compileall is clean, and full ctest is 316/317 with the usual 11 skips; the only failure is main's pre-existing d3d12_depth_resolve. All d3d12_* tests under validation: 119/120 with 0 VUIDs. The full semantic suite has the same single environment-only failure as main. git merge-tree against current main 51a6074d2: no conflicts. Security read of the three-dot diff: no binaries, game data, downloads, network calls or CI changes.
AI-assisted (Claude Code, Claude Opus 5.5).
Brings the branch up to date with main 68d1331e5. No conflicts; the merged tree was tested before the push (every standalone
test file under tests/ passes except tests/test_ci_registration.py, which fails on main alone since #930).
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>