Commit Graph

390 Commits

Author SHA1 Message Date
48a56aa93e Merge pull request #494 from bobcatchris/shader-index-recovery
SHADER-INDEX-RECOVERY: rebuild damaged translation indexes from shards
2026-11-28 11:56:25 +01:00
dcb9c0ea3c Merge pull request #2042 from alexandersato0830/codex/pipeline-index-top-level-object
Reject shader indexes with a non-object root before pipeline checks (PIPELINE-INDEX-TOP-LEVEL-OBJECT)
2026-11-28 11:47:39 +01:00
90642c3259 Merge pull request #1319 from fin-github/codex/draft-285
make_game: keep checking pipelines when the previous crash report is locked (DRAFT-285)
2026-11-28 08:46:22 +01:00
73fdc2a4c6 rdna2spirv: enable FTZ32/fmulz and per-load NonWritable SMEM with outlined slow paths
Enable DenormFlushToZero 32 alongside DenormPreserve 16 (with --no-ftz32
override and fmulz fusion), add sound per-load NonWritable scalar memory
analysis for descriptor/read-only SMEM loads, and outline wide s_buffer_load
partial-OOB slow paths into shared helper functions.

AI-assisted: Antigravity (Gemini 4 Neon).
2026-11-27 21:13:24 -05:00
4ff5c90644 make_game: say which mesh shaders --mesh-serial-waves changes
Review note on #2513: the help text and the README said only 'more than 64
threads'. The translator also needs a wave64 program, a thread count that is
a multiple of 64, and no LDS instruction, store or atomic; the others come
out as before. Both texts now say so, and that the option retranslates
everything but changes only those.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-28 10:11:28 +08:00
f05bf62eaa make_game, progress_dashboard: update default repository URL to ProjectLeonida/mandy (CI-REPO-URL-RENAME) 2026-11-28 09:55:01 +08:00
a1e0465356 test: cover mixed BCPack calibration and history 2026-11-28 00:59:20 +01:00
c6f39028a6 make_game: --mesh-serial-waves forwards the translator's switch (BUILD-MAKEGAME-MESH-SERIAL-WAVES)
#2435 added rdna2spirv.py --mesh-serial-waves, but make_game.py never passed
it, so a build of main got none of its effect. The option is one more entry
in FALLBACK_FLAGS: forwarded to every translator run, recorded in
translator_flags.txt, and turning it on or off translates the shaders again.
Off by default; it changes nothing for shaders translated natively or with
--mesh-compute.

Tests: the option is opt-in and forwarded, it is recorded after the older
flags so existing folders keep their recorded spelling, and every forwarded
flag is an option the translator defines.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-28 07:38:24 +08:00
be3e9c1424 descriptors: the T# index word in the contract table, README and translator source lists
docs/design.md states what the pack and the runtime agree on (the tag 0xA << 28, index 0, how an older pack is
recognised) with the counts; runtime/README.md says what LEONIDA_CONSOLE_HEAP_GPU does with an index-word pack;
make_game.py and runtime/cmake/translator_deps.cmake list the translator's new imports (descriptor_sources.py,
heap_index_census.py), so a pack and the test shaders are made again when they change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 06:20:53 -05:00
0513e00b07 rdna2spirv: the 4x8-bit dot products as SPV_KHR_integer_dot_product
v_dot4_i32_i8, v_dot4c_i32_i8, v_dot4_u32_u8 and v_dot4c_u32_u8 become one
OpSDot / OpUDot on the packed bytes plus OpIAdd for the addend, and
OpSDotAccSat / OpUDotAccSat under clamp (both saturate the addend plus the
exact sum, as the hardware does). op_sel halves are put together into one
dword first. RADV did not re-form v_dot4 from the old expansion (four
extracts, multiplies and adds each), which made the FidelityFX upscaler
passes ALU bound.

--integer-dot-fallback keeps the expansion for a device without
shaderIntegerDotProduct (required by Vulkan 1.3): vk_subgroup_info.py
reports integer_dot_product and make_game.py turns the flag on where it is
false. The runtime and vk_pipeline_check enable the feature where the
device has it; the interpreters of the semantic tests run the new ops.

