Commit Graph

18350 Commits

Author SHA1 Message Date
182746f038 Merge pull request #2189 from vinceychu/hw-image-load-pck
image_fuzz: image_load_pck / image_load_pck_sgn on the hardware oracle, measured on RDNA2 (HW-IMAGE-LOAD-PCK)
2026-12-01 15:53:45 +01:00
52e1c837b2 Merge pull request #1120 from kett1m/x64-recomp-vzeroupper
x64_recomp: vzeroupper is three bytes, not four (X64-RECOMP-VZEROUPPER-NO-MODRM)
2026-12-01 15:53:31 +01:00
214f5a78e9 Merge pull request #895 from trigger337/fix/manifest-stage-cleanup
manifest: restore write mode before unlink on replace failure and publish mode (MANIFEST-STAGE-CLEANUP)
2026-12-01 15:53:16 +01:00
87e6a53616 Merge pull request #881 from trigger337/fix/mesh-compute-vs-stage-cleanup
mesh_compute_vs: restore write mode before unlink on replace failure and publish mode (MESH-COMPUTE-VS-STAGE-CLEANUP)
2026-12-01 15:53:01 +01:00
04694f516c Merge pull request #875 from trigger337/fix/bary-fallback-gs-stage-cleanup
bary_fallback_gs: restore write mode before unlink on replace failure and publish mode (BARY-FALLBACK-GS-STAGE-CLEANUP)
2026-12-01 15:52:48 +01:00
e2a31342eb Merge pull request #872 from Tortoche/feat/bcpack-bc7-rans
tests: adversarial stress and mutational fuzzing suite for BCPack rANS decompressor
2026-12-01 15:52:35 +01:00
43c7b343a4 Merge remote-tracking branch 'origin/main' into push/main-1130 2026-12-01 09:49:26 -05:00
955e7d9cf2 Indirect batches stay open past programs that only read through views picked from the heap, by default: 928 clamp passes a frame become about 180, the card 3.7 ms a frame lighter
- draw.rs: LEONIDA_BATCH_HEAP_READS is on unless set to 0. stores_bound
  already says no of every store through a picked view, so the extra rule
  only kept batches from staying open past programs that read through
  picked views: the 934 CS_RaytracingResolve dispatches a frame (and the
  meshlet culling passes, which store their records through views their
  binds declare and now end a batch for those records alone).
- findings.md: the measurements; switches.md regenerated (with the
  switches of the main commits merged before).

Standing at the waterside save, Series X, 1,080 to 1,440 lines, no
generated frames: 175 to 186 batch passes a frame against 928 (run d311
against d275, LEONIDA_BATCH_WHY), 8 of them ended for stores not declared
(793 before). By turns of 4 s (run d310, 53 phases): the frame's median
-2.11 +-0.69 ms, means -1.86 +-0.86, the card busy -3.67 +-0.43, the
submitting thread +0.48 +-0.73. Timing run (d312): the card's timed work
60.5 ms a frame against 63.2. Recorded tour (d313, 520 frames): 37 frames
with one-frame cells, 67 cells, all in fast turns, at the low end of the
tours before; terrain, foliage, the house and the player drawn.

AI-assisted (Claude). Tested on RTX 4060 Ti 16 GB, driver 616.64: the runs
above; the batched clamp's WARP tests; cargo check with and without
diagnostics.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 09:49:17 -05:00
8ebe7cc2e8 d3d12/vulkan + make_game: ReBAR DMA readback, budgeted staged slabs, test fixes & CLI wiring 2026-12-01 16:40:36 +02:00
098f7ff761 rdna2spirv: guard v_readfirstlane in --mesh-native-wave32 and lower --spirv-opt SSA threshold to 512 KiB
- Exclude v_readfirstlane from --mesh-native-wave32 until per-use uniformity
  analysis proves the source wave-uniform (with ms_native_readfirstlane.asm
  and test_mesh_native_wave32.py regression test + docs/design.md update).
