| Age | Commit message (Collapse) | Author |
|
The base is 8a242efeb, the merge of main and #984. 68 files conflicted; they were resolved in seven groups by
one rule: the same change in two forms keeps the base's form, everything only #939 has is kept, and where the
two solve one problem in two ways the base's is the frame and #939's plugs into it.
A, the Xbox proxy (d3d12_xs_device.cpp/.h, d3d12_xs.cpp, d3d12_xs_pso_stream.cpp/.h, d3d12_xs_alloc_size.h,
d3d12_xs_desc_clean.h, device_proxy_test.cpp, queue_proxy_test.cpp): the base's files with #939's additions
ported in. Device slot 57 asks #939's NativeGraphicsFactory first and falls back to the base's
proxy_create_graphics_pipeline_from_native_code on E_NOTIMPL. Kept from #939: the providers (texture lease,
raw texture view, resource by address, constant view, descriptor mapping, depth-stencil UAV, texture pages),
the title-backed descriptor mirror, slot 13's feature answers, GPU labels on list slots 71/72. Dropped: #939's
duplicates of the boot ladder routes, its fallback window, its slot 133 stand-in.
A2 (xs_proxy_mock_test.cpp): the base's test with #939's slot 70 raw-buffer case; presentation cases follow
#939's rule that a device which ever had a handler has no queue fallback.
B1, the Vulkan device (d3d12_vulkan_device.cpp, d3d12_com.cpp/.h, shader_library.h, queue_families.h,
pipeline_cache_file.h, startup_trace.h): one lazy-pipeline mechanism, the base's; #939's pending_base_compile
and first_use_backend_pipelines dropped, prepare_on_bind and cold_graphics_compile kept. create_texture keeps
the base's signature; #939's deferred backing is folded into the base's placed-memory binder. #939's quad
lists as triangle indices.
B2, the D3D12 tests (d3d12_existing_heap, a8_dimensions, pipeline_cache_seed, title_va, rect_list,
shader_library, loader_tls_index0, draw, compute, xmem_placed, shader_library_corpus): the base's tests where
both carry the same case, #939's cases added (rebound tables, linear texture map, large vertex batch,
executable shaders, default A8 views).
C, the backend (vulkan_replay.h, vulkan_backend.h, vulkan_bindless.h, vulkan_scratch.h, vulkan_present.h,
rect_list_geometry.h, vk_test_device.h, vk_pipeline_check.cpp, vk_store_test.cpp, bindless_sizing_test.cpp,
replay_texture_barrier_test.cpp): the base's prepare_draw and lazy compute, its #1055 release rule and its
rectangle generator; #939's rectangle variants, GPU quad index expansion, 1D/3D and depth-stencil UAVs, the
label fence on the base's submit.
D, memory, services, presentation (xmem.cpp/.h, xg_xs.cpp, xg_xs_test.cpp, title_va_alias.h and its test,
main.cpp, frame_pacer.h, xbox_present.cpp/.h; xgameruntime_offline.cpp for one comment): the base's xmem with
#939's label hooks, file-backed sections and pin_mapped_data; both texture computers in xg_xs.cpp, the base's
answering first; --first-run-ui kept without host speech in its profile.
E, build, tools, docs (runtime/CMakeLists.txt, make_game.py, tools/rdna2spirv.py, tools/shader_disasm.py,
scripts, tests, docs; docs/README.md and tests/test_exe_shaders_stage.py beyond the conflicts): the base's
v_dot4 decode, #281's disassembler form and tests/semantic/test_fspx_dot4_op_sel_disasm.py dropped; the
base's executable-shader step with #939's cache fix; 366 registered tests.
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>
|
|
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>
|
|
(RT-PROTON-STORY-LOAD)
One squashed commit of a fork that was developed on a Linux/Proton machine and
tested on two native Windows machines. On all of them the retail 1.0.2.1
package now launches, shows its launch movie, first-run pages and landing
prompt, runs the story load to its end with the loading slideshow drawing its
artwork, and enters the world phase. A first world frame is not verified yet.
docs/linux_proton.md has the setup, a healthy boot's timeline, the machines
and where it stops.
Runtime: frames in the title's own window; DirectStorage pinned reads,
page-list scatter/gather, BCPack and unshuffle with a locally generated
predictor file; pooled, device-local and deferred image backing for streamed
and placed textures; enhanced barriers into LAYOUT_UNDEFINED; a bindless table
that degrades instead of refusing a submission; a descriptor hash finalizer
(off until a library carries it); directly indexed heap offsets for compute
dispatches and VS/PS/GS draws; title buffer windows outside a fragmented
arena; opt-in device-local copies of streamed buffer views; write-fault
retries under the tracker lock, shared trackers and write-watched title memory
for native Windows; device-loss, compute-input and memory probes.
Translator: loop bounds at structured exits, the eight FidelityFX programs
that use a packed-dot form the disassembler skips, buffer bounds modes per
view kind, a compaction option, the hash finalizer option.
Tools and scripts: Linux boot scripts (Wine/Proton, no network), a Windows
boot script, the paired compute translation script.
No game data. AI-assisted (Claude Code and Codex agents), reviewed and booted
by people on the machines named in docs/linux_proton.md.
Co-authored-by: Plaaasma <47513553+Plaaasma@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
|
|
|
Windows UI integration
Retain the first-run origin-token poll and shared tokens alongside standard origin, vblank and flip events. Route attached presenter callbacks before the fallback window and dispatch local speech through the Windows provider with the upstream offline fallback.
The offline pipeline checker now enables the runtime mesh query feature for cache-producing runs. A controlled GPU comparison with the same compute shader changed from a miss to an application cache hit.
|
|
wiring
- Support origin (0), vblank (1), and flip (2) frame events and
frame_wait_flag_token_on_timeout (flag 2, returning S_FALSE with a
fresh consecutive token on timeout) in runtime/src/frame_pacer.h.
- Add a decoupled PresentationHandler interface to d3d12_xs_device.{h,cpp}
routing device slots 78-81 and queue PresentX/SuspendX/ResumeX slots
(default 30/31/32, env-overridable via LEONIDA_XS_*_SLOT).
- Add attach_xbox_presentation / detach_xbox_presentation in
runtime/shims/xbox_present.{h,cpp}.
|
|
check their memory
- The "[rt] localdbg:" lines and the experiment switches are gone: LEONIDA_RECT_GREEN, LEONIDA_RECT_VS,
LEONIDA_RECT_NOGS, LEONIDA_RECT_NOCULL, LEONIDA_RECT_FORCE, LEONIDA_VTX_TEST and LEONIDA_DEBUG_CLEAR, with the
hard-coded test shader words. vulkan_replay.h returns unresolved_resource directly again.
- The descriptor write-through and the table mirror for title-backed heaps only copy between committed memory
they may read and write. A handle that is only a number (xs_proxy_mock's heaps) is left alone; the test
crashed there before.
- A slot 70 view over memory no buffer holds becomes a raw buffer view only when the title-memory registry
(title_va_alias.h) holds the whole range, instead of any address below 4 GiB. xs_proxy_mock's null-view case
passes again.
Still switches: LEONIDA_GRAPHICS_STAGE_LAYOUT, LEONIDA_DESC_MIRROR, LEONIDA_SLOT70_TITLE, LEONIDA_RECT_FOURTH.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HxBQf4pXH8PWpC5oZsM4bt
|
|
The stack is ladder-frame (ASTROWwwW's integration of the retail boot pull requests) with the old pull requests
7604, 7286, 7584, 6446, 8591, 7384, 7535, 7448, 9137 and 9419 and local fixes on top. main carries many of those
commits as ancestors without their content, so the merge was made against main's tree, not its history: nothing
main dropped is dropped again here.
Resolved by hand:
- d3d12_xs_device.cpp and frame_pacer.h: the stack's Xbox-ABI layer, plus main's uncapped pacer and its two new
registration hooks (set_placed_at_va_pages_hook is called before slot 133's handler; the console descriptor
heap handler is stored but slot 14 still uses the title-backed heaps of old PR 7021).
- xmem.cpp, xmem_test.cpp: the stack's run-mapped physical pages. main's commit-on-touch xmem with the two
view-protection fixes it lost (7e8e3c1db, 954fcb106) boots to 50,468 pipelines and then fails a submit with an
unknown resource, so it is not used here yet.
- acphal.cpp, acphal_test.cpp, vulkan_replay.h (acceleration structure copy), README: main's.
- CMakeLists.txt, build_runtime.ps1, d3d12_com.cpp, d3d12_vulkan_device.cpp, shader_library.h, docs: both sides.
Measured (Linux, Wine 11.21 staging, RTX 5070 Ti, driver 615.78.08, clang-cl 22.1.8 + xwin, own 1.0.2.1 copy,
network off, LEONIDA_GRAPHICS_STAGE_LAYOUT=1, 300 s): 50,470 pipeline states created, 197,998 ExecuteCommandLists
with none failed, 148,467 DrawInstanced, 99,008 PresentX.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HxBQf4pXH8PWpC5oZsM4bt
|
|
|
|
The queue proxy's PresentX slot is past the PC chain, so nothing recorded
a present: a --trace-d3d12 run of a frame loop could not say how many
frames were presented, or whether one was refused. XboxPresentation::PresentX
now writes one line per call through d3d12_trace::result (ok or failed).
xbox_present_test captures the trace around a blank present and a refused
three-plane call and checks for exactly those two lines.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HxBQf4pXH8PWpC5oZsM4bt
|
|
|
|
Any non-empty value other than "0" lifts the frame-event cap: a
WaitFrameEventX hands its token out at once (no vblank grid, no latency
throttle) and PresentX presents unsynced, so the frame rate is whatever
the title renders. Registration and suspension keep their errors, an
uncapped frame's statistics report its present time, and the flag
survives suspend/resume. frame_pacer_test covers the grid's removal and
restoration.
Generated with [Devin](https://devin.ai)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
|
Device slot 80 (WaitFrameEventX, from #6935) numbered its tokens with a
counter of its own, while XboxPresentation's pacer refuses any token above
the ones it issued itself. A title that waits through the device and
presents through the device's XboxPresentation therefore had every
PresentX refused with E_INVALIDARG once its tokens ran ahead of the
pacer's.
leonida::FrameTokenSource is now the counter both use: a pacer takes an
optional shared source (a standalone pacer still owns its own and numbers
as before), the device proxy owns one and exposes it through
rt::d3d12_xs::device_frame_tokens, and XboxPresentation passes a given
source to its pacer. A token that was never issued is still refused.
Reported by rafaelpssz in #7496.
|
|
review fixes
- Tone map: identity up to 0.8 of SDR white, extended Reinhard shoulder above it, continuous in value and slope, content
peak maps to 1.0 (SDR-range content is no longer darkened).
- The Windows SDR white level is read by a background thread (about once a second, only while HDR10 is in use);
PresentX reads an atomic. A failed query keeps the last good value; QueryDisplayConfig retries on
ERROR_INSUFFICIENT_BUFFER.
- LEONIDA_SDR_EOTF is case-insensitive, unknown or too long values are logged; setters are atomics; <cwchar> for wcscmp.
- Tests: eight-step HDR10 ramp with hand-calculated bytes, curve properties (monotonic, identity below the knee, peak 1,
slope continuity), HDR10 plane 1 over SDR plane 0 on HDR10 and SDR outputs, hand-calculated 50% overlay bytes, query cost.
- Docs 4.5: shoulder description, query cost, sources marked (KWin claim unverified, vkd3d-proton file partly read, the
measured 80 nits only covers the SDR fallback path).
- present_compose.inc rebuilt with glslc 2026.4 (reproducible, spirv-val clean).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Windows SDR white level, tone map
- Compose pass decodes every texel to linear (premultiplied) before filtering, converts the plane to the output's linear
working space (Rec.2020 nits for HDR10, Rec.709 relative to SDR white for SDR), blends there and encodes once.
- SDR EOTF is piecewise sRGB by default (community-sourced Windows behaviour), gamma 2.2 by
XboxPresentation::set_sdr_eotf or LEONIDA_SDR_EOTF=gamma22.
- SDR white: set_sdr_white_nits override, else DISPLAYCONFIG_SDR_WHITE_LEVEL of the window's output while HDR10 is
active, else 203 nits (BT.2408).
- HDR10 on an SDR output: extended Reinhard on luminance (white point at the content peak, default 1000 nits) instead of a
hard clip.
- HDR metadata stays unsent; docs section 4.5 documents the decisions and cites the sources.
- CPU reference model and xbox_present_test updated (linear model, EOTF option, 50% overlay, tone map, white level query).
- present_compose.inc rebuilt with glslc 2026.4 (byte-reproducible, spirv-val clean).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
ResourceCount)
- Re-prepare the compose target after the acquire/out-of-date retry and check the extent in
record_planes; xbox_present_test resizes the window between composed presents.
- XboxPresentPlaneParameters follows the public field order exactly (adds ExtendedDescCount,
pExtendedDescs); implausible placement / unknown filter / extended descs are ignored and
logged once, not refused.
- Plane 1 is composed only with our overlay flag (SDR/SDR no longer blends by default).
- present_planes rejects a non-positive or NaN SDR white level.
- ResourceCount != 1 is refused with DXGI_ERROR_UNSUPPORTED before either path (found by Flyander).
- Docs: PQ-space filtering, HDR10 swapchain verified on RTX 5080 by JavierBlanco23.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
alpha overlay and HDR10/SDR conversion
A plain single plane keeps the old blit. A plane with pDestPlacementBase, a point/linear
ScaleFilter, the HDR10 colour space, or a second overlay plane goes through
VulkanPresenter::present_planes: a compute pass (present_compose.comp, SPIR-V embedded)
into an RGBA16F image that is copied to the swapchain. HDR10 uses an ST.2084 swapchain
when the surface lists one, else is clipped to SDR. An SDR plane 1 next to an HDR10 plane 0
is the GameDVR copy (public HDR sample) unless flagged an overlay. The layouts, flag values
and alpha convention are ours; xbox_present_test checks every case against a CPU model.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
- find_tear_mode rejects a mode whose surface caps lack the swapchain's image usage or extent.
- present_timing: a repeated or stale token is never late.
- percent_scanned is measured at commit, so it agrees with the display time.
- The "no effect" log distinguishes the kill switch from a missing extension or mode.
- LEONIDA_PRESENT_NO_TEAR is read with _dupenv_s: any non-empty value but "0" disables.
- xbox_present_test: the real-time comment is back where it belongs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
VK_KHR/EXT_swapchain_maintenance1
A frame presented after the vblank it was due at is flipped at once (IMMEDIATE, else
FIFO_RELAXED) when the scan would be within the threshold percentage of the screen,
instead of waiting a whole interval. The decision is the pure
leonida::decide_present_sync(late_us, interval_us, threshold); FramePacer reports the
lateness against the vblank after the token's origin and records the tear in
GetFrameStatisticsX (PercentScanned) and immediate_presents().
VulkanPresenter creates a vsync swapchain with FIFO plus the tear mode when the surface
lists it as compatible (VkSurfacePresentModeCompatibilityKHR) and chains
VkSwapchainPresentModeInfoKHR on a tearing present. The device enables the KHR (else EXT)
extension, its feature and the matching instance extensions only where present; without
them the threshold is ignored and logged once, as before. LEONIDA_PRESENT_NO_TEAR=1 turns
it off.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
DXGI_ERROR_UNSUPPORTED, SuspendX never waits on a present; tests and docs
xbox_present_test presents with null, repeated and stale tokens (the present
happens) and refuses never-issued ones, and presents MSAA, integer and BC sources.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Suspend/ResumeX) and xbox_present_test
Provisional struct layouts and constants of ours; real slots unmeasured (TODO
table in the header). The test reads the swapchain image back on a Vulkan
device and runs the frame events on a fake clock, then 30 frames in real time.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|