Tested: tests/semantic/test_packed_dot4.py (new fixtures), the translator
suite, tools/dot_diff.py on the four ops, a wave32 GPU program on the
Radeon iGPU (gfx1036) and the RX 7900 XTX against the gfx1036-measured
words, RADV statistics of the upscaler passes (docs/design.md row).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 05:48:33 -05:00
c9809d9768 Merge main into fix/make-game-pick-macos-osascript 2026-11-27 09:52:46 +01:00
0dcf650d1c Merge remote-tracking branch 'origin/main' into fix/explicit-lod-bias-moltenvk
# Conflicts:
#	tools/rdna2spirv.py
2026-11-27 00:51:00 +01:00
7ffcb8e260 Merge upstream/main into input-out-of-the-box
docs/gameinput.md conflicted on two passages, both kept:
- main's new LEONIDA_INPUT_FILE paragraph, with this branch's sentence on
  make_game.py running build_runtime.ps1 with -FetchSdl3 (and --no-sdl3)
  added to main's wording of the build paragraph;
- the settings table keeps this branch's LEONIDA_KEYBOARD_PAD default (1,
  focused; off removes it), which gameinput.cpp reads, and takes main's longer
  LEONIDA_INPUT_SCRIPT row (button@seconds:hold, the six-reads rule), saying
  "on unless LEONIDA_KEYBOARD_PAD=off" for the keyboard pad.

No code conflicted. Tested: full ctest, 113 of 113, on Linux (the portable
subset; the gameinput shim is Windows-only).

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-26 18:59:07 +00:00
82d0dfcc40 make_game: a folder chosen in kdialog/zenity whose name is not valid in the locale encoding no longer stops --pick (MAKE-GAME-PICK-FSDECODE)
native_ask ran kdialog/zenity with subprocess.run(text=True), so a
folder whose name the locale encoding cannot decode made the call raise
UnicodeDecodeError, which pick_game does not catch (it only catches
OSError). The dialog's answer is now read as bytes and decoded with
os.fsdecode, whose surrogateescape str round-trips through os.fsencode
to the same bytes the tool printed; the return codes keep their meaning.

print()ing that str on a UTF-8 terminal raises UnicodeEncodeError, so the
log lines about the chosen folder go through the new show_path(), which
shows the undecodable bytes escaped; the path handed to the build is
untouched. tests/test_make_game_pick_fsdecode.py covers both with a
stand-in dialog printing raw bytes (python -I, standard library only).

AI-assisted.

Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 16:58:20 +01:00
d0ab80c095 make_game: a CPU Vulkan device does not decide the wave64 emulation
--wave64-emulate auto took the smallest maxSubgroupSize over every device
vulkaninfo lists. On a machine with llvmpipe installed beside AMD GPUs
that run wave64 natively (RX 7900 XTX and an RDNA2 iGPU, RADV), the
shaders stage logged "smallest maximum subgroup size is 8" and emulated
all 23,841 wave64 shaders.

The runtime ranks a CPU device below every GPU
(runtime/src/vulkan_device_filter.h, tools/vk_subgroup_info.py
device_rank), so it never runs the shaders there while a GPU exists.
max_subgroup_decider() reads each device's deviceType beside its
deviceName (text and --json output) and leaves CPU devices out unless no
other device is listed. The log names the device that decided and the
devices left out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 09:12:03 -05:00
99f913a288 Merge upstream main into input-out-of-the-box
Keep the PR keyboard-pad default and document the retry behavior from main.

