Skip to content

[draft, integration] retail boot to the frame loop on current main (RT-BOOT-INTEGRATION) - #321

Merged
aslan2142 merged 39 commits into
ProjectLeonida:mainfrom
Mumogg:boot/frame-loop-on-main
Nov 25, 2026
Merged

aslan2142 merged 39 commits into
ProjectLeonida:mainfrom
Mumogg:boot/frame-loop-on-main

Conversation

@Mumogg

@Mumogg Mumogg commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Claimed in #14 as RT-BOOT-INTEGRATION. Draft: for testing and for carving into small pull requests, not for merging as it is. #127 and #131 are the first two pieces, already carved out.

What this is

main 84347bbb6 merged with the stack that reaches the frame loop on my machine: ASTROWwwW's ladder-frame integration of the retail boot pull requests, the old pull requests 7604, 7286, 7584, 6446, 8591, 7384, 7535, 7448, 9137 and 9419, and my own fixes on top. Almost none of it is my code: the authors are in the history (ASTROWwwW, tedin7, mariuslozo-boop, Jadiac, NiiRoZz, Etr0p, Gustavo Kissel, hcristosm, thibaut and others).

Why a merge and not a rebase of each piece: main has most of these commits as ancestors without their content (finding in #14), so git treats them as already merged. This was merged against main's tree with the conflicts resolved by hand; the two merge commits say what was chosen where.

Measured

Linux (Nobara 44, kernel 7.3), Wine 11.21 staging, RTX 5070 Ti (driver 615.78.08), clang-cl 22.1.8 + xwin SDK 10.0.26100, own 1.0.2.1 copy, network off, 300 s, LEONIDA_D3D12=vulkan.

main 9ec34cdff main + #127 + #131 this branch
D3D12 calls 0 1 (D3D12XboxCreateDevice) 1,800,377
Pipeline states created 0 0 50,468
ExecuteCommandLists 0 0 178,233, none failed
DrawInstanced 0 0 133,669
PresentX 0 0 89,126
Ends with title int3 at 0.65 s host AV at device slot 26 still running at the timeout

The window stays black: with the real pixel stages the title composes a fully transparent layer over its clear. That is what it draws while it waits at this point, as far as I can tell, not a presentation fault (a forced clear colour and a forced pixel stage both reach the screen).

Choices that need a maintainer's decision

  • xmem: this branch keeps the run-mapped physical pages of the stack (xmem.cpp). main's commit-on-touch xmem, with the two view-protection fixes it lost (7e8e3c1db, 954fcb106), boots to 50,468 pipelines here and then fails one submit with an unknown resource. Without those two fixes it stops at 1,181 calls: the title's device set-up returns false after the first map into a write-combined window. I can send those two fixes on their own.
  • Slot 14: main routes the console descriptor heap to a handler in the Vulkan layer; the stack serves it inside the proxy with title-backed heaps (old PR 7021). The handler is registered and stored here, but not called.
  • Rect lists: the fourth corner is v2 + v3 - v1, the rule d3d12_rect_list tests. LEONIDA_RECT_FOURTH=v1v3 switches to v1 + v3 - v2, the only one that covered the target for the title's full-screen rectangle draws here. Open question, not a claim.

Tests

Every target builds. Runtime suite under Wine (ctest -j 4) at e0d4fd2b8: 292 of 321 pass. For comparison, plain main 9ec34cdff under the same Wine: 275 of 299.

  • 22 failures are the same tests that fail on plain main here.
  • xmem and d3d12_com fail on main and pass on this branch.
  • Seven fail only here:
    • d3d12_xmem_placed and d3d12_console_descriptor_heap: main's tests of the two designs this branch does not use yet (commit-on-touch xmem, the slot 14 handler). See the choices above.
    • dstorage: the guard-page case, as in runtime: restore the console DirectStorage shim, with the typed-error inflate it needs (RT-DSTORAGE-RESTORE, #47) #131.
    • run_tiny_tls_ga: its last part sets TMP/TEMP to a missing folder and expects the reservation to fail; under Wine the run returns 0. I read that as Wine not passing those variables through, not verified.
    • d3d12_title_va: stops at its first check, that a fresh VirtualAlloc lands above the arena size; under Wine it lands below.
    • pipeline_cache_seed: vk_pipeline_check exits 9 without output on the synthetic shader. Cause not found.
    • xs_proxy_mock: passes when run alone, failed in the parallel run. Cause not found.

Not built with MSVC and not run on Windows.

Rough edges, stated plainly

  • The diagnostics and experiment switches that were in the first push are removed (e0d4fd2b8). Four switches remain, each for a fix that is not proposed for main yet: LEONIDA_GRAPHICS_STAGE_LAYOUT (opt-in), LEONIDA_DESC_MIRROR, LEONIDA_SLOT70_TITLE (on by default) and LEONIDA_RECT_FOURTH.
  • My own fixes that I intend to send separately, each with its measurement: descriptor write-through and table mirror for title-backed heaps, graphics root arguments in the s8 window, slot 70 views over title memory, vertex and index views in title memory.
  • A run of more than about five minutes needs a memory cap here: NVIDIA's compiler takes the title's largest compute modules and memory goes from about 20 GB to over 50 GB.

No game data, addresses or offsets are in the branch (scripts/check_no_game_data.py over every added or changed file, plus a grep for image addresses).

AI-assisted (Claude Code); built, run and measured on the machine above.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HxBQf4pXH8PWpC5oZsM4bt

Vadson159 and others added 30 commits November 23, 2026 17:24
PSOs a session built were compiled again by the next one. The layer already read the `pipelines` stage's
pipeline_cache.bin beside gta6rt.exe (ProjectLeonida#367), but never wrote anything back.

Now the runtime keeps its own cache in pipeline_cache.session.bin beside it: vkGetPipelineCacheData on device
teardown, then vkMergePipelineCaches into the cache at the next launch. Vulkan takes one blob per create, so the
offline seed and the session file are two caches merged together rather than one file. They are deliberately
separate files, so a run can never replace the multi-GB corpus cache with the handful of pipelines it compiled.

The write is capped at 256 MiB (LEONIDA_PIPELINE_CACHE_BYTES=<bytes>, 0 turns it off): a cache seeded from the
corpus comes back as the whole union, which is not worth rewriting at every exit; past the cap the previous
session file is left alone. A foreign or truncated session file is ignored with one line, and so is a failed
write (a read-only install directory).

The header check moves to runtime/src/pipeline_cache_store.h, shared with the offline seed and tested without
Vulkan (runtime/test/pipeline_cache_store_test.cpp: the limit parser and the 32-byte
VkPipelineCacheHeaderVersionOne comparison). write_pipeline_cache_file moves from runtime/test to runtime/src so
the runtime and vk_pipeline_check use the same staged write.

Not run: this machine has neither MSVC nor the Windows SDK, so the shim itself is compiled by the Windows job.
The portable test passes here (23/23 ctest on Linux). The end-to-end check needs a Vulkan GPU: run
d3d12_vulkan_device_test twice and look for "wrote N bytes to pipeline_cache.session.bin", then "merged N bytes"
on the second run.
…lists (19) as triangles

A rectangle list is three corners; the fourth is v2 + v3 - v1 for the position and every interpolant, after the vertex stage. A quad list is four vertices per quad. Vulkan has neither. A PSO with topology type 19 was refused (E_INVALIDARG) and the two list topologies drew as a plain triangle list.

Rectangle list: the PSO becomes a triangle-list pipeline with a generated geometry stage (src/rect_list_geometry.h), built from the vertex shader's own SPIR-V outputs, that emits the strip v1 v2 v3 v4. Quad list: one triangle fan per quad (0 1 2, 0 2 3), drawn with the index values 4q..4q+3 so the translated vertex id (VertexIndex - BaseVertex) is right; non-indexed draws read a shared 0, 1, 2, ... buffer reserved in the arena.

Facts from xvalkyrie (GPL-3.0, commit 53af7df77c10); no code copied.
…ty Geometry, log cut-off quads (review fixes)
Depends on: #7384
AI-assisted: yes (Codex)
…the title's VA

When VK_EXT_external_memory_host refuses the title's pages (write-combined or uncached pages, pages not committed yet, no extension, or the driver's import budget: about 64 MiB on an RTX 3070 Ti), the fallback was an ordinary DEFAULT buffer with neither the title's VA nor its data, so the title's descriptors resolved to nothing (slot 70 wrote a null SRV) and UI draws sampled nothing.

The fallback is now a host-visible buffer (VRAM through Resizable BAR where upload buffers use it) whose console VA is the title's address, filled from the title's pages at creation and again before every submission of command lists (VulkanContext::set_before_execute, called from VulkanQueue::execute_now). Only committed, readable pages are read; the rest is zero. GPU writes to the shadow are not copied back.

The first per-submission copy of each buffer size is timed and logged. Write-combined pages are read with MOVNTDQA: memcpy read 64 MiB of them in 253 ms on a Core i9-13900K, MOVNTDQA in 13 to 17 ms.

Tests: write-combined, uncached, 64 MiB write-combined and half-committed ranges in d3d12_existing_heap_test, two patterns over two submissions each, 0 validation errors on an RTX 4090.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Clang's baseline x64 target cannot inline _mm_stream_load_si128 into copy_guarded. Give only that function the target feature the existing intrinsic requires; keep the MSVC path and global build flags unchanged.

Depends on: #8225. Claimed in #8186, comment7110252121. AI-assisted: yes (Codex).
… buffer V#s the layer writes

Xbox device slot 133 places a buffer at the title's own VA, about 1.5 TiB on
Windows, while a translated shader computes heap_base + console VA with
heap_base the arena's device address. A root view or V# naming that VA
missed the buffer. The layer now translates an address inside a
title-placed buffer where it writes it (root CBV/SRV/UAV, CBV and buffer
SRV/UAV V#s): to the arena offset of the slot-133 shadow, which now lives
in the GPU address arena when it fits, or to an import's device address
minus heap_base. New tests: title_va_alias_test, d3d12_title_va_test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ugh an arena window

A root view or buffer V# may name the title's own memory outside any
slot-133 buffer (a per-frame constant ring, #8862 section 3.5). The
layer now makes a 64 KiB-aligned window of those pages in the GPU
address arena, copies it before every submission like a slot-133
shadow, and names that copy instead: for root views when set, for V#s
the layer writes, and for buffer V#s the title writes into a bound
CBV/SRV/UAV table itself, rewritten in place before each submission.
Counters per kind, LEONIDA_TITLE_WINDOWS_MB caps the windows (64 MiB).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… declared slots and is timed

The xmem shims record what they hand the title (XMemAlloc, XMemAllocDefault,
XMemVirtualAlloc, the title's VirtualAlloc); an address outside those ranges
is left as it was and counted. The submit-time scan reads only the
CBV/SRV/UAV slots the bound table's root signature declares, and its cost
is accumulated per ExecuteCommandLists. Section 3.3 describes the three
places addresses are replaced and the two kinds of copy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…, not the GLSL keyword out

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er variables

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…are pulled in before the scan

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…at inputs use the first quad vertex, and the PSO topology type is read as raw bits

Taken from the follow-up patch of @matheuskshn (930e78a2, tested by them on an RTX 4070 Ti: replay_quad_list_test fails the two non-indexed cases on a6b31d5 and passes with it). Re-run here: replay_quad_list_test and d3d12_rect_list_test exit 0 on the pod (Wine, RTX 4090).
…ed value

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e told apart from float outputs on the vertex side (comment only)
@roanh47

roanh47 commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Windows / RTX 3070 frame-loop result

Tested the PR #321 head e0d4fd2b81e6636b1c6bb2f76be79e910e84d84b on Windows 11, MSVC 14.44.35207, NVIDIA GeForce RTX 3070 (Ampere), driver 610.88, Vulkan SDK 1.4.363.0, with a byte-verified 1.0.2.1 package (108/108 manifest entries).

The full shaders stage completed first: 26,503 corpus shaders, 21 FSPX programs, 52 BVH programs and 2,528 pipeline-library programs. The runtime loaded 29,104 translated shaders.

Guarded boot

A wrapper sampled free system RAM every 2 seconds and stopped the process if it fell below 3 GiB.

Measurement Result
Wall time 284.4 s
D3D12 calls 63,176
CreatePipelineState ok 50,456
CreatePipelineState failed 14
PresentX ok / failed 30 / 0
DrawInstanced 26
ExecuteCommandLists 61
Peak private memory 20.94 GiB
Peak working set 16.67 GiB
Minimum free RAM 2.88 GiB
Startup exceptions / unimplemented imports 0 / 0

The stack reached the frame loop and continued presenting until the RAM guard stopped it. There was no crash, no failed present and no title int3 in the startup trace.

The first D3D12 failures were 14 CreatePipelineState refusals for one executable-embedded vertex shader that this branch does not translate; they were nonfatal and are the already-tracked RT-EXE-SHADERS work (#387). The 10,241 unsupported calls were CreateLifetimeTracker (#438). The actual end of this run was the memory guard, not a runtime exception.

Command evidence

$env:LEONIDA_D3D12 = 'vulkan'
$env:LEONIDA_SHADERS = '<work>\shaders\spirv'

& '<frame-loop>\runtime\build\windows-rtx3070\gta6rt.exe' `
  --run '<package>\game_scarlett_master.exe' `
  --game-dir '<package>' `
  --overlay '<writable overlay>' `
  --trace "$env:TEMP\leonida-frame-20261124-131518.jsonl" `
  --trace-d3d12

# The wrapper stopped the process at 2.88 GiB free after 284.4 s.
python -I tools/boot_trace.py `
  "$env:TEMP\leonida-frame-20261124-131518.jsonl" `
  --d3d12 "$env:TEMP\leonida-frame-20261124-131518.stderr.log" `
  --counts-only

boot_trace.py --counts-only reported 63,176 calls: 52,372 ok, 547 called, 14 failed, 10,241 unsupported and 2 other.

Follow-up patch

Claimed RT-LAZY-PSO-RECT-LIST in coordination issue #14: #14 (comment)

Focused local commit 8930bfbc2 on fix/lazy-pso-rect-list (main + #511 + #682) generates rectangle-list geometry before the lazy-PSO stage cleanup releases the translated vertex words. Before the fix, both rectangle-list tests failed with “the vertex shader is not a SPIR-V module”; after it, both pass on this RTX 3070, including with LEONIDA_VK_VALIDATION=1:

d3d12_rect_list            Passed
d3d12_rect_list_lazy_pso   Passed
100% tests passed, 0 validation errors

Counts and outcomes only; no game data included.

AI-assisted (DeepSeek v4.1 Flash 1017).

@roanh47

roanh47 commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Provenance clarification for the 14 nonfatal PSO refusals: the shader build was run from plain main, whose shaders stage does not produce spirv/exe/index.json. PR #321 already has both the executable-shader build step and runtime loader for that subindex. The verified executable contains one embedded vertex shader and nine embedded pixel shaders, so the repeated missing-VS refusals are consistent with that omitted subindex and remain covered by RT-EXE-SHADERS / #387.

No game data included.

AI-assisted (DeepSeek v4.1 Flash 1017).

@roanh47

roanh47 commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Windows / RTX 3070 — PR #321 + #511 + rectangle-list fix + #588 + #461 + #517

Tested on Windows 11, MSVC 14.44.35207, NVIDIA GeForce RTX 3070 (Ampere), driver 610.88, Vulkan SDK 1.4.363.0, with a byte-verified 1.0.2.1 package.

Stack head: 2ffc005d9 (PR #321 e0d4fd2b8 plus local cherry-picks of #511, rectangle-list fix 8930bfbc2, #588, #461, #517 and an opt-in allocation tracer).

Validation

xg_xs                         Passed
d3d12_xbox_d16s8              Passed
d3d12_b4g4r4a4_target         Passed
d3d12_rect_list               Passed
d3d12_rect_list_lazy_pso      Passed
100% tests passed, 0 validation errors

Guarded boot

Command:

$env:LEONIDA_D3D12 = 'vulkan'
$env:LEONIDA_SHADERS = '<work>\shaders\spirv'
$env:LEONIDA_LAZY_PSO = '1'
$env:LEONIDA_ARENA_MB = '1024'
$env:LEONIDA_ALLOC_LOG = '1'
$env:LEONIDA_CAPTURE = '<capture dir>'
$env:LEONIDA_CAPTURE_EVERY = '1'
$env:LEONIDA_CAPTURE_LIMIT = '10'

& '<stack>\runtime\build\windows-rtx3070\gta6rt.exe' `
  --run '<package>\game_scarlett_master.exe' `
  --game-dir '<package>' `
  --overlay '<writable overlay>' `
  --trace '<temp>\leonida-lazy.jsonl' `
  --trace-d3d12

The wrapper stopped the process if free RAM fell below 3 GiB or after 600 seconds.

Measurement Result
Wall time 40.0 s
D3D12 calls 84,673
Outcomes 56,414 ok · 1,741 called · 3 failed · 26,497 unsupported
CreatePipelineState ok / failed 54,202 / 2
PresentX ok / failed 16 / 0
Draws 22
Captured frames 7
Peak private memory 8.59 GiB
Peak working set 3.96 GiB
Minimum free RAM 13.71 GiB

All seven captured frames are 2564×1421 and 100% black (mean RGB 0.00, one unique color).

First stop advanced

The previous int3 at game_scarlett_master.exe+0x344196 is gone. That assert was the high dword of GetResourceAllocationInfo().SizeInBytes; allocation tracing identified a 2560×1440 B4G4R4A4 render target returning UINT64_MAX, already fixed by claimed PR #517.

The new stop is a title int3 at game_scarlett_master.exe+0x14a6390, after ID3D12Device10::CreateCommittedResource3 refuses a 3D depth-stencil resource (768×768×6, format 53, ALLOW_DEPTH_STENCIL). Last recorded call: #84673 CreateCommittedResource3 failed.

Also measured in this run:

Follow-up claimed

RT-TITLE-RESERVATION-ARENA in coordination issue #14: #14 (comment)

The measured NVIDIA path is to allocate the title's placeholder reservation from inside the arena's host mapping and rebase title addresses by subtraction, rather than importing a separate sparse buffer. This depends on #375/#644 but does not duplicate them.

Counts, shapes and outcomes only; no game data included.

AI-assisted (DeepSeek v4.1 Flash 1017).

@Dezmonius

Copy link
Copy Markdown
Contributor

Native Windows synthetic presentation check on integration head e0d4fd2b8: Windows 10 22H2 (19045), RTX 5070 / NVIDIA 610.88, MSVC 19.51.36256, Vulkan.

  • d3d12_present passed with Khronos validation 1.4.369: 70 frames through the Xbox-ABI proxy, swapchain recreation on resize, and the expected colour in the captured presented images.
  • xbox_present passed with validation off, including readback, colour composition and the real-time 30-frame loop.
  • With LEONIDA_VK_VALIDATION=1, two stock xbox_present runs exited 0xc0000409. An unbuffered diagnostic repeat exposed the layer message: The VkDevice dispatch handle was not found and Validation will crash. The earlier standalone-device capture had already passed. The last runtime line was the Xbox proxy's first Release; the exact Vulkan call and root cause are still unconfirmed.

This is a synthetic test finding. The retail executable was not run and these results do not establish the cause of a blank retail frame. No game files or game logs used for these tests. AI-assisted (Codex).

@otaviosza

Copy link
Copy Markdown

Tested on native Windows with MSVC, which the description says was not tried yet: Windows 10 22H2 (19045), NVIDIA GeForce RTX 3060, driver 610.88 (32.0.16.1088), MSVC 19.44, Windows SDK 10.0.26100, LEONIDA_D3D12=vulkan, own 1.0.2.1 copy, shaders translated by make_game.py on main.

  • scripts/build_runtime.ps1 does not parse on this branch: line 84 (the cl.exe fallback's $files list) has merge debris (ForEach-Object { "", "shims\dstorage.cpp", "shims\xbox_bvh_builder.cpp"$src$_"" }), so the whole script fails with a ParserError even on the CMake path. I built with the generated CMake + Ninja commands directly; all targets build with MSVC.
  • Run: still running at my 120 s limit, peak private memory 12.9 GB. An earlier run with about 12 GB of free commit ended at 29 s with LLVM ERROR: out of memory from the driver's compiler.
  • 14 slot-67 compute pipelines fail with no translated compute shader for FSPX kind-6 and kind-0 sha256 … (0x80070057); none of those hashes appear anywhere in the work folder's indexes.
  • PS_BlitColour_* is wave64 and the device is 32-wide, so it runs inexact ("no emulation exists for wave64 ps shaders yet").

QemmHD added a commit that referenced this pull request Nov 24, 2026
… answered on main and pending retail

The Where entry still said the integration tree "carries a fix for stop 4 that main does not", which reads as a
missing fix. It now names the commit the retail measurement was taken at (867d922) and says the integration
tree clears stop 4 with #4313. Status opens with "answered on main by b7a3fed and 4710549 ... the retail
confirmation is still pending", and names #4313 (carried by #321 and #64) as an alternative design.

Tested: tests/test_docs_*.py, 47 passed (test_docs_links green); the repo-consistency set, 566 passed, 5 skipped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SR1Fv7eQNgZjM6miWPKjHf
Sigtryggur-Mani-Gudmundsson added a commit to Sigtryggur-Mani-Gudmundsson/graphics-runtime-patches that referenced this pull request Nov 24, 2026
Sigtryggur-Mani-Gudmundsson added a commit to Sigtryggur-Mani-Gudmundsson/graphics-runtime-patches that referenced this pull request Nov 24, 2026
Independent command-generation and argument checks for ProjectLeonida/mandy#321.
Sigtryggur-Mani-Gudmundsson added a commit to Sigtryggur-Mani-Gudmundsson/graphics-runtime-patches that referenced this pull request Nov 24, 2026
Record the 16-run Wine/RTX 4070 Ti matrix against Mumogg's integration head. Track the distinction from Dezmonius's Windows dispatch report in ProjectLeonida/mandy#321.
Sigtryggur-Mani-Gudmundsson added a commit to Sigtryggur-Mani-Gudmundsson/graphics-runtime-patches that referenced this pull request Nov 24, 2026
Compare two source-built presenters with a standalone native/Wine control. Follow up on Dezmonius's integration measurements in ProjectLeonida/mandy#321.
@TomTomAIbot

Copy link
Copy Markdown

Independent Linux/Wine validation of exact head e0d4fd2b81e6636b1c6bb2f76be79e910e84d84b, plus an isolated rendering-patch comparison. AI-assisted.

Hardware/environment: Ryzen 7 9800X3D, RTX 5090, NVIDIA 620.73.04, Wine 11.22, Linux 7.3.6-1-cachyos. Title runs used the actual desktop, isolated networking, read-only package input, and separate writable artifacts. No shader substitutions or exception-skipping flags.

Build/test results

  • Native and full Windows cross-builds passed.
  • Semantic suite: 6,075 tests across 463 files, zero failures.
  • Native CTest: 71 passed, 2 skipped, zero failures.
  • Full Windows CTest under Xvfb: 262 passed, 28 failed, 32 skipped (322 total). The 28 include timeouts in dxgi_host_parity and dxgi_waitable_latency. Some failing comparisons use Wine's host D3D12, not Microsoft's implementation; this is not a clean compatibility result.
  • Fresh matching shader stage: main 26,503/26,503 translated and SPIR-V-valid; auxiliary entries: FSPX 21/29, BVH 52/52, library 2,528/2,684, executable 10/10. Runtime lookup reached every main entry, zero lookup failures.

The comparison applied the published boot-rectangle-corners, graphics-root-layout, descriptor-table-refresh, descriptor-write-through, and sampler-table-refresh mailboxes from graphics-runtime-patches, preserving authorship. One overlapping sampler hunk needed the intended helper rename to table_descriptor_count. All 15 focused tests passed, including enabled/disabled descriptor and sampler controls, second-device rebinding, rectangle geometry, and compact/legacy root layouts. Shader tools were unchanged.

Real title results (PresentX counted at one layer, not double-counted):

Configuration Bound DrawInstanced PresentX Captured samples
Exact PR head, defaults 180 s 3,602 1,201 4, all black
Published rendering patches, defaults 180 s 2,807 936 4, all black
Patches + graphics stage layout 180 s 647 218 1, black
Same + LEONIDA_ARENA_MB=1024 180 s 3,602 1,201 4, all black
Same, longer observation 300 s 197,101 65,702 24, all black

Each was stopped by its time bound (exit 124), not an application crash. These are not performance comparisons; later runs reused caches. The longer run experienced cgroup MemoryHigh pressure and swap use, but no hard-limit/OOM kill.

Concrete finding: with the 256 MiB default, the first three runs logged 14/12/14 slot-67 native compute failures returning E_OUTOFMEMORY. At 1 GiB these disappeared, with no logged arena refusals. Allocation logging reached 256.37 MiB in the 180 s run, beyond the old limit. The longer run still had nine slot-67 E_INVALIDARG failures, each accompanied by a missing translated compute-shader diagnostic.

This confirms a frame loop here, not visible gameplay. Increasing the arena removes one observed failure but does not solve the black frames. Next comparison is the newer first-run UI integration in #939. No game-derived files, raw title logs, shader identifiers, or captures attached.

@aslan2142
aslan2142 merged commit e0d4fd2 into ProjectLeonida:main Nov 25, 2026
1 check passed
aslan2142 pushed a commit that referenced this pull request Nov 25, 2026
…first-run UI

Build on the public frame-loop integration in #321. Carry the texture-view and depth work from #213 and #261, the layout provider from #461, the responsive window from #526, and the rectangle generator from #682. Integrate the Xbox constant-buffer row addressing measured in #513 and the draw-time rectangle selection in #722. Keep all fixtures synthetic.

The Windows GPU path resolves title-owned shader objects, retires geometry uploads per submission, materializes texture views on use, maps linear surfaces, and delivers completed GPU label writes. A first-run UI launch selects the tested settings for these paths.
YaBulochka added a commit to YaBulochka/leonida-1 that referenced this pull request Nov 25, 2026
…ax, wrxchg b64)

Six wave32 fixtures for the docs/design.md rows 321, 322 and 324, each an
eight-word dump and lane 0 alone running the atomics:

- cs_w32_lds_mskor (ProjectLeonida#321): ds_mskor_b32 and ds_mskor_rtn_b32, including DATA2
  bits outside DATA being ORed in (0x11223344, mask 0x0000FFFF, DATA2 8 ->
  0x11220008) and the rtn old word.
- cs_w32_lds_atomics_incdec / _atomics_rtn (ProjectLeonida#322): ds_inc/dec/rsub_u32 at the
  DATA-1, DATA, above-DATA, 0 and 1 boundaries, the rsub wrap, and the pre-op
  word each _rtn_ form returns.
- cs_w32_lds_minmax_f32 (ProjectLeonida#322): ds_min/max_f32 and the returning forms with a
  qNaN in either operand, -0/+0 and +inf/-inf.
- cs_w32_lds_wrxchg_b64 (ProjectLeonida#324): ds_wrxchg_rtn_b64 and ds_wrxchg2_rtn_b64, the
  old pair, vdst order at *8 offsets 1 and 2, and the words written.
- cs_w32_lds_wrxchg2st64_b64 (ProjectLeonida#324): ds_wrxchg2st64_rtn_b64 at *64 offsets 1
  and 2 (0x200/0x400) over a 2 KiB LDS, with *8 markers so a wrong unit fails.

Registered in check.py (CS_DUMPS and both wave32 lists), run_gpu_tests.py
(every table and the wave64 exclusion), and regen_fixtures.py. Pinned by
tests/semantic/test_batch5_gpu_fixtures.py, which runs the same eight words
through spirv_mini_interp.

Both runners pass on the RDNA2 iGPU (gfx1036, RADV Mesa 27.0.0-devel), 8/8
words per fixture. No translator mismatch appeared.
milk4sale pushed a commit to milk4sale/leonida that referenced this pull request Nov 25, 2026
…C-README-BOOT-STATUS)

The status still said the game does not boot and the PE loader row said it
was untested against the real executable. Since ubiquitarianism#321, ubiquitarianism#939 and ubiquitarianism#984, main
boots the game from your own copy on native Windows and on Linux through
Proton, through the story load into the world phase, as
docs/linux_proton.md and docs/first_run_ui.md record.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs rebase Conflicts with the base branch: rebase it on main

Projects

None yet

Development

Successfully merging this pull request may close these issues.