- Lower SPIRV_OPT_LARGE_BYTES from 750 KiB to 512 KiB so library/lib_cs_03245
  and siblings use the safe SSA pass set instead of --scalar-replacement=0
  (avoiding NVIDIA 590.48.01 compiler SIGSEGV during warmup).

AI-assisted.
2026-12-01 16:38:32 +02:00
4e483f7ce0 rdna2spirv: TO_DATA merges, --compute-serial-waves, --mesh-native-wave32, --spirv-opt
On top of PR #2566 (8db8335d2), combines verified translator performance and
correctness improvements for NVIDIA Wave32 GPUs (tested on RTX 3090 24 GB,
driver 590.48.01):

- Cherry-pick PR #2501 lane_masks.insert_data_merges (TO_DATA) fixing
  lib_cs_03010 bit-scanning loops (91-370 ms/call -> < 2.5 ms/frame).
- Add --compute-serial-waves for >64-thread barrier/LDS/atomic-free compute
  shaders (lib_cs_00977 + lib_cs_00986: 160 ms/frame -> < 2.4 ms/frame) while
  preserving unmodified PR #2566 d88b2deea VulkanMemoryModel coherency.
- Add --mesh-native-wave32 for strictly partition-invariant mesh shaders
  (9,116 / 9,282 dxbc MS shaders), running all threads natively in 1 Wave32
  pass with zero %x_buf LDS/barriers (-13% to -35% on hot mesh shaders).
- Add --spirv-opt (-O below 750 KiB, safe SSA pass set at >= 750 KiB to avoid
  NVIDIA 590.48.01 --scalar-replacement=0 compiler segfaults, with automatic
  fallback + spirv-val check).

AI-assisted. Verified with semantic tests and retail boots on RTX 3090 (590.48.01).
2026-12-01 16:37:33 +02:00
9d41505a44 d3d12/vulkan: staged VRAM arena, DMA readback batching, parallel shadows, stream-pool fix
On top of PR #2566 (8db8335d2), combines verified runtime performance and
correctness improvements for non-ReBAR Vulkan GPUs (tested on Linux / Wine /
RTX 3090 24 GB, BAR1 = 246 MiB, driver 590.48.01):

- Stage 4 GiB GPU address arena + overflow TitleBufferWindows slabs in
  DEVICE_LOCAL VRAM with HOST_VISIBLE staging mirrors (arena_staging.h,
  arena_staging_test.cpp).
- Fix startup glibc realloc() race by caching max_compute_shared_memory_size,
  sharing mutex-guarded VkPipelineLayouts, and eagerly loading pipeline_cache()
  during single-threaded Device construction.
- Stage 9a-1: batch retired arena + external window host readbacks into a
  single copy_buffers_sync() submission on the dedicated DMA copy queue
  (wb: 27.6 ms -> 2.35 ms/frame).
- Stage 9a-2: parallelize ShadowPages::refresh across 4 persistent threads
  via ShadowRefreshPool (shadows: 26.9 ms -> 10.2 ms/frame).
- Fix resolve_pool_memory() zeroing out root descriptors probed with
  kRootViewBytes (64 KiB) near the end of committed stream-pool blocks
  (stream pool unbacked: 131,072 -> 16-33, root view unbacked: 0).

AI-assisted. Verified with 151/151 portable Linux CTest passing and Windows
MSVC build + retail boots on RTX 3090 (590.48.01).
2026-12-01 16:37:00 +02:00
cf15c2c6ed d3d12: a typed switch wins over the F1 menu, not a value that changed (D3D12-MENU-LAST-CHOICE-WINS)
Review of the first version: a value that differs from the last start's command line was taken for the user's new
choice. That lost an explicit flag on the first start after an upgrade, never let the same flag typed again win, and
dropped a menu value the command line never mentioned when leonida-launch.txt lacked the key. The menu file was also
rewritten before the history, so a failed history write had already lost a saved choice.

