Skip to content

Coordinating who works on what (continued from #1608) #2570

Backlog

Description

@lixonik

Continuation of #1608 (and #14), which has reached GitHub's 2,500-comment cap. The previous threads contain the existing claims, findings, and open-work table. Check those records and the open pull requests before claiming anything.

  • Claim: comment claiming: <ID> before starting work. Use the existing ID if there is one, or give a short description for an unlisted item. Put the ID or a link to the claim in the pull request.
  • Finding: comment finding: <one line> with the file and line, why it matters, and what is needed to reproduce it.
  • Done: comment done: <ID> -> #<PR> when the pull request is open.

The same contribution rules apply. Existing claims in #14 and #1608 still stand. If a claim was posted in a separate issue while #1608 was capped, link it here so contributors can find it.

Activity

  1. sodove commented on Nov 28, 2026

    @sodove
    Contributor

    claiming: VERIFY-508, VERIFY-1477, VERIFY-762, VERIFY-1381, VERIFY-1482, VERIFY-2419, VERIFY-1692, VERIFY-2366, VERIFY-1481, VERIFY-1582, VERIFY-338, VERIFY-2265, VERIFY-1761, VERIFY-1683, VERIFY-708, VERIFY-1370, VERIFY-858, VERIFY-1112, VERIFY-1697, VERIFY-2171, VERIFY-966, VERIFY-910, VERIFY-1563, VERIFY-898, VERIFY-1587, VERIFY-803, VERIFY-435, VERIFY-410

    Shader batch assigned by DadaCap. Pinned main 3bd936ecd98995bca3e1da83d5e28d2343001aef. I'll report PR-specific baseline and merged results, including validator and hardware coverage where exercised. AI-assisted: OpenAI Codex.

  2. zmasi commented on Nov 28, 2026

    @zmasi
    Contributor

    done: VERIFY-2403, VERIFY-2347, VERIFY-2303, VERIFY-2289, VERIFY-2287 (claimed in #1608#issuecomment-7237767569) -> results in #2403, #2347, #2303, #2289, #2287

    AI-assisted.

  3. zmasi commented on Nov 28, 2026

    @zmasi
    Contributor

    status: D3D12-SHADER-F16-OMOD-CONSOLE-MODE -> branch https://github.com/zmasi/leonida/tree/fix/d3d12-shader-f16-omod-console-mode (�4679c076704eec8c323405e158ed9fe58bef47c, claim #1608 (comment); PR slot queued).

    • Gated 16-destination VOP3/SDWA omod (mul:2, mul:4, div:2) in Lower::valu16_op and �_interp_p2_f16 on COMPUTE_PGM_RSRC1 (
      ative::fspx_rsrc1 + lower::with_pgm_rsrc1 in emit_program): ignores omod while keeping [0, 1] clamp under console default FLOAT_MODE = 0xC0 (denorm_mode_16_64 = 3, including FSSM stages without PGM_RSRC1 and all 29 shipped FSPX shaders) or IEEE = 1, and scales before clamp when denorm_mode_16_64 = 0 && !ieee (SHADER-135). Restored �alu_tests::f16_omod_applies_before_clamp under denorm_mode_16_64 = 0, IEEE = 0 and documented // shortcut: + SDWA /
      dna2spirv.py �_cvt_f16_f32 notes.
    • Red (4a54aed): cargo test -p leonida-shader --lib f16_omod_tests -- --test-threads=1 -> 1 passed; 3 failed on RTX 3090 D3D12.
    • Green (�4679c0767): 5/5 16_omod tests, 13/13
      ative::tests, and interpolated_f16_writes_the_op_sel_half_with_modifiers passed on NVIDIA GeForce RTX 3090 D3D12 + WARP + dxil.dll.

    AI-assisted.

  4. zmasi commented on Nov 28, 2026

    @zmasi
    Contributor

    claiming: D3D12-HLE-KERNEL-LOADER-PARITY-AND-BOUNDS -> d3d12/crates/leonida-hle/src/modules/kernel.rs:

    • Grow the GetModuleFileNameW buffer past MAX_PATH (up to 32768) and preserve thread GetLastError() inside host_override so long-path host modules cannot bypass HLE GetProcAddress overrides (WinHttpOpen, connect, CreateFileW) or clobber caller GetLastError(); ignore null lpProcName in host_override.
    • Resolve ordinal exports (#n, e.g. gameinput.dll #1 GameInputCreate) on pseudo-modules in GetProcAddress, reject null lpProcName and missing exports with ERROR_PROC_NOT_FOUND, and return TRUE from DisableThreadLibraryCalls on pseudo-module handles (matching runtime/shims/library_loader.cpp).
    • Normalize empty, trailing-slash, and trailing-dot module names in find_module so "" / "dir\\" pass through to the host instead of querying ".dll", and trailing dots follow Win32 loader rules ("kernel32.dll." -> "kernel32.dll", "kernel32." -> "kernel32").
    • Write GetModuleFileNameW / GetModuleFileNameA title paths via write_unaligned (avoiding slice::from_raw_parts_mut UB/panics on uninitialized or odd-byte-aligned caller buffers) and clear LastError to ERROR_SUCCESS when not truncated.

    AI-assisted.

  5. adrianmjim commented on Nov 28, 2026

    @adrianmjim

    claiming: RT-GEOMETRY-VIEWS-CONTAIN - GeometryViews::resolve (runtime/shims/d3d12_geometry_views.h) looks only for its exact key (source, bytes), so a range inside a live view gets a view of its own: (A, 128 KiB), (A, 64 KiB) and (A + 4 KiB, 64 KiB) are three views and 256 KiB of copies of 132 KiB of the title's bytes, each charged to LEONIDA_GEOMETRY_MB. Fix: a range inside a live view is answered from that view, and the containing view is held until nothing answers the range (LEONIDA_GEOMETRY_CONTAINED=0 turns it off). Also fixed along the way: a pinned view no longer drops its other written tiles while a file read into one tile is in flight, a view is pending until on_retire has run before it takes its command-list epoch, and copy_title_range (an acceleration structure's whole range) is never answered from inside a larger view. Tests: geometry_views cases 17 and 18. 16 of 98 checks fail on main d44285197; all pass with the change. Expect a textual conflict with #2085 (same files, different fix). No game files.

    claiming: RT-DRAW-VIEWS-UNCHANGED - set_vertex_buffers marks a list's DrawViews block stale for any call that writes a slot, and OMSetRenderTargets for every call, without comparing with what is bound (runtime/shims/d3d12_com.cpp, runtime/src/command_list.h). A title that binds the same vertex buffer before each draw makes one make_shared<DrawViews> per draw (about 728 bytes), kept until the list's Reset. Fix: a block is marked stale only when a slot's view, the target count or a copied target view changes; what each draw records is unchanged. Test: d3d12_draw_test --draw-views-sharing (ctest d3d12_draw_views_sharing): 1000 draws with the same IASetVertexBuffers make 1000 blocks on main and 1 with the change, and a changed slot, an unbound slot, another render target or a rewritten RTV behind the same handle each start a new block. No game files.

  6. zmasi commented on Nov 28, 2026

    @zmasi
    Contributor

    status: carryover queued branches from #1608 (while at 3-PR open limit: #2236, #2238, #2239)

    Carryover from #1608 (comment) so contributors scanning #2570 can avoid duplicate work. All 49 branches below are finished, tested, merge cleanly against main (4f9199d09), and pushed; each has its own claim and status comment on #1608 / #2570 and will open one PR at a time as slots free.

    Rust D3D12 runtime (d3d12/):

    • D3D12-SHADER-CVT-FLR-RPI: zmasi:fix/d3d12-shader-cvt-flr-rpi (f895282f6)
    • D3D12-SHADER-SALU-SCC-CARRY-AND-OVERFLOW: zmasi:fix/d3d12-shader-salu-scc-carry-overflow (93cceae36)
    • D3D12-SHADER-SAMPLE-OFFSET-3D-AND-GETLOD-ZW: zmasi:fix/d3d12-shader-sample-offset-3d-getlod (910d34379)
    • D3D12-SHADER-LANE-SELECT-MASK: zmasi:fix/d3d12-shader-lane-select-mask (2decd44bd)
    • D3D12-SHADER-SOP64-AND-V64-INLINE-FLOAT-CONSTANTS: zmasi:fix/d3d12-shader-inline-f64-constants (bd1d39882)
    • D3D12-SHADER-HALF-SRC-INLINE-FLOAT-AND-SDWA: zmasi:fix/d3d12-shader-half-src-sdwa (aeeafe70e)
    • D3D12-SHADER-PK16-AND-U16-CLAMP: zmasi:fix/d3d12-shader-pk16-u16-clamp (25e495dc0)
    • D3D12-SHADER-F16-OMOD-CONSOLE-MODE: zmasi:fix/d3d12-shader-f16-omod-console-mode (b4679c076)
    • D3D12-SHADER-VOP3-INT16-MISSING-OPCODES: zmasi:fix/d3d12-shader-vop3-int16-missing-opcodes (60c75fba7)
    • D3D12-SHADER-LDS-EXACT-MINMAX-COMMUTATIVITY: zmasi:fix/d3d12-shader-lds-exact-minmax-commute (2c6d71454)
    • D3D12-GPU-ROOT-DESERIALIZER-CONSOLE-FLAGS: zmasi:fix/d3d12-gpu-root-deserializer-console-flags (48c330a01)
    • D3D12-GPU-INPLACE-VIEW-ALIAS-AND-SECTION-LIFETIME: zmasi:fix/d3d12-gpu-inplace-view-alias-bounds (e0838d40e)
    • D3D12-GPU-DXGI-OUTPUT-DISPLAY-MODES-FORMAT: zmasi:fix/d3d12-gpu-dxgi-output-display-modes (ec798d0e0)
    • D3D12-GPU-HOSTLIST-INDIRECT-ARGS-POOL: zmasi:fix/d3d12-gpu-hostlist-indirect-args-pool (1ef5ff006)
    • D3D12-HLE-APU-HANDLE-LIFETIME: zmasi:fix/d3d12-hle-apu-handle-lifetime (c7cef4fe7)
    • D3D12-HLE-DSP-HANDLE-LIFETIME-AND-ALIGNMENT: zmasi:fix/d3d12-hle-dsp-handle-lifetime (5e48f2b26)
    • D3D12-HLE-KERNEL-LOADER-PARITY-AND-BOUNDS: zmasi:fix/d3d12-hle-kernel-loader-parity-bounds (ea369dba2)
    • D3D12-HLE-GAMEINPUT-QI-AND-DISCONNECT-HISTORY: zmasi:fix/d3d12-hle-gameinput-qi-disconnect-history (6c064eb6c)
    • D3D12-HLE-LIFECYCLE-ANSI-WNDPROC-AND-NCDESTROY: zmasi:fix/d3d12-hle-lifecycle-ansi-wndproc-lifetime (903e7e448)
    • D3D12-HLE-XASYNC-CALLBACK-AND-CANCEL-LIFETIME: zmasi:fix/d3d12-hle-xasync-callback-and-cancel-lifetime (daf7ddee1)
    • D3D12-HLE-DSTORAGE-QUEUE-VTABLE-AND-FILE-UAF: zmasi:fix/d3d12-hle-dstorage-vtable-and-file-uaf (4175e2682)
    • D3D12-HLE-DSTORAGE-INPLACE-OVERLAP-AND-STATUS-RACE: zmasi:fix/d3d12-hle-dstorage-inplace-overlap-status (aa1044d77)
    • D3D12-HLE-XMEM-PHYSICAL-MAP-BOUNDS-AND-SPLIT-PLACEHOLDERS: zmasi:fix/d3d12-hle-xmem-physical-map-placeholders (826b73e0e)
    • D3D12-HLE-NET-LOOKUP-LEAKS-AND-IOCTL-BOUNDS: zmasi:fix/d3d12-hle-net-lookup-ioctl-bounds (7f20d0713)
    • D3D12-HLE-XG-TILING-AND-COPY-BOUNDS: zmasi:fix/d3d12-hle-xg-tiling-and-copy-bounds (3d1c30a4a)
    • D3D12-HLE-FILES-VIRTUAL-DRIVE-BOUNDS (+ media.rs prefixes): zmasi:fix/d3d12-hle-files-virtual-drive-bounds (4cc2b5950)
    • D3D12-HLE-AUDIO-NOTIFICATION-AND-HEAP-BOUNDS: zmasi:fix/d3d12-hle-audio-notification-heap-bounds (9050ec766)
    • D3D12-HLE-XGAMESAVE-VERSION-AND-READ-BOUNDS: zmasi:fix/d3d12-hle-xgamesave-version-read-bounds (51b469296)
    • D3D12-HLE-XSYSTEM-REGISTRY-AND-ANALYTICS-BOUNDS: zmasi:fix/d3d12-hle-xsystem-registry-analytics-bounds (b0108027e)
    • D3D12-LUA-SANDBOX-XPCALL-AND-STRING-METATABLE: zmasi:fix/d3d12-lua-sandbox-xpcall-string-meta (5b8522db1)
    • D3D12-MENU-MODS-STALE-ITEM-INDEX: zmasi:fix/d3d12-menu-mods-stale-item-index (4014af66f)
    • D3D12-MENU-SCALE-STEP-AND-PNG-BOUNDS: zmasi:fix/d3d12-menu-scale-step-png-bounds (0f2d5db30)
    • D3D12-LOADER-CLZERO-LOOP-DECODE: zmasi:fix/d3d12-loader-clzero-loop-decode (71c8d3e2e)
    • D3D12-LOADER-PREPARE-BOUNDS: zmasi:fix/d3d12-loader-prepare-bounds (7b8d688ba)
    • D3D12-LOADER-TLS-DISP32-AND-PROTECT-BOUNDS: zmasi:fix/d3d12-loader-tls-disp32-protect-bounds (758b30fe8)
    • D3D12-LOADER-CRASH-PAGE-THROW-AND-UNWIND-BOUNDS: zmasi:fix/d3d12-loader-crash-page-throw-unwind-bounds (164de1cb7)
    • D3D12-PE-ENTRY-AND-TLS-BOUNDS: zmasi:fix/d3d12-pe-entry-and-tls-bounds (de6a23248)
    • D3D12-FORMATS-TEXTURE-MIP-MSAA-1D-BOUNDS: zmasi:fix/d3d12-formats-texture-mip-msaa-1d-bounds (f79892998)
    • D3D12-FORMATS-XMA-FIRST-FRAME-BOUNDS: zmasi:fix/d3d12-formats-xma-first-frame-bounds (b4613feb1)
    • D3D12-CORE-POLICY-MONOREPO-ROOT: zmasi:fix/d3d12-core-policy-monorepo-root (48c5c824c)

    C++ runtime and tools:

    • MAKE-GAME-DEFAULT-FNV1A-FMIX32: zmasi:make-game-default-fnv1a-fmix32 (c847cc059)
    • VK-DEVICE-MARKERS-SYNC-WAW: zmasi:fix-vk-device-markers-sync-waw (ccaad2dde)
    • RT-ORDINARY-HEAP-LOW-ARENA-VSHARP: zmasi:fix-d3d12-low-title-vsharp-provenance (2ac04eede)
    • RT-GAMEINPUT-SDL-BLOCKING-UNREGISTER-SYNC: zmasi:fix/gameinput-sdl-blocking-unregister-sync (11900cb59)
    • RT-MSAA-DEPTH-SRV: zmasi:fix/msaa-depth-srv (0cef915f3)
    • RT-COMPILE-HELPER-LATE-JOURNAL-RELOAD: zmasi:fix/compile-helper-late-journal-reload (9bb59d09f)
    • RT-SLOT70-SUPERSEDED-SLOT133-VIEW: zmasi:fix/slot70-superseded-slot133-view (44311889e)
    • RT-COMPILE-SERVER-REQUEST-SPIN: zmasi:fix/compile-server-request-spin (736ae309f)
    • TOOL-LDS-FUZZ-CMPST-BARRIER: zmasi:fix/lds-fuzz-cmpst-barrier (dc553a70e)

    AI-assisted.

  7. zmasi commented on Nov 28, 2026

    @zmasi
    Contributor

    claiming: VERIFY-2285, VERIFY-2266, VERIFY-2264, VERIFY-2263, VERIFY-2262 (Windows 11)

    AI-assisted.

  8. zmasi commented on Nov 28, 2026

    @zmasi
    Contributor

    claiming: D3D12-HLE-DSP-HANDLE-LIFETIME-AND-ALIGNMENT

    Scope: d3d12/crates/leonida-hle/src/modules/dsp.rs (chad.dll) — track Dsp and Stream handles via monotonic IDs + Arc ownership so XDspDisconnect before XDspDeactivate, double-disconnect/deactivate, and stale handles return E_INVALIDARG instead of UAF/double-free; replace &mut Status with atomic fields (Ordering::Release on completed) serialized per stream; handle unaligned Command / output / out-pointers safely; and accept base_length == 0 while rejecting max_streams == 0 and max_channels == 0 per runtime/shims/chad.cpp.

    AI-assisted.

  9. adrianmjim commented on Nov 28, 2026

    @adrianmjim

    done: RT-GEOMETRY-VIEWS-CONTAIN, RT-DRAW-VIEWS-UNCHANGED -> #2569 (claimed in #2570 (comment)). Both are added to the leak-sweep pull request with the other fixes, each as its own merge there and its own branch on adrianmjim/leonida (leaks/geometry-views-contain, leaks/draw-views-unchanged).

  10. zmasi commented on Nov 28, 2026

    @zmasi
    Contributor

    Updates on the three gfx906 lanes claimed in #1608 before the comment cap:

    AI-assisted.

  11. zmasi commented on Nov 28, 2026

    @zmasi
    Contributor

    done: VERIFY-2285, VERIFY-2266, VERIFY-2264, VERIFY-2263, VERIFY-2262 -> results in #2285, #2266, #2264, #2263, #2262

    AI-assisted.

  12. zmasi commented on Nov 28, 2026

    @zmasi
    Contributor

    claiming: D3D12-GPU-ROOT-DESERIALIZER-CONSOLE-FLAGS -> d3d12/crates/leonida-gpu/src/root.rs:

    • Strip Xbox high-byte console root-signature flags (0xff00_0000) from DXBC RTS0 chunks (versions 1.0..1.2) and recompute non-zero DXBC container checksums in create_deserializer (d3d12_xs!D3D12CreateRootSignatureDeserializer) before forwarding to host d3d12.dll (matching runtime/shims/d3d12_xs_rootsig.cpp, while failing closed on malformed containers/chunk tables or mismatched incoming hashes).
    • Guard without_console_flags in serialize_versioned to root-signature versions 1.0..1.2 (1..=3), and clear non-null output pointers (out, blob, error) on early E_INVALIDARG / E_NOTIMPL failures.

    AI-assisted.

  13. zmasi commented on Nov 28, 2026

    @zmasi
    Contributor

    status: D3D12-HLE-DSP-HANDLE-LIFETIME-AND-ALIGNMENT — pushed to zmasi:fix/d3d12-hle-dsp-handle-lifetime (5e48f2b26f1bc935e086e6fa6b0d4427e643d7ea, based on 6c7f79343, claim #2570#issuecomment-7237957634)

    • Tracked live Dsp connections and Streams by monotonic non-zero handle IDs (RwLock<HashMap<usize, Arc<...>>>) with Arc<Dsp> ownership on Stream, preventing UAF when XDspDisconnect precedes XDspDeactivate, double-free on repeated XDspDisconnect / XDspDeactivate, and wild-pointer dereferences on stale or foreign handles.
    • Converted Status fields to AtomicU32 / AtomicI32 with per-stream submission serialization and Ordering::Release on completed, eliminating &mut Status aliasing and concurrent ticket data races.
    • Used read_unaligned / write_unaligned on FFI structs/out-pointers, cleared outputs on failed calls, zeroed command.output via cast::<u8>() after checked_add(byte_len), and accepted base_length == 0 while rejecting max_streams == 0 and max_channels == 0 (runtime/shims/chad.cpp).
    • Verified Red (3/3 new tests failed on 6c7f79343, including misaligned pointer dereference abort and 126 != 128 lost concurrent tickets) -> Green (186 leonida-hle tests pass, 0 clippy warnings in dsp.rs across default and diagnostics).

    AI-assisted.

  14. Tyrannys commented on Nov 28, 2026

    @Tyrannys
    Contributor

    @zmasi a note on RT-VK-DEVICE-MARKERS-SYNC-WAW (zmasi:fix-vk-device-markers-sync-waw, 77670e6f) and #2489, which also changes vulkan_device_markers.h (the marker buffer is CONCURRENT over the device's queue families) and vulkan_device_markers_test.cpp.

    • No conflict. git merge-tree of vulkan: depth24 scratch and the device marker buffer are shared across queue families (RT-QUEUE-FAMILY-SHARING-DEPTH24-MARKERS) #2489's head and your branch is clean. Your barrier uses VK_QUEUE_FAMILY_IGNORED on a slot of its own queue, which is fine on a CONCURRENT buffer too.
    • One MSVC build error on your branch (not from the merge). runtime/test/vulkan_device_markers_test.cpp:81, writes.push_back({command_buffer, stage, offset, marker, false}); in write_marker, fails with C2397: brace-initializing the std::uint64_t stage field from a VkPipelineStageFlagBits is a narrowing conversion. GCC/Clang accept it. std::uint64_t(stage) fixes it.
    • With that one change, the merge of both branches builds on Windows 11 / MSVC (VS 18), RelWithDebInfo, and vulkan_device_markers, vk_device_markers and depth24_scratch_sharing pass (3/3). vk_device_markers runs the marker path on an RTX 4070 SUPER (driver 621.01): marker2 and legacy rounds read back 5 and 8. The validation layer was not installed, so validation was off for this run.

    AI-assisted (Claude Code)

  15. zmasi commented on Nov 28, 2026

    @zmasi
    Contributor

    status: D3D12-HLE-KERNEL-LOADER-PARITY-AND-BOUNDS -> branch https://github.com/zmasi/leonida/tree/fix/d3d12-hle-kernel-loader-parity-bounds (ea369dba2a2d99fd2869b3f1100c0d5ecae45194 on main 16e90d1ff)

    • Claim: Coordinating who works on what (continued from #1608) #2570 (comment)
    • Fix (d3d12/crates/leonida-hle/src/modules/kernel.rs):
      • Grow host_override's GetModuleFileNameW buffer up to 32768 UTF-16 code units, ignore null lpProcName, and preserve thread GetLastError() across GetProcAddress (including lazy REGISTRY initialization and GetModuleFileNameW) so long-path host modules cannot bypass HLE overrides (WinHttpOpen, connect, CreateFileW) or clobber caller GetLastError().
      • Resolve #ordinal exports (< 0x10000, e.g. gameinput.dll #1 GameInputCreate) on console pseudo-modules in GetProcAddress, set ERROR_PROC_NOT_FOUND (127) when lpProcName is null or unimplemented, and return TRUE (1) from DisableThreadLibraryCalls on pseudo-module handles.
      • Normalize empty, trailing-slash, and trailing-dot module names in find_module ("" / "dir\\" pass through to the host instead of querying ".dll", and trailing . characters strip without appending .dll).
      • Write GetModuleFileNameW / GetModuleFileNameA title paths via write_unaligned (avoiding slice::from_raw_parts_mut UB/panics on uninitialized or odd-byte-aligned caller buffers) and clear LastError to 0 (ERROR_SUCCESS) when not truncated.
    • Red (16e90d1ff): all 4 new modules::kernel regression tests failed (pseudo_modules_resolve_ordinals_report_errors_and_disable_thread_calls, host_proc_overrides_handle_long_paths_and_preserve_last_error, empty_and_trailing_dot_module_names_follow_win32_rules, and title_module_filenames_accept_unaligned_uninit_buffers_and_clear_last_error with slice::from_raw_parts_mut alignment abort 0xc0000409).
    • Green (ea369dba2): cargo test -p leonida-hle -- --test-threads=4 (185 unit + 1 integration passed, 0 failed), 0 clippy warnings in kernel.rs (default & diagnostics), check_no_game_data.py and test_text_write_line_endings.py clean; held at open-PR cap.

    AI-assisted.

  16. 131 remaining items

  17. qhukz13 commented on Nov 28, 2026

    @qhukz13
    Contributor

    Follow-up to my correction above, as promised. I rebuilt from current main d48a957 and launched through scripts/play.ps1 with its own defaults (LEONIDA_SKIP_INT3=1).

    AI-assisted (Claude Code).

  18. adrianmjim commented on Nov 28, 2026

    @adrianmjim

    done: RS-ARENA-ONE-COPY -> #2569
    done: RS-SHADER-CONTAINER-FREE -> #2569
    done: RS-DSTORAGE-SCRATCH -> #2569
    done: RT-DEVICE-LOST-DRAIN -> #2569

    Claimed in #2570 (comment). They joined #2569 as fixes 27-30, each its own merge with its own test, at eb145de6f (with main d48a957bb merged). One merge fix in test code only: RS-APU-SCRATCH and RS-DSTORAGE-SCRATCH each installed a counting #[global_allocator] in their tests, so the two now share one (leonida-hle/src/test_alloc.rs). AI-assisted (Claude Code, Claude Opus 5.5).

  19. budanga commented on Nov 28, 2026

    @budanga
    Contributor

    finding: the Windows compute workers do not run from a virtual environment: scripts/compute_workers_win.py (line 128) starts each worker with sys.executable, which in a venv is a launcher that runs the base interpreter as a second process, so the worker's job (two active processes) is full before a tool starts.

    • Where: scripts/compute_workers_win.py:128 (subprocess.Popen([sys.executable, "-I", "-B", ...])), on main 9c49bd533.
    • Seen: python -I tests/test_translate_pipeline_compute.py from a venv on Windows 11 26300, Python 3.14.10: RuntimeError: Windows compute job limits not in force, then Windows translation worker failed: [1]; with the base interpreter it passes (4 tests, 1 skipped).
    • Why it matters: AGENTS.md has the pytest files run from a venv, and anyone running make_game.py or the translation from one on Windows hits it.
    • Likely fix: start the worker with sys._base_executable (equal to sys.executable outside a venv), as rdna2spirv: start a tool again when a Windows job refuses it with ERROR_NOT_ENOUGH_QUOTA (COMPUTE-WORKER-SPAWN-QUOTA) #2367's test now does for the same reason.
    • Needs: Windows only; no game files, no particular GPU.

    AI-assisted (Claude Code).

  20. Mby159 commented on Nov 28, 2026

    @Mby159
    Contributor

    status: D3D12-HLE-RPCRT4-UUID-PARSE-AND-OOM-BOUNDS -> branch https://github.com/Mby159/leonida/tree/fix/d3d12-hle-rpcrt4-uuid-parse-and-oom-bounds (d6e73e167b0ddf4b4dc60b6a1230834ad6e5c43c, based on main d48a957bb)

    • Claim: Coordinating who works on what (continued from #1608) #2570 (comment)
    • Scope: d3d12/crates/leonida-hle/src/modules/rpcrt4.rs (one file, +179/-27)
    • The pull request is not open yet. This account may hold only one open pull request in this repository: gh pr create answers Mby159 does not have the correct permissions to execute CreatePullRequest, and the same answer comes with the upstream's own main as the head (so it is not about the fork or the token). tests: the stack reserve need not be the last link option (TEST-BUILD-FALLBACK-STACK-OPTION) #2573 holds the slot. The branch is ready to open the moment it is free - say here if a maintainer would rather open it, or if the slot is meant to go to another item first.
    • What it changes:
      1. parse() takes the canonical form only: 32 hex digits, the dashes at 8, 13, 18 and 23, and the braces both there or both not (36 or 38 characters, ASCII only). The old parser accepted an unmatched { or }, any text after the closing }, and a - at any position or none at all; Win32 rpcrt4 refuses every one of those with RPC_S_INVALID_STRING_UUID (1705).
      2. UuidToStringA / UuidToStringW report RPC_S_OUT_OF_MEMORY (14) when the allocation fails and leave the caller's pointer as it was; they used to answer RPC_S_OK with *out == null.
      3. UuidCreate, UuidFromStringA/W and UuidToStringA/W read and write the caller's Guid with read_unaligned / write_unaligned. A Guid in a title's own buffer need not be aligned, and the aligned access it replaces is undefined behaviour (it faults in a debug build).
    • Tested (Windows 11 x64, Rust 1.98.1 as d3d12/rust-toolchain.toml pins it, MSVC 14.44):
      • cargo test --package leonida-hle --locked -> 186 passed; 0 failed; 2 ignored (10 in modules::rpcrt4, 5 of them new).
      • The new tests cover the malformed forms (unmatched braces, text after }, a misplaced dash, a missing dash, empty text, text longer than any legal form), the canonical form with braces and in upper case, a wide string with a non-ASCII unit, a refused text leaving the Guid as it was, publish() reporting RPC_S_OUT_OF_MEMORY without touching the caller's pointer, and a Guid at an odd address (an 8-byte aligned buffer plus 1) written and read back.
      • cargo clippy --package leonida-hle --all-targets --no-deps --locked -- -D warnings -> no new findings. The package reports the same 28 pre-existing findings as main (in leonida-gpu, leonida-shader, and leonida-hle's xmem.rs, dstorage.rs, clock.rs, gameinput.rs), none of them in the file this branch touches.
      • rustfmt --edition 2024 --check crates/leonida-hle/src/modules/rpcrt4.rs -> clean.
      • python -I scripts/check_no_game_data.py d3d12/crates/leonida-hle/src/modules/rpcrt4.rs (exit 0).
    • GPUs tested: n/a (a CPU-only HLE module)
    • AI-assisted: yes
  21. Mby159 commented on Nov 28, 2026

    @Mby159
    Contributor

    finding: the d3d12/ Rust workspace has no CI in this repository, and the clippy step its own workflow file runs is red on main (open for anyone)

    Two measurements, both reproducible on Windows 11 x64 with the toolchain d3d12/rust-toolchain.toml pins (Rust 1.98.1, MSVC 14.44):

    1. No workflow here builds, lints or tests the Rust tree. d3d12/.github/workflows/ci.yml is a nested workflow file, and GitHub Actions only runs the workflows in the repository root .github/workflows - GET /repos/ProjectLeonida/mandy/actions/workflows lists CI, Needs rebase label, Coordination claim, jactionlint, Launcher, No Game Data, Runtime and XMA2 decoder, and the d3d12 one is not among them. The root ci.yml compiles tools/bcpack_calibration only. A pull request that changes d3d12/crates/** therefore reaches the maintainers without a compiler or a test run behind it.

    2. That workflow's clippy step cannot pass on main as it stands. cargo clippy --workspace --all-targets --locked -- -D warnings stops at the first crate that fails, so count the warnings instead: cargo clippy --workspace --all-targets --locked reports 83 distinct locations -

      • leonida-gpu 52, leonida-hle 8, leonida-shader 6, leonida-loader 6, leonida-lua 5, leonida-menu 2, leonida-formats 1, apps/leonida 3.
      • The lints behind them: manual_is_multiple_of, single_match, unnecessary_cast, not_unsafe_ptr_arg_deref, needless_borrow, too_many_arguments, large_enum_variant, drop_non_drop, wrong_self_convention, byte_char_slices, cloned_ref_to_slice_refs, unnecessary_sort_by, assertions_on_constants, missing_transmute_annotations, int_plus_one, new_without_default, unusual_byte_groupings, function_casts_as_integer, precedence, and a few more.
      • None of them is in d3d12/crates/leonida-hle/src/modules/rpcrt4.rs; the eight in leonida-hle are in xmem.rs, dstorage.rs, clock.rs and gameinput.rs.

    What it is worth: every Rust change lands with nothing behind it, and the lint job that would cover them stays red until those 83 are fixed. The fixes are mechanical (is_multiple_of, if let, dropping the redundant casts) and need no game data, and the repository's rule is fix, don't disable - so it is real edits, not #[allow] attributes. Two pull requests would do it: one for the leonida-gpu half (52), one for the rest (31). Wiring the workflow itself up is a maintainer's call, since a nested file never runs.

    I am not claiming this - it is a pointer for whoever wants the slot. My own work is the D3D12-HLE-RPCRT4-UUID-PARSE-AND-OOM-BOUNDS branch below, and it adds none of these 83.

    AI-assisted: yes

  22. Tyrannys commented on Nov 28, 2026

    @Tyrannys
    Contributor

    claiming: RT-GRAPHICS-PIPELINE-BOOK - record each graphics and mesh pipeline a run builds (opt-in LEONIDA_PIPELINE_BOOK=1), with enough to make the same vkCreateGraphicsPipelines call again, and let gta6rt --precompile-pipelines replay that book through the same build path. The next boot then gets driver cache hits for graphics as it does for compute today.

    Why: the offline cache never hits for graphics pipelines. vk_pipeline_check builds each stage with stub partners and its own target formats and state, so the driver key can never match. A boot then compiles every graphics pipeline at its first draw, at 2-5 s each on NVIDIA.

    How it relates to other work:

    The book stores the runtime's resolved Vulkan recipe and where each stage's SPIR-V comes from. It writes no SPIR-V, and stays local next to the pipeline caches. Tests are CPU and synthetic only, with no game data.

    AI-assisted (Claude Code)

  23. adrianmjim commented on Nov 28, 2026

    @adrianmjim

    claiming: RT-SESSION-CACHE-UNCHANGED - with the offline seed loaded, pipeline_cache.session.bin is the seed plus whatever the session added. In the default configuration graphics misses go to the heavy cache and compute to the journal, so a session adds almost nothing to the shared cache. Measured on an RX 7900 XT (12-minute run, 1.88 GB seed): the session added 0.1-6 MB.

    Even so, every exit rewrites the whole ~1.9 GB blob (save_session_pipeline_cache, runtime/shims/d3d12_vulkan_device.cpp). Every launch creates a second driver cache from it and merges it (merge_session_pipeline_cache): a transient +1.7 GB private-commit peak at t=10-20 s (8.1 -> 9.95 -> 8.3 GB in the mem-probe vmmap line), plus 1.9 GB read.

    Plan: when the cache is less than a threshold (default 16 MiB, switch to be named in the PR) larger than the offline seed, skip the exit write and leave the session file out of the launch merge. With no offline seed, the session file is the cache and behaviour is unchanged, so this does not touch the 4 GiB limit or the checkpoint work in #1756 or #1886. A test that fails on main comes with it. No game files.

  24. MoonEyes commented on Nov 28, 2026

    @MoonEyes
    Collaborator

    claiming: RT-PICTURE-CROSS-VENDOR (from #2464, "State audits and the vendor matrix") — the Windows NVIDIA column: GeForce RTX 4060 (8 GB), Windows 11. Same build and recipe as the other columns, one PICTURE block per defect class, results gathered into the docs/ page the package asks for. Report only: no translator or runtime changes, no pictures, program names, log lines or addresses on GitHub (pictures go to Discord). The Windows AMD and Linux RADV columns are open for anyone with that hardware; I will keep the build revision and recipe in the page so the columns stay comparable.

    AI-assisted (Claude Code, Claude Opus 5.5), posted for MoonEyes.

  25. Mby159 commented on Nov 28, 2026

    @Mby159
    Contributor

    Verification: the five branches for the standard-library chain apply cleanly on current main and turn their tests green

    Tauwni offered these branches for pickup in his findings (7239812627, 7239441135): "no PR (this account is at the open PR limit), so anyone may take them". This account is at the open PR limit too (our only open PR is #2573), so I verified them here instead of opening them.

    Measured on Windows 11 x64, CPython 3.12.10, against upstream main 9c49bd5332. Method: take each branch's diff against main, apply it to a clean checkout of main with git apply, then run the test file with python -I.

    Branch (Tauwni) Test file on main with the branch
    fix/makegame-pipelines-index-message tests/test_make_game_pipelines.py FAILED (failures=3) OK (20 tests)
    fix/ssc-lshl-add-fixture tests/test_sampler_source_census.py FAILED (failures=1) OK (30 tests)
    fix/spirv-metal-set0-tests-after-fix tests/test_spirv_metal_set0_cli_errors.py FAILED (failures=1) OK (7 tests)
    (same branch) tests/test_spirv_metal_set0_extra.py FAILED (failures=3, errors=17) OK (24 tests)
    fix/semantic-cvt-f16-int16-mods-noop tests/semantic/test_valu_cvt_f16_int16_mods.py FAILED (failures=2) OK (5 tests)
    fix/stdout-replace-two-new-scripts tests/test_tool_stdout_encoding.py FAILED (failures=1) OK (4 tests)

    All five diffs applied on current main with no conflict and no rejects. Each branch touches one file (two for the spirv-metal one), the files being the test files in the table.

    Two more facts about the chain, measured the same way:

    What is still red on current main once all of the above is applied:

    So the chain now needs #2536, #2550 and #2552 to land - each already has an open pull request - and the five branches above are ready to be opened by whoever has a slot.

    Two notes for whoever opens them. No pull request exists for any of these five heads (checked pulls?head=Tauwni:<branch>), and the heads have moved since the findings above were written: the ones I measured are fix/makegame-pipelines-index-message 7f432491, fix/ssc-lshl-add-fixture 37e88051, fix/spirv-metal-set0-tests-after-fix f90854d0, fix/semantic-cvt-f16-int16-mods-noop 0ec015cf and fix/stdout-replace-two-new-scripts f7faf72f. Each is one commit ahead of main and 17 behind it, so a rebase onto today's main is conflict-free.

    AI-assisted: yes.

  26. MoonEyes commented on Nov 28, 2026

    @MoonEyes
    Collaborator

    Releasing RT-PICTURE-CROSS-VENDOR (claimed above for the Windows NVIDIA column): I am moving to D3D12-layer work and will not run the vendor matrix. Nothing was posted for it; the item is free for anyone.

    AI-assisted (Claude Code, Claude Opus 5.5), posted for MoonEyes.

  27. MoonEyes commented on Nov 28, 2026

    @MoonEyes
    Collaborator

    claiming: D3D-BUNDLE-EXECUTE-INDIRECT — defer ExecuteIndirect recorded in a bundle and replay it on the parent at ExecuteBundle, like the other deferred bundle calls (defer() in runtime/shims/d3d12_com.cpp). Today it is listed as "Not deferred yet" in docs/d3d12_vulkan.md (bundle section), and #841 leaves it out explicitly ("ExecuteIndirect inside a bundle remains un-deferred").
    Plan: measure first on the PC D3D12 runtime (default adapter and WARP) what a bundle's ExecuteIndirect sees and leaves on the parent (root signature and arguments, buffers, count buffer), as d3d12_bundle_test does for the other calls; then a test that fails on main and passes with the change. D3D12 layer only, no game files. Overlap: #841 (bundle DispatchMesh) and #2522 touch other lines of d3d12_com.cpp; I will merge main in if one lands first.

    AI-assisted (Claude Code, Claude Opus 5.5), posted for MoonEyes.

  28. MoonEyes commented on Nov 28, 2026

    @MoonEyes
    Collaborator

    done: VERIFY-D3D12-8GB-TEXTURE-BUDGET (claimed in #2570 (comment)): inconclusive on the budget; the default-budget run ended in the title's hang watchdog.

    PROVISIONAL (n=1 per setting). The budget comparison is not settled: B is the only run that reached the late world load, A2 ended before it. What these runs show on an 8 GB NVIDIA card under Windows: the whole card (nvidia-smi, other apps included, about 1.6 GB without the game) stayed under 7 GB up to 909 s of d3d12/, with no 0x8007000E in any of the three logs.

    RUN B | 2026-11-28 UTC | MoonEyes | AI-assisted: Claude Code
    BASE:        23e51d3be, d3d12 diag build
    MACHINE:     RTX 4060 8 GB, desktop | 610.88 | Windows 11 | 32 GB
    RECIPE:      scripts/play-d3d12.ps1 -SeriesS -FrameGen 2 + DEVIATIONS: LEONIDA_WINDOWS_BAR_MB=0, LEONIDA_TEXTURE_BUDGET_MB=1024 | precompile: yes, 547 new pipelines to make, 537 made in 1234 s
    OS/DRIVER:   hardware-accelerated GPU scheduling off, so frame generation did not run (the log says DLSS-G requires it)
    TARGET:      peak video memory and frame time | PREDICTED: at least 500 MB below the default's peak, frame time within 20 %
    MEASURED:    duration 909 s from the game window; whole-card video memory peak 6877 MB, still rising at the stop; caption: mostly 60 fps in menus (dips to 4),
                 then mostly 0-3 fps with 600-4600 draws/frame through the world load, 0-12 fps with 990-1700 draws/frame from 815 s;
                 no 0x8007000E, exception, panic or device lost in the log; the title's texture copies peaked at 1034 MB
    END:         time limit (900 s), stopped by the script
    CACHES:      shaders warm, 547 new pipelines (after RUN A) | RUN 1 of 1
    INSTRUMENTS: none beyond the caption, nvidia-smi and process samples every 10 s
    VERDICT:     not decidable: no default-budget run reached the same point
    
    RUN A2 | 2026-11-28 UTC | MoonEyes | AI-assisted: Claude Code
    BASE:        same as B
    MACHINE:     same as B
    RECIPE:      same as B, without LEONIDA_TEXTURE_BUDGET_MB | precompile: yes, 539 new pipelines to make, 536 made in 827 s
    OS/DRIVER:   same as B
    TARGET:      same as B
    MEASURED:    duration about 155 s from the game window; 16-60 fps in menus; the caption froze at 16 fps / 9 draws from about 123 s,
                 and the process ended about 30 s later; whole-card video memory 5398 MB (sampled a few seconds after the crash, while the process was exiting)
    END:         title hang watchdog, read from the log
    CACHES:      shaders warm, 539 new pipelines (after B) | RUN 1 of 1
    INSTRUMENTS: same as B
    VERDICT:     neither held nor missed: the run ended before the window compared
    

    The A2 end is an unhandled 0xc0000005, a write to 0x0 at +0x23cf683 called from +0x2215c35: the title's hang watchdog, the same path as #1915 and #1537. It fired about 31 s after the frame counter stopped advancing. One watchdog on one run does not tie it to the budget. The title also tried to upload its crash report; the runtime blocked the connection, as intended.

    An earlier 300 s run with the default budget (RUN A, before B) ended in the world load at the time limit, whole-card peak 6032 MB, no error; too short to compare.

    What would settle the budget: several runs per setting to the same point in the world, with hardware-accelerated GPU scheduling on so frame generation is part of it; about 35 min per run on this card when new pipelines have to be made. The prediction was written before run A; the change to 900 s runs was written before B.

  29. ecox982745 commented on Nov 28, 2026

    @ecox982745

    Completed VERIFY-2566-WRITTEN-PAGES-WIN4090. The reported cross-thread update mismatch did not reproduce on the RTX 4090 under native Windows. All 12 cross-thread checks and 48 full-buffer GPU readbacks passed on each revision with Vulkan validation enabled. Results and exact revisions. AI-assisted with OpenAI Codex (GPT-6).

  30. azsekazvamdimitar commented on Nov 28, 2026

    @azsekazvamdimitar
    Contributor

    finding: --mesh-serial-waves measured in game on an RTX 3090: mesh GPU time per frame 1.8-2.4 s -> 0.23-0.26 s, frame rate about 2x, same picture. Recommend making it the default once #2513 lands.

    Where: tools/rdna2spirv.py --mesh-serial-waves (#2435); make_game.py does not pass it yet (#2513, open, off by default). docs/design.md, row "Mesh shaders with their waves in series", lists only an RTX 4080 GPU-test measurement.

    Setup: RTX 3090, NVIDIA 590.48.01, Linux, GE-Proton, recompiled runtime (runtime/, D3D12 -> Vulkan) on main 4938673 + #2566 (+ a local fallback to the one-allocation arena, see #2566 (comment)) + #2391 + #1086. Only the 9,282 mesh shaders were translated again, with main's translator and --wave64-emulate --mesh-serial-waves (9,235 took the serial form); everything else unchanged. LEONIDA_GPU_PROFILE=1, 15-minute boots into the first playable scene.

    side by side (boot 77) serial waves (boots 78 cold, 79 warm)
    mesh GPU time per frame (in world) 1.8-2.4 s 0.23-0.26 s
    largest character draw (ped mesh + deferred ped pixel shader) 2.15 ms 0.19 ms
    frame rate in world 0.18-0.37 frames/s 0.56-0.75 frames/s
    cold mesh pipeline compile, average 3.6 s (124 misses, boot 72) 1.9 s (124 misses, boot 78)
    compute / graphics per frame 1.0-1.5 s / 15 ms unchanged

    The screenshots of both boots show the same scene (doorway, prison yard at sunset); no device-stall, device loss or hang in boots 78/79. Two boots on one GPU, so a sample, not a census. Why it matters: in the world this setup is GPU-bound (title threads wait on their fence, GPU 88-100% busy), and the side-by-side mesh form was over half of the GPU frame. What is left is compute (~1.3-1.5 s per frame), mostly a few wave64-emulated compute shaders and the FidelityFX upscaler passes.

    Needs game files: yes for the boot; no particular hardware beyond an NVIDIA card with 32-wide subgroups.

    AI-assisted (Claude Code).

  31. MoonEyes commented on Nov 28, 2026

    @MoonEyes
    Collaborator

    claiming: VERIFY-D3D12-GPU-HOSTLIST-INDIRECT-ARGS-POOL-8GB — profile M check of zmasi's fix/d3d12-gpu-hostlist-indirect-args-pool (1ef5ff006, claim #2570 (comment)) against timbot103's finding (#2570 (comment)), on a GeForce RTX 4060 8 GB desktop, Windows 11.

    One build (main d22c205ca + 1ef5ff006), one variable: LEONIDA_INDIRECT_ARGS_POOL=0 (A, per-list buffers as before) against unset (B, pooled). Same recipe and caches for both. Sending back per run: dedicated video memory of leonida.exe every 60 s, the pool's own counters where the log prints them, END and duration. Prediction written before the runs. Verification only: no code change, no game data on GitHub. Results go on zmasi's PR when it opens, here until then.

    AI-assisted (Claude Code).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions