Commit Graph

5744 Commits

Author SHA1 Message Date
32fb989ee1 Merge main into fix/gpu-7900xtx-arl-5060l-linux 2026-11-25 22:44:30 +00:00
70b7c2f096 docs: D3D12 ABI merged; the title now stops at device slot 70
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 17:41:43 -05:00
b6e1689d95 Merge port/d3d12-abi: console D3D12 slot tables from VIctory, Device11 layouts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 17:40:00 -05:00
79d905c4ce runtime: console D3D12 slot tables from VIctory, with the Device11 switch
The device, queue, list and fence proxies now take each slot's meaning
from data, runtime/shims/d3d12_xs_slots.h, built from victory-gpu
(device.rs:402-458, queue.rs:957-1001, list.rs:2055-2173,
fence.rs:141-154) and Leonida's own measurements, each entry citing its
source; static_asserts refuse two entries for one slot. VIctory's switch
(device.rs:149-168) picks the layout: a device created as ID3D12Device11,
as the title's is, gets the console layouts; any other keeps the PC order
that Leonida's PC-interface tests (device_proxy_test, queue_proxy_test,
tiny_frame) drive. This replaces the guessed +4 list rule and the
PC-order queue and fence proxies for the title.

Console layout:
- Queue: Signal 16, Wait 17, GetTimestampFrequency 18 -> PC 14/15/16;
  GetDesc 28 -> PC 18; ExecuteCommandLists 10 and ExecuteX 35 -> PC 10
  (list proxies unwrapped); Signal2X 34 -> PC 14; PresentX 32 -> the
  device's present handler (set_present_handler), else S_OK, as VIctory
  answers; markers 11-13 ignored; 23/24 (SuspendX/ResumeX) and 31
  (CopyPageMappingsBatchX) refused as open; every other slot refused.
- Fence slot 12: the address of a 64-bit word kept at the real fence's
  completed value. CPU Signal and GetCompletedValue update it at once; a
  console queue Signal registers SetEventOnCompletion on one process-wide
  event whose thread-pool wait re-reads the listed fences.
- Device: 25/26/108 take the return buffer first (V resource.rs:802-811,
  840-849, 2583-2593; Leonida retail_boot_chain 3.1; the title faults at
  26 without it), either order accepted; 48 takes the console queue
  description {type, flags, engine/pipe, queue} (queue.rs:464-495); 69 is
  ignored; 74/75 keep page pools; 127 -> PC CreateCommittedResource3 with
  a PC description and ALLOW_DISPLAY cleared (CreateCommittedResource in
  COMMON before Device10); 57 is refused with its output nulled; 12 makes
  console list proxies; every allocator is wrapped and its slot 9 is
  accepted; a slot from 44 on that no source names is refused instead of
  reaching the PC method at that number.
- List: queries 28-30 -> PC 52-54, the +4 block 32-55, 61 ExecuteIndirect,
  80 DispatchX -> Dispatch, 85/86 -> CopyTextureRegion/CopyResource,
  129 -> DispatchMesh, 139 ResetX -> Reset, 146 -> Barrier; 51 and 70
  (float arguments) through thunks with the real prototype; the 59 marker
  and VIctory's hints and syncs ignored; the console List5/List6 ids
  answered (the list is made as ID3D12GraphicsCommandList).
Both layouts: device 78-81 are VIctory's frame clock (frame.rs), not the
HLE stand-in that returned at once.

Where the sources disagree (evidence from the title wins):
- List: the +4 rule sent 56-58 to the PC queries, 60 to EndEvent and 31
  to ExecuteBundle. VIctory has the queries at 28-30 and names none of
  27, 31, 56-58, 60, which are now refused. Leonida's 59 marker (FSR DLL)
  fits VIctory's newer layout, where ExecuteIndirect moved to 61.
- Device 48: retail_boot_chain 3.2 read a PC description and had to
  clamp Flags; VIctory's layout explains it (the pipe lands there).
- Device 75: PC CreateCommandQueue1 in Leonida, UnregisterPagePool in
  VIctory: VIctory's in the console layout.
- Device 45/46/50: PC Device1/3 methods in Leonida; console methods
  nobody names per VIctory's counts: refused in the console layout.
- Device 67: VIctory leaves it unimplemented with the same (desc, iid,
  out) shape; Leonida's DeserializeComputePipelineStateX (FSR DLL) stays.
- Queue GetDesc: VIctory takes `this` first (queue.rs:950), the device's
  struct returns take the buffer first; the queue accepts both.
- Frame clock: the stand-in made a token on every poll and refused a null
  token; VIctory's (S_FALSE time-outs, a token only with flag 2) paces
  the title.

Open: list 62, 71-74, 100 and 148 still return 0 (no Vulkan-layer path
for title addresses); queue 23/24/31 and device 61/70/71/86 refused;
XboxPresentation is not attached (gta6rt has no window, and its
FramePacer issues its own tokens and models only the origin event); a
title write to the fence word does not move the fence. Not run on the
title: it stops earlier, while DirectStorage is being ported.

Tested (MSVC 19.44, RelWithDebInfo, no Vulkan headers): xs_proxy_mock_test
checks every console queue (128) and list (160) slot against the tables
and through the proxies, the struct returns in both orders, 48, 69,
74/75, 127, 57, the refused device slots, the fence word with deferred
signals, PresentX and the frame clock (40 runs, no failure);
device_proxy_test runs the console layout on WARP. ctest: 116 of 117 pass
without loader; root_sig fails on the base commit too, and loader (no
D3D12 code) times out here. The Vulkan-only tests were not built.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 17:39:29 -05:00
c2771d43ba rdna2spirv, docs: the DPP compare refusal cites the RDNA3 measurement of unwritten lanes (SHADER-VOPCX-DPP review)
On RDNA3 a lane DPP leaves unwritten does not keep its mask bit: v_cmp writes 0 to
its VCC bit and v_cmpx turns it off in EXEC (mcpeacebir-lang, RX 7800 XT, #1608).
The refusal text and the docs/design.md row said the bit was kept, as fact. The
forms stay refused, since RDNA2 is not measured; the wording now says that.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 23:36:57 +01:00
c5f1807515 rdna2spirv: translate v_cmpx in DPP form (SHADER-VOPCX-DPP)
Extend #957's DPP VOPC compare to v_cmpx: the same lane selection, with the
result written to EXEC. v_cmpx prints no destination, so src0 is its first
operand. Only the forms where every lane writes its bit are taken, as for
v_cmp. 78 pipeline-library pixel shaders of 1.0.2.1 were refused for it; all
78 now translate and pass spirv-val.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 23:36:00 +01:00
844519ab59 Merge main into stream-output (#1630)
Brings in main after #1891, so main's tip is the single merge base;
no conflicts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 17:35:35 -05:00
6597528ba0 docs: BCPack merged; where gta6rt finds the format tables
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 17:32:49 -05:00
1bf5eeafd7 Merge pull request #1891 from BubsMcgee/tf-device-foundation
d3d12_vulkan_device: detect and enable VK_EXT_transform_feedback + vk_pipeline_check parity (D3D-TRANSFORM-FEEDBACK-DEVICE)
2026-11-25 23:32:25 +01:00
17b5992b83 Merge pull request #804 from aslan2142/test1700-rdna3-repacking
OLD-7505: restore old upstream PR 7505 - w64_graphics, design: the wave32 VS run is the halves of the wave64 waves, not a repacking (TEST-1700)
2026-11-25 23:31:14 +01:00
99a879b8d6 docs: audio merged; every import of the title now binds
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 17:29:51 -05:00
04221201c3 Merge pull request #748 from aslan2142/build1390-bvh4-parent-table
OLD-7640: restore old upstream PR 7640 - docs/bvh.md: the BVH4 parent table's start and extent (BUILD-1390)
2026-11-25 23:29:16 +01:00
f6cb4aedfc runtime: LEONIDA_DEV_OVERLAY shows what the runtime is doing over the title's window (RT-DEV-OVERLAY)
A click-through window of its own with its own thread: frame and submission rate, a submission's CPU time by phase, the
phase running now, pipeline builds in flight, indirect draws, cores and memory. Off by default. submit_phases keeps
per-phase counts of the threads inside a phase, so overlapping submissions of several queues leave none behind.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 23:28:38 +01:00
2daf532562 Merge port/audio: APU, DSP and audio coprocessor shims ported from VIctory
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	scripts/build_runtime.ps1
2026-11-25 17:27:11 -05:00
3daeb1e111 Merge pull request #717 from aslan2142/resource-pointer-width
OLD-7482: restore old upstream PR 7482 - instance_lists, world_interior_names, world_lights_paths: read the block number from 20 bits
2026-11-25 23:25:17 +01:00
908fb65d8a runtime: port VIctory's audio HLE (xapu, chad, acphal coprocessor, XMA)
Ported from VIctory (victory/crates/victory-hle/src/modules/apu.rs, dsp.rs,
audio.rs; victory-formats/src/xma.rs), GPL-3.0-or-later, Marvisak and
contributors (DexNom fork), keeping its measured ABI: XApu records
(CommandId 0x18, Activate 0x38, Process 0x40, ApuResult 0x50), command
kinds, options and HRESULTs; XDsp StreamDesc 0x1c, Status 16, Command
0x20; IAcpHal slot order, 28-byte messages, command ids 1-3, 5-8, 18;
SHAPE_CONTEXTS 0x60.

- shims/xapu.cpp (xapu.dll): queues and results are real. PLACEHOLDER
  decoding: no Opus decoder is in the repository (VIctory uses the
  opus-pure crate), so a process command parses its packet
  (src/opus_packet.h, RFC 6716 framing as libopus checks it) for its
  frame count, output length and errors, and writes silence. Malformed
  packets fail with BAD_PACKET; rate conversion stays E_NOTIMPL.
- shims/chad_dsp.cpp (chad.dll): completion (status words, tickets) is
  real; convolutions and transforms output silence, as in VIctory.
- shims/acphal.cpp: the coprocessor acknowledges commands with VIctory's
  messages (fmod waits for the first in System_Create; the old stub never
  answered), sets notification words, and decodes enabled XMA contexts on
  a thread into their rings. Context arrays get device addresses that map
  back. Fixes: SHAPE_CONTEXTS is 0x60 (APU addresses are 32-bit; 120
  bytes wrote 24 past the title's structure); AcpHalReleaseShapeContexts
  writes nothing through its argument (the title passes a handle); the
  non-cached heap's device addresses start on a 64 KiB boundary; state
  the decoding thread reads is immortal.
- src/xma_decode.*, src/xma_tables.h: real XMA2 decoding (VIctory's port
  of FFmpeg's WMA Pro decoder) with four fixes from VIctory's history
  that the DexNom snapshot lacks (ba42db643, d4d182204, 03a6f2290,
  4eb0898b3); src/xma_context.*: the context machine, with three more
  (7a5d85e6a, 1054fe87d, 985d8d4b0).

Host output is unchanged: the title's middleware opens WASAPI through
COM (com_shim.cpp forwards CoCreateInstance to the host), as in VIctory.

Tests (CPU only, no game data, in CTest): xma (decoder against a
direct-sum IMDCT, VIctory's frame walk, noise and ring tests), xapu,
chad_dsp, and acphal extended (messages, notification words, the
decoding thread filling a ring). gta6rt --dry-run on 1.0.2.1 binds all
ten xapu/chad imports (unimplemented 11 -> 1: DStorageGetFactory).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 17:25:05 -05:00
7359f21b2b Merge pull request #697 from aslan2142/rt566-d3d12-device-calls
OLD-7998: restore old upstream PR 7998 - d3d12_device_calls: count the ID3D12Device slots the retail executable calls, from the file alone
2026-11-25 23:22:35 +01:00
bffc6395b1 Merge main into RT-POST-LOAD-GPU-MEMORY (#2098)
main d3b8251bc brings #1889 (large compiles within a memory budget), #1987 (unbound T# reasons), #1759, #1860
and others under this branch. Conflicts:

- d3d12_vulkan_device.cpp, includes: both (pipeline_cache_journal.h and large_module_gate.h).
- d3d12_vulkan_device.cpp, fix_console_slot's T# branch: main's form (counts refused_reasons, #1987), with this
  branch's comment on why a slot that is no T# is nulled. The same reason count is added to console_tsharp_check,
  the GPU console-heap path's T# registration, so its log line has the reasons too.
- d3d12_vulkan_device.cpp, the heap log: both blocks (the release filter / GPU heap lines and main's "unbound T#s by
  reason" line).
- d3d12_vulkan_device.cpp, PipelineState::build_compute: this branch's body (build_compute_pipeline, journal, compile
  helper) behind main's entry: the `Work` argument and enter_build, so a large module takes its place at
  big_compile_gate() before variants_mutex_, as #1889 requires (a thread that waits for memory holds no PSO lock).
  build_compute_pipeline's own big_compile mutex now follows main's BigCompiles: taken only with
  LEONIDA_SERIAL_BIG_COMPILES=1 (it was on by default here), so the default is main's budget, not one at a time.
- d3d12_vulkan_device.cpp, queue_locked: this branch's Build-state jobs (claim, defer, finish). main's
  `requested_`/`publication` mechanism they replace is not kept. build_variant passes Work::speculative for a
  "warmup" build and Work::demand otherwise, as main's queue_build did.
- vulkan_replay.h, ComputePipeline: main's comment on `large`, and this branch's `await`.
- vulkan_backend.h: this branch's LEONIDA_SUBMIT_ASYNC block, with main's lock order in the state_mutex_ comment
  (state_mutex_ -> pipeline_mutex_ -> resource_mutex_ -> tracker_mutex_ -> submit_mutex_).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 17:21:25 -05:00
b8c44ce8ec Merge pull request #649 from aslan2142/pe-inspect-rt-version
OLD-7282: restore old upstream PR 7282 - pe_inspect: read the resource directory and the RT_VERSION block without its strings
2026-11-25 23:20:51 +01:00
b4ae8916ef Merge pull request #653 from aslan2142/pe-inspect-linux-classes
OLD-7084: restore old upstream PR 7084 - pe_inspect: classify system DLLs on Linux through the Wine prefix, bundled names without case
2026-11-25 23:19:58 +01:00
392dda8f06 Merge pull request #833 from aslan2142/wave64-partial-wave-zero
OLD-7450: restore old upstream PR 7450 - wave64 emulate: a cross-lane read of a missing lane in a partial wave gives 0
2026-11-25 23:19:00 +01:00
6c8a89dea7 docs: the scripted-pad route through the first-run pages to the story load (RT-BOOT-COMBINED)
The legal-terms page keeps Confirm greyed out until both boxes are ticked, and
down stops at Confirm, so an a/down-only script sits there. Record the page
order, what each page needs and the retry block that reached the loading
screen on native Windows; one README status sentence links it.
2026-11-25 17:15:57 -05:00
8ff0a161ff address_binding: review fixes for RT-FAULT-ADDRESS-OWNER
- A second Vulkan instance in the process no longer overwrites the messenger
  handle (the first one was left alive past its instance): it is refused, and
  enable_device only enables the extension for the instance that owns the
  messenger. install/uninstall are under a lock.
- `on` is set only when a messenger records the device, and is atomic. With
  LEONIDA_ADDRESS_BINDINGS=1 and nothing recording, the fault report says the
  bindings were not recorded instead of reading as "no object there".
- An object that only shares the reported page with the fault address is
  labelled "on the page" (unbound: "held the page"), not "containing".
- Tests: exact end and start of an object, page vs byte precision, unbind
  matching by handle and size, the kept_unbound cap, recording from several
  threads while a report reads, and the two-instance messenger cases. The test
  builds on Linux too (setenv in place of _putenv_s).

Changes made by Claude Code (AI-assisted).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JPqXc6svM4pbBagTsVEYA3
2026-11-25 22:12:33 +00:00
ca9e45dbd1 Merge main into pe-inspect-linux-classes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 17:11:38 -05:00
42b6b66ab2 docs: align the other pages with the measured CreateDevice block size and slot 62/76 (D3D12-OTHER-PAGES-CONSISTENCY) 2026-11-25 19:11:02 -03:00
874b6bb2d5 docs(related_projects): add LooperSalty/AnyXboxX, the closest independent comparison on the same build 2026-11-25 19:10:58 -03:00
aab7653566 d3d12: retry a failed heavy cache write and never publish a VK_INCOMPLETE snapshot
Review of RT-HEAVY-PIPELINE-CACHE:
- The writer thread marked a generation written even when the save failed, so the
  cache stayed unsaved until teardown. A failed save now keeps the cache dirty and
  is retried after a bounded backoff (5 s, doubling, capped at 2 min), so a write
  that keeps failing does not spin. WriteSchedule::failed() holds that decision and
  heavy_pipeline_cache_test checks it.
- save_heavy_pipeline_cache accepted VK_INCOMPLETE and published the truncated blob
  over a complete file. It now requires VK_SUCCESS, like the session cache, and
  keeps the previous file; the next try queries a fresh size.

Changes made by Claude Code (AI-assisted).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JPqXc6svM4pbBagTsVEYA3
2026-11-25 22:10:37 +00:00
4895e63a99 Merge remote-tracking branch 'up/main' into mods-manager-camera-bom
# Conflicts:
#	tests/test_leonida_mods.py
#	tools/leonida_mods.py
2026-11-25 23:08:37 +01:00
690b531a46 docs: DirectStorage merged; next blocker is console device slot 26
AGENTS.md gets two runtime traps found on the real title: a thread_local
with a destructor in gta6rt.exe aborts the title (0xC0000409), and console
methods returning a struct by value take a hidden return pointer in RCX.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 17:06:36 -05:00
60509612f5 Merge port/dstorage: Xbox DirectStorage in gta6rt, ported from VIctory
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 17:05:15 -05:00
dd6d3fd8a5 Merge main into stream-output (#1630)
Brings #1630 up to date with main; no conflicts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 17:04:49 -05:00
0d97ae62ee runtime: Xbox DirectStorage (XCRDAPI.dll), ported from VIctory's dstorage.rs
gta6rt --run stopped at the first unimplemented import, XCRDAPI.dll!DStorageGetFactory.
shims/dstorage_xs.cpp now serves it, ported from VIctory's
crates/victory-hle/src/modules/dstorage.rs (GPL-3.0-or-later; Marvisak and contributors,
DexNom fork) with VIctory's measured ABI: the factory interface id, the factory, file,
status-array and queue method tables in their slot order, the 0x48-byte request and the
queue description (shims/dstorage_xs.h), and its status and error reporting.

- One pool of workers runs every queue's requests: started in queue order, queues shared
  by priority with weighted round robin (about 10x per level, in bytes), at most the
  staging buffer's worth of compressed source in flight. A status entry is written once
  every earlier request of its queue has finished, with the first failure since the last
  entry. A queue submits itself at half its capacity and blocks when full; Close drops
  what has not started and waits for what runs.
- Files open through the title's CreateFileW shim, so GAME: and G: paths read the
  overlay copy or the package. zlib is leonida::zlib_inflate. Destinations are addresses
  or xmem physical pages, whose page array is read when the request runs (waiting up to
  100 ms for numbers still zero); new rt::xmem::physical_span/write_physical write the
  pages through their section's own view, committed first.
- Raw file reads into title memory are read beside and copied in (VIctory's fix for
  ERROR_INVALID_USER_BUFFER): here a ReadFile into an untouched mapped physical page fails
  with ERROR_NOACCESS, while our copy faults into xmem's commit handler.
- BCPack goes through leonida_bcpack_decode (src/bcpack_decode.h); the stub linked for
  now returns false, so BCPack requests complete with HRESULT_FROM_WIN32(ERROR_INVALID_DATA),
  logged once per BC format.
- No thread_local with a destructor: it made gta6rt.exe's CRT register its thread-local
  destructor callback with the UCRT, which takes one per process, and the title's CRT
  startup then ended the process with 0xC0000409 after its static initializers.
- LEONIDA_DSTORAGE_TRACE (failed or all requests) and LEONIDA_DSTORAGE_RETRIES (physical
  page write retries) are documented in runtime/README.md.

dstorage_xs_test (CTest dstorage_xs, no game files): reads from a synthetic GAME: file
through a queue, zlib streams compressed by the test, memory sources, statuses completing
in order with the first failure (EOF, bad zlib, BCPack, unsupported option, oversized
read), self-submission, closed queues, the scheduler's priority and staging choices, and
physical-page destinations (one allocation, several, a late page array, an unknown page,
a raw read into untouched pages). 59 checks pass.

On the 1.0.2.1 package, --run now gets the factory, sets the 32 MiB staging buffer and
opens 12 RPF archives through DirectStorage; it then stops in the D3D12 device proxy's
slot 26 (GetCustomHeapProperties), which receives the hidden return pointer in RCX.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 17:04:24 -05:00
04290dd2d1 d3d12: a window's GPU writes go back to the title's pages (RT-TITLE-WINDOW-WRITE-BACK)
A window of the title's memory is a read-side mirror refreshed before every
submission, so a UAV or raw write into one landed in the copy and the title
never saw it. At the world start that is the WRITE_INVALID device loss of
#1537 (QemmHD, 160 s into the load, past the cap): the culling compute writes
through addresses that name title memory, and nothing ever reads the result
back into the pages.

The layer now keeps every title range a submission's bindings reach (the
resolve path, so root views, table V#s and created views alike) and copies
those ranges from the copy to the title's pages at the start of the next
refresh, before the forward copy. A page the title wrote in between takes the
title's newer bytes and its GPU result is dropped; the tracker already knows
those pages (guarded, hot and clean). Caps: 8,192 ranges and 64 MiB a
submission, logged once; LEONIDA_TITLE_WRITEBACK=0 turns it off.

Test: d3d12_title_window_write_back, a dispatch through a root UAV at the
title's pages: the written words reach the pages, hold across two
submissions, and a title write survives the next forward copy. No game files.

Item: RT-TITLE-WINDOW-WRITE-BACK (claimed in #1608)

Wine against llvmpipe.
2026-11-25 21:59:18 +00:00
a6e0360f44 Merge upstream main into io-trace
Conflict resolution assisted by Codex.
2026-11-25 21:56:37 +00:00
c626cb2dc2 Merge upstream main into fault-address-owner 2026-11-25 21:56:36 +00:00
c3b8520683 Merge upstream main into heavy-pipeline-cache 2026-11-25 21:56:36 +00:00
f7e422ee8a Merge upstream main into gameinput-hotplug 2026-11-25 21:56:35 +00:00
ca39fa9379 Merge upstream main into bcpack-bc7-partial 2026-11-25 21:56:35 +00:00
661ec787ff Merge upstream main into shader-sethalt
Conflict resolution assisted by Codex.
2026-11-25 21:56:35 +00:00
53ab2c9666 Merge upstream main into input-out-of-the-box 2026-11-25 21:56:35 +00:00
244387529b title HUD: VRAM from VK_EXT_memory_budget, private bytes under Wine
The title HUD (#1922, LEONIDA_TITLE_HUD=1) read VRAM from DXGI's
QueryVideoMemoryInfo on the host dxgi.dll and private memory from
PROCESS_MEMORY_COUNTERS_EX::PrivateUsage. Under Wine both read 0.

- VRAM: the runtime's device enables VK_EXT_memory_budget when the GPU
  has it (VulkanDeviceInfo::memory_budget), and
  rt::d3d12::vulkan_vram_budget sums heapUsage and heapBudget over the
  DEVICE_LOCAL heaps (other heaps' usage shown as shared), from
  src/vulkan_memory_budget.h. The HUD calls it once per refresh on its
  own thread. Without the extension it falls back to DXGI, and where
  that has no figure either it shows "VRAM n/a" rather than 0.
- Private memory: Wine's GetProcessMemoryInfo fills only the
  PROCESS_MEMORY_COUNTERS part and leaves PrivateUsage 0; PagefileUsage
  is the same commit-charge figure on Windows 8 and later, so the HUD
  takes the larger of the two.

Tests: title_hud_test checks the sums, the DXGI fallback, the "n/a"
text and the private-bytes choice with made-up values, and that a VRAM
source reaches the title at most once per refresh. The new
d3d12_vram_budget_test checks that the device enables the extension
exactly when the GPU has it and reads a non-zero budget, and skips
(77) without it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 16:56:01 -05:00
dfe84355cc docs: Leonida's GPU test suite on the RTX 4060 Ti (226/248, 5 failures)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 16:54:57 -05:00
865e2d7912 Merge commit 'refs/fix2/main' into fix2-653 2026-11-25 16:51:53 -05:00
da60135590 docs, tests: clarify descriptor address translation suite and verify production paths (BL-4)
Addresses review feedback from KernelSmoker and Deedlyy on PR #1166:

- Converted tests/test_descriptor_address_translation.py to standard-library unittest, allowing it to run dependency-free with python -I.

- Added TestProductionImplementationConformance checking runtime/src/gfx10_descriptors.h and tools/rdna2spirv.py against documented bitfield layouts.

- Preserved all 30 test cases running in 0.05 s.

AI-assisted (Claude Code, Claude Opus 5.5).
2026-11-26 00:46:55 +03:00
83a90abc76 docs, tests: record descriptor heap census and provide 32-bit address translation contract suite (BL-4) 2026-11-26 00:45:32 +03:00
83c1bf2791 Merge commit 'refs/fix2/main' into fix2-638 2026-11-25 16:42:43 -05:00
ac3aef567b root_sig_public_flags_test: expect the heap-indexed fallback where the host refuses those flags
Since #1353 the shims' serializers (versioned and legacy) serialize a
description the host refuses for CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED or
SAMPLER_HEAP_DIRECTLY_INDEXED (Windows 10's in-box d3d12.dll): they call
the host again without the two bits and put them back into RTS0. The
three host-parity checks failed on Windows 10 for that, as reported in
review.

Where the host refuses such flags but takes the description without
them, the shim now has to return S_OK with that blob byte for byte,
except the RTS0 flags dword, which must hold all the flags, and a valid
container hash. Byte-for-byte parity stays wherever the host accepts,
and the shim still has to refuse whatever else the host refuses. The doc
bullet says the same.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 16:42:34 -05:00
712714bef2 Merge main into perf/big-compute-budget (#1889)
Brings #1889 up to date with main after #1742 (the pipeline compile unlock),
resolving the five conflicts as described in the guide on the PR:
https://github.com/ubiquitarianism/leonida/pull/1889#issuecomment-7175252290

- vulkan_replay.h: PipelineCompiles::build takes both the large-compile
  budget and main's `prior` compiles; build_pipelines passes the budget,
  and main's check_compiled_pipelines / finish_compiled_pipelines stay.
- vulkan_backend.h: execute_now takes the large-compile demand and passes
  the budget to the pass-0 compile, and pass 1 passes the budget too.
  set_large_compiles locks pipeline_mutex_, since #1742 moved the
  pipeline state under that lock.
- replay_pipeline_compiles_test.cpp: both test blocks kept, and the
  prior_compiles_reuse call passes an empty budget.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 16:41:36 -05:00
00c65b940d Merge commit 'refs/fix2/main' into fix2-677 2026-11-25 16:40:58 -05:00
afea66650c Merge main into delay-import-thread-order-notes
runtime/shims/startup_trace.h: main added the tls_index0 example event
and the exception's region/regs fields to the header comment; keep them,
add this branch's delay_import_unimplemented example and renumber seq.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 16:38:51 -05:00