Now the rule follows what the user typed:
- A switch typed for this start wins over the menu's saved value of each setting it makes. The menu file drops that
  value, so F1 shows the command line's. scripts\play-d3d12.ps1 passes the switches typed there as -Typed, so its
  Series X default and -Lowest 1080 leave the menu's choice standing. A start by hand counts its own switches, and
  -More wins like a typed switch.
- Every other setting keeps the menu's value.
- The menu's SAVE AND RESTART adds -MenuRestart to the switches it replays (LEONIDA_MENU_ARGS), so there the menu's
  values, saved after those switches, win.

leonida-launch.txt is gone. The menu file is written to a temporary file and moved over the old one, and only when a
value leaves it. If that fails, the start runs with the command line's values and the file stays whole.

Tests: 10 cases, among them the same switch typed again, an untyped default, a setting no switch makes, the restart,
a start by hand, -More and a menu file that cannot be written.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 11:20:54 -03:00
cd0c52fcf4 Merge pull request #2238 from zmasi/results/gpu-vega20-radv
gpu-test-results: Radeon Pro Vega II (gfx906, Linux RADV) — GPU-VEGA20-RADV
2026-12-01 15:20:34 +01:00
c8eea9466f d3d12: the last choice wins between the command line and the F1 menu (D3D12-MENU-LAST-CHOICE-WINS)
play-nvidia.ps1 applied leonida-settings.txt (what F1 saved) over the command line at every start. An empty value
there removed what the command line set, so a later -Resolution, -Dlss or -SeriesS was lost without a word.

Now leonida-launch.txt (git-ignored) keeps what the last start's command line made:
- A setting this command line makes otherwise than that start's did wins. The menu file drops its value, so F1
  shows and saves the new one.
- A setting it makes as before keeps the menu's value, the newer choice.
- Each start says which values came from the menu and which the command line replaced.
- A dry run writes neither file.

The F1 menu gets the native render scale (1, which -Resolution makes at the output's height) and the dynamic
resolution's lowest scale (LEONIDA_RENDER_SCALE_MIN, from -Lowest).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 11:16:56 -03:00
4b52062d54 d3d12-gpu: stabilize global stall routing test under parallel diagnostics runs 2026-12-01 17:16:04 +03:00
bfa275eaa1 d3d12-shader: read CARGO_MANIFEST_DIR at runtime in build.rs 2026-12-01 17:06:34 +03:00
b3910e5e3d Merge pull request #2814 from TheGeogeo/test-red-green-compiler-crash
scripts: red_green.py tells a crashed compiler from a build error (TEST-RED-GREEN-COMPILER-CRASH)
2026-12-01 15:06:18 +01:00
19d3484d71 Indirect batches can stay open past programs that only read through views picked from the heap (LEONIDA_BATCH_HEAP_READS, off), and the batch pass reads its job, count and budget at once
- draw.rs: with LEONIDA_INDIRECT_BATCH=4 a program that picks buffer views from
  the heap by an index it computes ended every batch of indirect records, even
  when every store it makes goes through views its bind declares (it may only
  read through the picked ones). stores_bound already says no of a store
  through a picked view, so with LEONIDA_BATCH_HEAP_READS=1 such a program is
  asked like any other. The 1,004 CS_RaytracingResolve hit programs are of that
  kind, and the batch count a frame (900 to 1,000) follows their 934
  dispatches. Off by default until measured; nameable in LEONIDA_AB. The
  LEONIDA_BATCH_WHY line names 16 programs, not 8.
- indirect/batch.rs: the pass read the job table's count, then the job, then
  the budget by an atomic or, then charged it by compare and exchange: four
  trips to memory one behind the other, about 930 passes a frame. The count,
  the experiments' bits, the job and the budget are read together now, and a
  pass whose jobs fit in one group and all fit in what is left of the budget
  (it is then the only group charging it, after every earlier shader write)
  adds them with one atomic it does not wait for. Otherwise it charges as
  before. What it writes and charges is the same.

AI-assisted (Claude). Tested on RTX 4060 Ti 16 GB, driver 616.64: the batched
clamp's WARP and card tests (budget charging, cut dispatches, the clamp of one
execution against the batch).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 09:06:17 -05:00
3e7b34a52a Merge pull request #2799 from aznohonza/docs/quad-any-partial
rdna2spirv: quad_any's docstring says partial quads are exact (DOC-QUAD-ANY-PARTIAL)
2026-12-01 14:51:25 +01:00
9f27ba2e1f Merge pull request #2839 from aznohonza/docs/running-linux-wine-nvidia
docs: a Linux + Wine + NVIDIA profile that draws world frames (DOCS-RUNNING-LINUX-WINE-NVIDIA)
2026-12-01 14:36:15 +01:00
57484f6912 Merge remote-tracking branch 'origin/main' into push/main-1130 2026-12-01 08:35:40 -05:00
a6f835ef0f Merge remote-tracking branch 'origin/main' into reaper-bounded-queue
d3d12/docs/switches.md regenerated with tools/d3d12_switches.py.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 14:23:20 +01:00
e04721c7f7 Merge pull request #2871 from aslan2142/docs/agent-standards-and-accuracy
docs: update agent/contributor standards, fix stale references, and consolidate docs
2026-12-01 14:17:24 +01:00
65f372c08a gpu: honor coverage on the first masked draw 2026-12-01 08:15:15 -05:00
93e65d91ca launcher: enable water transmission
From #2617. Confirmed in Boat on the RX 6800.
2026-12-01 08:15:15 -05:00
6fe30fb965 gpu: inline the first constant-buffer slot
RX 6800 Boat and City, 39 matched pairs: 0.48 ms faster per frame.
2026-12-01 08:15:15 -05:00
357c710231 gpu: reuse constant-buffer fills
From TheGeogeo #2850. RX 6800 Boat bridge: 17.08 to 17.47 FPS.
2026-12-01 08:15:15 -05:00
b4d3289011 gpu: send prepared lists in order
From foxhound 662ed959. RX 6800 Boat, 43 matched pairs: 0.60 ms faster per frame.
2026-12-01 08:15:15 -05:00
7e63341483 Merge pull request #2842 from aznohonza/docs/port-status-list-values-pair
docs/port_status.md: the measured list-values pair past the world load (DOCS-PORT-STATUS-LIST-VALUES-PAIR)
2026-12-01 14:14:29 +01:00
f2357faa5f rpf9dump: harden Util.Safe for cross-platform and Windows filenames 2026-12-01 21:08:22 +08:00
4367afb817 docs: address review findings in descriptor_lookup and docs/README 2026-12-01 08:08:00 -05:00
02f0a8c6e6 d3d12-shader: fix validator SDK version sort, empty env fallback, and error cleanup 2026-12-01 21:06:00 +08:00
a8fcac74a5 d3d12-core: ignore empty user-dir and log env vars 2026-12-01 21:03:31 +08:00
7feda433d0 d3d12: fix remaining workspace clippy warnings 2026-12-01 21:01:29 +08:00
2cb6bdd45b The title's barrier on a depth texture also waits for its depth plane's twin
A depth texture with a stencil plane has two host twins that shaders write through unordered access: the
colour twin and the depth plane's (`resource::twin_plane_resource`). The title's unordered access barrier
on the texture was put on the colour twin alone, so a pass reading what was written through the depth plane
could read it unfinished, or the frame before's. The tiled lighting writes its material classes that way,
and the deferred lighting then shaded tiles with the wrong class: a dark patch with blocky edges on a wall.
The barrier is now on both twins.