Conflict resolution assisted by Codex.
2026-11-26 06:36:39 +00:00
9af0a22768 make_game --pick: on macOS, the folder dialog is osascript's choose folder, so it needs no Tkinter
Homebrew's Python ships without Tkinter, so --pick on a Mac stopped with "The folder dialog couldn't open (No module
named '_tkinter')". osascript is on every Mac; it is the native tool there, as kdialog and zenity are on Linux, with
Tk still the fallback. Prompt and folder go in as arguments, so nothing is quoted into the script.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 04:06:53 +01:00
3fc6184290 make_game: drop the unreachable second try in runtime_gpu_explicit_lod_bias (#1774 review)
Left over from the earlier draw-based version: it followed a try that always
returns and named an undefined build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 00:09:20 +01:00
b145659304 Merge remote-tracking branch 'origin/main' into fix/explicit-lod-bias-moltenvk
# Conflicts:
#	tools/vk_subgroup_info.py
2026-11-25 23:54:57 +01:00
d601736ced Merge pull request #723 from aslan2142/build2835-partial-version-match
OLD-7895: restore old upstream PR 7895 - make_game: an incomplete copy is named as a partial match of its version, with what is missing
2026-11-25 23:26:11 +01:00
53ab2c9666 Merge upstream main into input-out-of-the-box 2026-11-25 21:56:35 +00:00
d919356421 Merge pull request #639 from DesertGamer/fix/make-game-vulkan-sdk-warn
make_game: warn when the runtime stage runs without VULKAN_SDK (MAKE-GAME-VULKAN-SDK-WARN)
2026-11-25 22:25:10 +01:00
7b52328752 Merge pull request #482 from xroneyaa/fix/make-game-tool-available-spaces
PREFLIGHT-TOOL-AVAILABLE-SPACES: parse quoted paths with spaces in make_game.tool_available
2026-11-25 22:23:53 +01:00
2b78ecb22a Merge pull request #433 from Rain156/fix/full-check-jobs
make_game: honor --jobs during full package verification (VERIFY-FULL-CHECK-JOBS)
2026-11-25 22:23:05 +01:00
9200934dd0 Reject translated shader indexes with a non-object root 2026-11-25 12:50:19 -06:00
a03715c46a vk_subgroup_info --lod-bias: measure mipLodBias with one compute dispatch, no test programs needed (SHADER-EXPLICIT-LOD-BIAS-MVK)
tools/vk_lod_bias.py clears a two-level R32_SFLOAT image to 0.0 / 1.0 and
samples it at explicit LOD 0 through samplers with mipLodBias 0 and +1, from
Python through ctypes. vk_subgroup_info.py --lod-bias reports the answer as
explicit_lod_bias; lod_bias_probe.py uses it first and draws ps_ssharp only as
a fallback, with the Homebrew llvm-mc hint when llvm-mc is missing (#1774
review). build.py and make_game.py can now measure too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 19:38:34 +01:00
6a721500ae install_runtime: keep the old file when its own restore fails, drop stale staging folders, build the BCPack history under shaders/ (review of #1446) 2026-11-25 15:18:33 -03:00
d1ec0218e5 Merge remote-tracking branch 'ubq/main' into HEAD 2026-11-25 15:17:40 -03:00
b6b1fe75fc make_game assets: start the BCPack follow-ups with the most pixels to decode
The pass ran the largest source pools first, but a pool's file size says little about its follow-up time: on the
retail package the slowest pool (467 s alone) is a 0.79 GiB one with 1,038 candidate rows, while each 2.5 GiB
terrain pool has ~250 and takes 280-400 s. Started 34th of 52, it ran alone for the last five minutes.

follow_cost() counts the pixels of the rows complete_pool() decodes (the rows ttpf_assets.candidate accepts), 0 for
a pool the pass already stamped, from the manifests assets() reads anyway: the completeness check before the
exports and the one after each export. Only the number is kept; the worker reads its manifest again.

Over the 52 pools measured, the pixel count ranks the serial times with Spearman 0.82 (source size 0.44). On a
replay of the pass with 12 workers it brings the pass from 927 s to 624 s, the time of the slowest pool alone; the
output is byte-identical to the serial build's.
2026-11-25 14:52:12 -03:00
740445ab62 make_game assets: BCPack follow-ups in worker processes, largest first
On top of tedin7's change, for the follow-up pass (ttpf_assets.complete_pool):

- Each worker reads its own pool's manifest (follow_pool), so the build no
  longer parses every pool's catalog before the pass, holds them all at once
  or pickles one to each worker.
- The largest pools start first, so the longest one doesn't run alone at
  the end. Log lines still come in pool order once the pass is done.
- Progress ticks as each pool finishes. After a failure the pools not
  started yet are dropped and the earliest failure in list order is raised.
- The budget is the stage's: --jobs, or its share when the assets stage
  runs beside the shaders stage; at most 61 workers on Windows
  (ProcessPoolExecutor's limit).

The archive and pool exports run one at a time again, each with the whole
budget: one rpf9dump ttpf export already keeps about 3/4 of 24 cores busy
and peaked at 8.2 GiB here, so side-by-side exports would add memory for
little time.
2026-11-25 14:52:12 -03:00
fd19cb2a7c make_game: run asset exports and pool follow-ups on --jobs workers, results in order 2026-11-25 14:52:00 -03:00
dda535e1c5 Add CrossOver bottle support to the generated runtime launcher 2026-11-25 18:24:22 +02:00
66b27ac6e2 lod_bias_probe: measure whether the sampler applies mipLodBias instead of keying --explicit-lod-bias on MoltenVK's driver ID (SHADER-EXPLICIT-LOD-BIAS-MVK)
The same MoltenVK 1.4.2 drops the bias on an Apple M3 and applies it on an
Apple M5 Pro (#1774 review), so the driver-ID rule turned ps_ssharp red on
the M5 Pro. tools/lod_bias_probe.py translates vs_ids and ps_ssharp without
the flag and draws LOD_BIAS 0, +1 and -1 with vk_sampler_test; the flag is
on only when +1 and -1 read the no-bias levels. run_gpu_tests.py, build.py
and make_game.py take its answer; vk_subgroup_info.py is back as on main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 15:18:12 +01:00
93a0f21f49 BUILD-STAGES: report a stage that raises instead of failing silently
A stage that raises outright (not through fail()) was swallowed by the
run_build_stages exception handlers: the build stopped with exit 1 and an
empty stderr, so a permission or copy failure gave no visible cause
(board #1608 comment 7163281819). Report the stage name and the exception
once per stage on stderr from the series loop, the wait handler and the
final drain; fail()'s own diagnostics are unchanged and RuntimeError from
its sys.exit is not re-reported.

Tested: tests/test_leonida_tui.py UnexpectedStageExceptionTest (both
overlap modes, fails without the fix); test_make_game_* and stage suites
pass.
2026-11-25 13:16:50 +00:00
1d19671ebd rdna2spirv: --explicit-lod-bias applies the S# LOD bias in the shader where MoltenVK drops the sampler's (SHADER-EXPLICIT-LOD-BIAS-MVK)
MoltenVK 1.4.2 drops VkSamplerCreateInfo::mipLodBias from both explicit and
derivative-LOD samples, so ps_ssharp's S# LOD_BIAS cases fail on every Mac.
With the flag the translator adds the S# bias (word 2 [13:0], signed 5.8) to
explicit LODs and to _b biases, as a Bias operand on implicit samples, and as
a 2^bias scale of Grad derivatives. tools/vk_subgroup_info.py reports
explicit_lod_bias for MoltenVK's driver ID, and run_gpu_tests.py, build.py
and make_game.py turn the flag on from it. ps_ssharp gains +-0.3 cases, which
fail when the bias counts twice.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 12:16:05 +01:00
354142d901 Merge main into carry-old-9937 2026-11-25 07:51:59 -03:00
2af23b9ac3 Guard game directory aliases on case-insensitive volumes 2026-11-24 22:15:45 -08:00
d4d969a1fd make_game, gameinput: controller, keyboard and mouse input out of the box (INPUT-OUT-OF-THE-BOX)
A build made with make_game.py on Windows had no input at all. The runtime
stage ran scripts/build_runtime.ps1 without -FetchSdl3, so on a machine without
an installed SDL3 the GameInput shim was not built. gta6rt then logged "served
without SDL3 (no devices)", and a connected DualSense or Xbox pad did nothing.

- make_game.py: the Windows runtime stage passes -FetchSdl3 (the pinned SDL3
  3.4.20, SHA-256 checked by CMake). --no-sdl3 leaves the download out. The
  docstring's "what it downloads" sentence names it.
- gameinput: LEONIDA_KEYBOARD_PAD defaults to the focused mode, so a player
  without a pad still has the keyboard and mouse. Keys count only while the
  game window has focus. "off" or "0" removes the pad.
- gameinput_test: the other cases set LEONIDA_KEYBOARD_PAD=off, as they count
  only their own virtual pads. The keyboard pad case checks the new default.
- docs/gameinput.md: default and make_game behaviour.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 08:31:50 +05:00
e47b4e4caf Merge pull request #1003 from Snooozs/dotnet-sdks-decode
Merging.

**Why merged:** `dotnet --list-sdks` output is decoded with errors="replace", so a non-UTF-8 console doesn't crash the check.

**Why it's good:** Own tests: 5 passed. The consistency set shows 583 because its new test file matches test_make_game_*.

Tested on Windows 11 / RTX 4070 SUPER: merged alone onto main b4b7756e8. 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 3ff2a2adc (after #984): 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).
2026-11-24 21:36:02 -05:00
154e4ec034 Merge the #984 result (main + RT-PROTON-STORY-LOAD) into #939
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>
2026-11-24 20:26:00 -05:00
39879ce0fd Merge main into RT-PROTON-STORY-LOAD (#984)
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>
2026-11-24 19:38:04 -05:00
d516872f9b make_game: stage the runtime install before replacing the old files (RT-249)
- make_game: stage the runtime install before replacing the old files (RT-249)
- make_game: publish the staged runtime all or none, with rollback (RT-249, old PR 5278)
- make_game: keep the old runtime files when the rollback itself is blocked (old PR 5278)

Carried over from old-pr/9937 (old upstream PR 9937), rebased on main.
2026-11-24 21:13:43 -03:00
8a5be5ce77 make_game: rebuild damaged translation indexes from shards
A truncated or malformed shaders/spirv/index.json could let the shaders stage report success and then leave the pipeline stage asking for another full translation. Treat a readable but malformed index as recoverable from completed shards, keep accepting a UTF-8 BOM index, and still reject a real empty merge. Also account for shaders/assets overlap in preflight free-space checks when both stages run.

Carried from the source patch in Sigtryggur-Mani-Gudmundsson's graphics-runtime-patches collection:
33ab48d3ea/README.md (recovering-a-damaged-shader-index)

AI-assisted.
2026-11-24 17:37:41 -06:00
b26e43491f make_game pipelines: after each batch, the share done and the time left, weighted by module size (PIPELINES-ETA)
The pipelines stage logged only "checking shaders N-M of T" per batch, while its batches of 500 modules take from
seconds to half an hour, so the stage gave no idea of when it would end. After each batch it now logs the shaders
checked, the share of the estimated compile time behind them and the time left at the pace so far, and the
elapsed time after the last batch.

A module's estimated cost is its SPIR-V size in MB to the power PIPELINE_COST_EXPONENT (1.5): a large module
compiles disproportionately slower. On one full-corpus run (RTX 5070 Ti, driver 621.24, 41 batches of 500 taking
16 s to 26 min) the batch times ranked with their bytes at Spearman 0.93, and the time left after 5 to 38 batches
was 55-85% under the actual by batch count, 33-50% under by bytes, 6-25% under with 1.5, and 3-41% over with 2.
The estimate only feeds the log line; batching and what runs are unchanged.
2026-11-24 20:34:00 -03:00
63fce8be54 Keep checking pipelines when the previous crash report is locked
(cherry picked from commit b3a8c538b7)
2026-11-24 16:45:20 -05:00
4a056a66c7 make_game: gta6rt.sh resolves a relative WINE before changing to the game folder 2026-11-24 21:38:05 +01:00
bb68bb93ae make_game: rebuild empty cached compute shader modules 2026-11-24 20:34:37 +00:00
eb4bdfdc46 Preserve pipeline crash report when a retry fails setup 2026-11-24 20:57:35 +01:00
273b3bdf9d [integration] Linux/Proton and native Windows: boot through the story load (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>
2026-11-24 11:42:12 -06:00
6c6c6ca868 BUILD-DOTNET-SDKS-DECODE: decode dotnet --list-sdks with errors="replace"
dotnet_sdk_ok() ran `dotnet --list-sdks` with text=True and no errors=
argument. The text decode uses the console code page (cp1252 on a German
Windows), so an SDK path holding a byte that code page leaves undefined
(for example a profile name with Ł, č or ď) raised UnicodeDecodeError in
the reader thread. The check then got stdout None and raised TypeError,
which the caller does not catch, so preflight stopped before the build
began. The neighbouring calls already pass errors="replace".

The new tests/test_make_game_dotnet_sdk.py runs a real python child that
writes the raw bytes, and covers an SDK 8 install, a runtime-only install,
no dotnet on PATH, and an undecodable byte with and without an SDK. On
origin/main the two undecodable-byte cases error; with the fix all five pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 17:42:31 +01:00