After KyleS98/VIctory-Neo d533ce6, taken there from sub-north/Subsystem 664d7ec6 ("Wait for a depth plane's
twin in a UAV barrier", GPL-3.0); its tracer (gtport646, RTX 4090) saw the patch in 2 launches of 5 before
and in none of 25 after.

AI-assisted (Claude). Tested on RTX 4060 Ti 16 GB, driver 616.64: type-checked; a recorded tour after it
(the patch is too rare to count out in one).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 07:56:37 -05:00
ed867d7b2f Merge pull request #779 from trigger337/fix/awc-manifest-stage-cleanup
awc_manifest: publish mode on Windows (AWC-MANIFEST-STAGE-CLEANUP)
2026-12-01 13:53:58 +01:00
8246772326 docs: deduplicate AGENTS/CONTRIBUTING and consolidate descriptor_lookup docs 2026-12-01 07:53:33 -05:00
c2dd42174d Merge remote-tracking branch 'origin/main' into push/main-1130 2026-12-01 07:52:30 -05:00
dd4829ecfc Merge remote-tracking branch 'origin/main' into push/main-1130
# Conflicts:
#	d3d12/docs/switches.md
2026-12-01 07:52:21 -05:00
5a569c5e5e Merge pull request #795 from trigger337/fix/ttpf-assets-stage-cleanup
ttpf_assets: restore write mode before unlink on replace failure and publish mode on Windows (TTPF-ASSETS-STAGE-CLEANUP)
2026-12-01 13:51:38 +01:00
e12f7f9f9a Notes: NVIDIA's float forms timed, the light stand-in's near-surface switch, the clamp passes' wait; switch list
findings.md: LEONIDA_HOST_FLOAT in timing runs (d294 51.82, d306 51.81 ms of the card's timed work a frame; the
first run after compiling its pipelines, d303, 54.51, the driver's background compiles), left on; LEONIDA_AMBIENT_NEAR
not shown to be needed here (runs d304, d305), left off; the clamp pass waiting only for its record buffers (run
d302) no quicker. switches.md regenerated (LEONIDA_HOST_FLOAT, LEONIDA_AMBIENT_NEAR).

AI-assisted (Claude). Tested on RTX 4060 Ti 16 GB, driver 616.64: runs d302 to d306 (Series X profile, 1440p
output, dynamic resolution from 1080 lines, frame generation off).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 07:51:34 -05:00
1723dec945 Merge pull request #542 from kotekompotek/work/test-cfg-structure-extra
tests: add edge-case tests for cfg_structure single-block, irreducible, and nested loops
2026-12-01 13:49:25 +01:00
fca9005779 Merge pull request #538 from kotekompotek/work/test-fssm-header-extra
tests: add edge-case tests for fssm_header wave_size and binding_table
2026-12-01 13:49:13 +01:00
5111dd3909 Merge pull request #372 from kotekompotek/work/test-shaders-build
test: unit tests for runtime/test/shaders/build.py
2026-12-01 13:49:00 +01:00
c3c206bb17 Merge pull request #371 from kotekompotek/work/test-shaders-check
test: unit tests for runtime/test/shaders/check.py
2026-12-01 13:48:47 +01:00
ccc7ef4f07 Merge pull request #370 from kotekompotek/work/test-sandbox
test: unit tests for tools/sandbox.py
2026-12-01 13:48:28 +01:00
018e98ab5b Merge pull request #352 from kotekompotek/work/test-run-guest-scene
test: unit tests for scripts/run_guest_scene.py
2026-12-01 13:48:13 +01:00
2bc4f94e1c Merge pull request #341 from kotekompotek/work/test-conformance-compare
test: unit tests for tools/conformance/compare.py
2026-12-01 13:47:58 +01:00
20b0be7107 Merge pull request #2364 from Tauwni/docs/testing-wine-macos
docs/testing.md: the Windows runtime tests under Wine on a Mac (WineHQ build, ROSETTA_ADVERTISE_AVX)
2026-12-01 13:47:46 +01:00