[integration] PageMirror, GPU detile, async queue & RDNA2->SPIR-V performance stack (INTEGRATION-PERF-CPU-GPU-R6) #2566
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2566"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-11-28T06:24:16Z.
Claimed in the coordination issue as: INTEGRATION-PERF-CPU-GPU-R6
What and why
Integration PR (
aslan2142:integration/perf-cpu-gpu-r6, merged cleanly with upstreammaind48a957bb) combining the PageMirror / in-place console descriptor heap / GPU detile runtime stack with ten rounds of CPU submission, bindless GC, memory-tracking, async synchronization, and RDNA2 → SPIR-V translator performance & correctness work.1. RDNA2 → SPIR-V Translator Correctness & GPU Codegen (
tools/rdna2spirv.py,tools/shader_meta.py,tools/lane_masks.py,docs/design.md)v_readfirstlane_b32,v_readlane_b32,v_permlane16_b32/v_permlanex16_b32, DPP (fi:1& out-of-row),ds_append/ds_consume/ds_permute/ds_lane_read, and non-fragments_wqmagainst unlaunched/absent subgroup lanes; adds static SPIR-V invariant checker (tests/semantic/check_absent_lane_ub.py), partial-wave CPU regression suite (tests/semantic/test_absent_lane_ub.py), and live GPU test (tests/test_absent_lane_gpu.py).fmulzenablement: Checks exactHW_REG_MODEbit overlap with[4, 6)(FP_DENORM.fp32) in_disables_ftz32(), re-enabling FTZ32 andfmulzacross the corpus while keeping explicit software denormal flushing (force=True) onv_exp_f32(GLSL.std.450 Exp2).sbuf_slow+NonWritableSMEM: Replaces expanded per-load slow paths with compactOpLoopMerge ... DontUnroll%sbuf_slow_{ro,rw}_xNhelpers with overflow-safe 64-bit bounds, and adds CFG store-reachability (WAR-safe) + descriptor-provenanceNonWritableSMEM tagging.SPV_KHR_vulkan_memory_model(MakePointerVisible/MakePointerAvailable) forglc/dlcloads & stores +reads_glc_buffermetadata.OpSpecConstantspecialization (literal_samplers/literal_sampler_spec_base) bypassing FNV-1a bindless probes.image_read_typeddead-branch elision (f32/f16consumers + bilinear/linear-mip literal samplers) and table-drivenbuffer_store_format.writes_bufferandbuffer_write_slotsmetadata for gating passive write-back.s_buffer_load,SPV_KHR_integer_dot_product(v_dot4), heap T# bindless index word in dword 6, and pure scalar-spill VGPR parking.docs/design.md.2. Runtime PageMirror, Console Heaps in Place & GPU Detiling (
runtime/src/title_mirror.h,title_mirror_hot_cold.h,shadow_keep.h,vulkan_title_detile.h,runtime/shims/d3d12_*,xmem.cpp)Chunk::pages[32768]direct table) with 256-byte piece-level CPU/GPU merge, hot/cold submission write tracking (kPromote = 6/8), 64 MiB copy-queue readback with sub-page 256 B copies,page_mirror_bufferresolve_cache, and hoistedFilterCacheScope+ parallel Phase-A/disjoint-WC-flush console heap filtering (local_mirrorchunk cache, AVX2 32-byteslots_equal_32, 8 KiB L1dseen_keys, per-batch T# dedup, lock-freein_place_work_pendingfast-skip)./arch:AVX2(x64 MSVC/clang-cl) and-march=x86-64-v3(x86-64 GCC/Clang) for C/C++ targets; adds 4×256-bit AVX2 + 4×128-bit SSE2shadow_keep::sum_of(),sum_of_batch_256(), and fused SEH-safeguarded::copy_and_sum_256(), plus an 8-workerTitleMirror::WorkerPoolwith 50 µs spin and WC streaming copies.Cell::known_*: Unlocked parallel Phase-1 readback pre-hashing, sharedCell::known_*acrossCellGuard&TitleTextureCells(excludingPAGE_READONLYfrom VQ caches),TitleHeap::hooks.commit/decommitmap-change scoping, batchedcopy_page_mappings(), safe per-tile bridgedVirtualProtectrollback (preserving already-armed gap tiles), zero-syscallall_armedfast paths, and range-scopedreopen()/changes_since().title_texture_watch.h,title_texture_refresh.h,d3d12_title_image_upload.h):TitleMirrorchunks +TitleMirror::range_sum()skip + 512-job / 128 MiB GPU-mirror upload batching (TitleImagePool8 MiB/16 MiB cap,kMaxScratchSlots=64).publish_streamed_texture()fix, separatedtitle_texel_writes, Stage-2TextureVqCache+ Stage-2bCell::restore[]readability bypass, single-lockpage_mirror_check_batch(), andTitleTextureWatch::examine_batch()+TitleTextureCells::arm_batch().vulkan_bindless.h,d3d12_vulkan_device.cpp):ViewKeysharing, O(1)BindlessSetfree-lists, single-lockbind_title_image(),ConsoleHeapSlotRecordskTexture/kSettledlive tracking, and explicitevictableclassification.hard_full, multi-keysv.keysliveness,dim_2dmirror-slot room notifications) eliminating 65,536-slot saturation and GC thrash in long gameplay sessions.3. Runtime Async Queue, Replay Cache, List-Value Sync & Single-Flight Coalescing (
runtime/src/vulkan_backend.h,queue_holds.h,vulkan_replay.h,vulkan_presenter.h,runtime/shims/d3d12_com.cpp,d3d12_xs_list_values.h)ReplayStateCache: Batches compatible consecutive draws into single dynamic rendering scopes, elides redundant Vulkan pipeline/descriptor/push/viewport/scissor binds inemit_commands(), cachesCommandListsummaries, and fans out synchronous unbuilt PSOs concurrently viaPipelineCompiler.Pump::choose_release()TOCTOU + quiet window (0 released unmet), dedicatedQueueHoldsbarrier-drain thread, non-blockingrelease_ready(), SEH aligned volatileread_value(), 1000 ms slot-12 timeout,VulkanFence::signal_gpu_relay()(vis_seq=0) + retroactiveQueueHolds::relay_wait()/VulkanQueue::apply_wait_relay()withWriteGroup::barevisibility safety, exact landed-valueconsole_value_met()verification,wait_metre-check,relay_wait()gate preservation, and signal-onlyconsumed_wait_vistransitivity.BeforeExecuteCoalescer+ feed-only mirror drain: Reordered global refresh (wb -> mirror -> flush -> tex -> shadows -> 2nd flush) with decoupled lazygpu_profile_.resolve()and 4-deepVulkanPresenter::frames_; coalesced submissions run a lock-free O(1) check /drain_page_mirror_feed_only()(0.11–0.29 mswhenCopyPageMappingsBatchXremaps are queued) achieving 96–97% coalescing with 0 single-flight waits (opt-outLEONIDA_BEFORE_EXECUTE_COALESCE=0).Measured Impact (RX 7900 XTX, RADV, Wine)
run107, post-mergerun108: 370–400+ s) with 0 GPUVM faults, 0VK_ERROR_DEVICE_LOST, 0 unmet list-value gates (across 28,372–42,047 held gates), and 0 bindless GC thrash (3 clean dead-sweeps of 8,192 dead keys each,0textures notified).~0.6–0.8 fpsbaseline (3.6–5.9 fpsat Round 6) to7.4–13.9 fps(96–97%before-executecoalesced,0single-flight waits,own threads50.8–88.3 ms/f,title threads8.6–11.3 ms/f).6.0–7.4 fps(79–84 ms/fown threads,7.0–15.1 ms/ftitle threads, Direct GPU now66–75%utilized /101–121 ms/fbusy — shifting the bottleneck from CPU to GPU).Tested
232b4a1ee):python3 -m compileall -q make_game.py tools tests: 0 errors.python3 -m unittest tests/semantic/test_alu_exp_f32.py tests/semantic/test_ftz32_fmulz.py tests/semantic/test_buffer_format_d16_hi.py -v: 14/14 PASS.test_absent_lane_ub,test_ds_permute_eager,test_cvt_f16_denorm_mods,test_f16_denorm_preserve,test_buffer_format_d16_hi,test_gather4_c_lz,test_sample_g16,test_high_half_shared_readers,test_ftz32_fmulz,test_wave64_emulate_opt,test_wave64_halves,test_fma_denorm_product,test_alu_sat_pk_u8_i16,test_lds_bound_access,test_lds_write2_equal_offsets,test_active_runs,test_fp_edge_conformance): 278/278 PASS.spirv-val-valid; full-corpuscheck_absent_lane_ub.pysweep: 0 flagged / 0 UB sites.-march=x86-64-v3,MESA_VK_DEVICE_SELECT='1002:164e!'):cmake --build runtime/build+ctest --test-dir runtime/build --output-on-failure -j8: 136/136 PASS (2 skipped:shader_library_corpus,vk_sync_validation).LEONIDA_VK_VALIDATION=1onlist_value_progress,submit_frame,vk_title_mirror,vk_title_detile,vk_bindless_grow,vk_bindless_dimensions,title_mirror_hooks,r3b_runtime_hooks,replay_state_cache: 9/9 PASS, 0 validation errors.clang-cl /arch:AVX2) & targeted Wine iGPU suite (r10-main-merge-igpu):gta6rt.exe+gta6rt_tls_host.dll: clean build, 0 errors.d3d12_existing_heap,d3d12_heap_in_place,d3d12_queue_wait,xbox_list_value_fallback,list_value_progress,submit_frame,console_heap_slot_records,title_mirror,shadow_keep,xmem,vk_bindless,vk_title_detile,d3d12_pipeline_checkpoint,xs_proxy_mock,acphal,d3d12_fence_timing): 40/41 PASS (xmem_write_watchpassed on re-run; only upstreamd3d12_fence_timing'sEnumAdapterByLuidfailed under headless Wine Xvfb without DRI3 — its GPU/CPU clock calibration checks passed).python3 -I scripts/check_no_game_data.py: PASS.GPUs tested:
AI-assisted: yes — Antigravity (Gemini 4 Neon & Claude Opus 5.5).
Checklist
mainand merges cleanly (mergedd48a957bb, reviewed by two independent reviewers).docs/design.md, with how it was confirmed.Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T10:00:55Z.
@aslan2142 —
VERIFY-2566-VEGA20-RADV: not validation-clean on fixed-wave64 gfx906, RADV Mesa 26.0.8. Testedcd8b5632plus3ca0707dd(local treebf6c9ea2). The only merge conflict was inruntime/CMakeLists.txt; I kept both new CTest registrations and main’s independent skip-code property.Actionable diagnostics (Khronos + sync validation active):
vk_title_mirrorreturns success despiteVUID-VkShaderModuleCreateInfo-pCode-08737. CMake builds its shader for Vulkan 1.3 (SPIR-V 1.6); the test requests Vulkan 1.2. Recompiling only that fixture for 1.2 gave the same 64-page readback with zero diagnostics.vk_device_markersfails with repeatedSYNC-HAZARD-WRITE-AFTER-WRITEon its shared start/finish marker words (10 reports, the duplicate cap). The compute-marker loop is also present on main; I did not attribute its origin to this PR.d3d12_existing_heappasses its readback but reportsVUID-vkDestroyDevice-device-05137: 4 buffers, 3 images and 3 command buffers still live at teardown. Baseline attribution unverified. Page-mirror, in-place heap and T# refill tests passed.Translator: 407/407 methods passed across the 25 touched semantic files. The six ordinary translator test files gave 839 passed, 5 failed, 11 excluded from the reserved PC-tail lane. The five failures also fail on the unmerged PR and pass on main: one bpermute text-pattern assertion, two WQM instruction-shape checks, and both D16 gather type-name assertions. All five modules pass
spirv-val; these failures are not evidence of incorrect pixels. Both absent-lane fragment readbacks passed on physical subgroup64; the wave32-only compute case skipped before dispatch. Four signed/unsigned dot and scalar-fallback graphics pipelines created successfully; the updated table-fetch and texture fixtures also passed.Synthetic correctness results only, not a world-frame or performance claim.
AI-assisted.
Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T10:11:50Z.
On pristine
33db04a70,vk_device_markersreproduced the same 10 write-after-write reports (the duplicate-report cap) on the same gfx906 / RADV Mesa 26.0.8 device with Khronos synchronization validation enabled. The started/finished marker words still read back 5/5 and 8/8, but CTest failed on validation, confirming that the hazard also exists on main without #2566.AI-assisted.
Imported from ubiquitarianism/leonida. Originally posted by ecox982745 on 2026-11-28T11:36:01Z.
Resolved on the integration branch. The test change in this PR fixes both D16 gather assertions. On its parent
232b4a1eed, the fixed level-zero (lz) case passed and both explicit-LOD cases failed. On PR heada8b1abe4c2, all three passed. The separate test patch linked below is no longer needed for these failures.I also regenerated the 12 synthetic fragment modules on
a8b1abe4c2. All passed Vulkan 1.2 SPIR-V validation and were byte-identical to the modules from the earlier RTX 4090 run. The hardware results below are from that earlier run.The two D16 gather failures in the Vega verification come from the test matching a SPIR-V type name. At
cd8b5632b8, explicit-LOD gather still emits four float, four signed integer and four unsigned integer fetches. The unsigned vector is named%v4uint_sl; the assertion expects%v4uint_st.One-file test fix · apply-ready patch. It resolves each fetch result through its four-component vector declaration before counting element types. The test still requires zero fetches for
lzand exactly four of each type forlandl_o.4a54aedcb6before and after the test edit. The related texture selection passed 95/95 on the PR. Including the separately reported WQM test adds one failure outside this patch.vk_texture_test. I checkedlz, explicit LOD 0, and explicit LOD 0 with a signed X offset of −1, with all four channel masks on UNORM, UINT and SINT textures. The fragment output exposed all four raw 16-bit tap values independently. All 36 main/PR pairs matched the expected texture values and tap order across 72 draws and 294,912 RGBA pixels. All 24 fragment modules passedspirv-valfor Vulkan 1.2.DenormFlushToZero 32requested produced a validation diagnostic on this device. The scored comparison used the translator's--no-ftz32setting on both sides and had zero Vulkan validation diagnostics. All inputs were synthetic.AI-assisted with OpenAI Codex (GPT-6).
Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-11-28T12:19:45Z.
Pushed Rounds 7–10c (
232b4a1ee) and merged up-to-datemain(d48a957bb, 508 commits) cleanly intointegration/perf-cpu-gpu-r6.Summary of Changes Since Round 6 (
cd8b5632b→232b4a1ee)replay~2× faster), hoistedFilterCacheScope+ parallel Phase-A filter, 64 MiB copy-queue readback, deferred slot-70 uploads to GPU detile +publish_streamed_texture()fix, per-fencevis_seq, unlockedQueueHolds::run_barriers(), 4-deepVulkanPresenter::frames_.Pump::choose_release()TOCTOU + present quiet window (0 released unmet), dedicatedQueueHoldsbarrier-drain thread, batchedcopy_page_mappings(), SEH aligned volatileread_value(), 1000 ms slot-12 timeout (0timeouts).Chunk::pages[32768]direct table,sum_of_batch_256(), sub-page 256 B readback copies,page_mirror_bufferresolve_cache,OutScratchGuard, 512-job / 128 MiB GPU-mirror texture upload batching.CellGuardzero-syscallall_armed, VQ cache,disarm_batch/set_hot_batch, range-scopedreopen(), WC streaming copy (kStripBytes=16 KiB),WorkerPool50 µs spin.title_texel_writes, Stage-2TextureVqCache,TitleImagePool8 MiB/16 MiB cap, refcountedViewKeysharing, O(1)BindlessSetfree-lists, single-lockbind_title_image(),GeometryViewsdedicatedWriteQueue.ConsoleHeapSlotRecordskTexture/kSettledlive tracking, explicitevictableclassification, Phase 1 dead-key sweep with 0 texture notifications + 8,192-slot hysteresis,dim_2dmirror-slot room notifications, multi-keysv.keysliveness) — eliminated 65,536-slot saturation and GC thrash.Cell::known_*cache acrossCellGuard&TitleTextureCells(withPAGE_READONLYexcluded from VQ caches and safe per-tile bridgedVirtualProtectrollback),TitleHeap::hooks.commit/decommitmap-change scoping, fused SEH-safe AVX2/SSE2guarded::copy_and_sum_256(), 8-worker pool, disjoint Phase A/B WC flushes & chunk-locallocal_mirrorcache.VulkanFence::signal_gpu_relay()(vis_seq=0) + retroactiveQueueHolds::relay_wait()/VulkanQueue::apply_wait_relay()withWriteGroup::barevisibility safety, exact landed-valueconsole_value_met()check,wait_metre-check,relay_wait()gate preservation, and signal-onlyconsumed_wait_vistransitivity.drain_page_mirror_feed_only()on coalescedbefore-executesubmissions (0.11–0.29 mswhenCopyPageMappingsBatchXremaps are queued, 0 single-flight waits, 96–97% coalesced), plus decoupled lazygpu_profile_.resolve(), reorderedBeforeExecuteCoalescer, and Stage-2bCell::restore[]readability bypass.main(d48a957bb) merge & post-merge audit (66d4723f4,232b4a1ee):docs/design.md,runtime/CMakeLists.txt,tests/semantic/spirv_wave_interp.py) and audited with two independent reviewers.tools/rdna2spirv.pywhere upstream'sv_exp_f32denormal flush calledGen.flush_f32()underFTZ32(addedforce=Trueforv_exp_f32) and synced_vgpr_reads_ofwithbuffer_load_format_d16_hi_x.Post-Merge Verification (
232b4a1ee)RADV NAVI31, Mesa26.3.1-arch1.3, Wine) post-merge run (370+ s, visible + audio):VK_ERROR_DEVICE_LOST, 0 unmet gates (28,372gates held,429relayed,0failed), 3 clean bindless dead-sweeps (8,192dead keys each,0textures notified).7.4–13.9 fps(up from3.6–5.9 fpsat Round 6),96–97%before-executecoalesced,0single-flight waits.6.0–7.4 fps(79–84 ms/fown threads,7.0–15.1 ms/ftitle threads, Direct GPU now66–75%busy — bottleneck has shifted from CPU to GPU).-march=x86-64-v3, RDNA2 iGPU1002:164e): 136/136ctestPASS, 9/9 VVL PASS (0 VUIDs).compileallPASS,check_no_game_data.pyPASS, 14/14test_alu_exp_f32+test_ftz32_fmulz+test_buffer_format_d16_hiPASS, 278/278 across all 17 merged-feature semantic suites PASS.clang-cl /arch:AVX2):gta6rt.exebuilt cleanly; targeted Wine iGPU suite 40/41 PASS (xmem_write_watchpassed on re-run; only upstreamd3d12_fence_timing'sEnumAdapterByLuidfailed on headless Wine Xvfb lacking DRI3 — clock calibration checks passed).AI-assisted: Antigravity (Gemini 4 Neon & Claude Opus 5.5).
Imported from ubiquitarianism/leonida. Originally posted by azsekazvamdimitar on 2026-11-28T13:36:11Z.
Tested #2566 on NVIDIA (RTX 3090, Linux, GE-Proton11-14 and WineHQ 11.22, merged onto main
493867366): the runtime cannot create the GPU address arena there, so the title does not get past startup.create_arena(runtime/shims/d3d12_vulkan_device.cpp, thesparsedecision): with every loaded module sign-extending its V# base, the arena is made sparse. NVIDIA's driver offers no host-visible memory type for a sparse buffer (memoryTypeBits0x2, device-local only), so the first unit'sallocate(..., kArenaRequiredMemory, ...)fails:GPU address arena: no memory for its first 448 KiB->the GPU address arena could not be created-> every pipeline refused (pipelines need the GPU address arena, ~70,000 refusals) -> the title crashes about 2 minutes in (two boots, cold and warm caches). There is no fallback to the one-allocation arena.arena_sparse_gpufails on the same card for the same reason (line 184: type != UINT32_MAX), natively, under WineHQ and under GE-Proton.memoryTypeBitshas no type withkArenaRequiredMemory, log it and make the arena one allocation as before) the branch boots. Compared with main + the same caches on this card: world reached in about 5 min instead of about 12, a coherent picture where main showed untextured blocks, our submit path 4-25% of the wall time in the world instead of 100%+, no device loss or stalls in 3 boots. The frame rate in the world stays at 0.2-0.4 frames/s; the title then mostly waits on fences (99% of the fence-mirror waits end on the 10 ms timeout). The page mirror is off on this card either way (no aliased strict sparse buffers). Cold-cache boots still freeze on synchronous compiles.AI-assisted (Claude). The fallback is about 25 lines; happy to push it as a suggestion if you want it in this PR.
Imported from ubiquitarianism/leonida. Originally posted by timbot103 on 2026-11-28T13:57:03Z.
Review: COMMENTED
Independently verified
232b4a1ee(Rounds 7–10c) on native Windows 11 (MSVC 19.44 + Ninja, Python 3.14, AMD LLVM 23llvm-mc) across two desktop Vulkan GPUs with zero game files:32.0.16.1664, wave32,shaderDenormFlushToZeroFloat32 == VK_FALSE)gfx1036) (driver32.0.21030.2001, wave32..64 default 64)(Checked the diff
232b4a1ee..a8b1abe4cpushed while this run was finishing:d1f53516d/a8b1abe4calready fixed the 5tests/test_translate.pyassertions and resolved thetools/vk_subgroup_info.pymerge conflict againstmain, so those are omitted below. All 6 native Windows / MSVC / NVIDIA / cross-GPU runtime issues below remain untouched ina8b1abe4c.)What Passed Cleanly
scripts/check_no_game_data.pyandpython -m compileall -q make_game.py tools testsboth pass.#2566semantic suites (18 files, includingtest_absent_lane_ub,test_ftz32_fmulz,test_alu_exp_f32,test_buffer_format_d16_hi,test_wave64_emulate_opt,test_wave64_halves): 285/285 PASS.tests/semantic, 529 files, 6,563 tests): 528/529 files (6,561/6,563 tests) PASS; the sole failing file (test_valu_cvt_f16_int16_mods, 2 subtests inv_cvt_u16_f16/v_cvt_i16_f16) reproduces identically on clean merge-based48a957bb(0 semantic regressions).tests/test_absent_lane_gpu.py): 2/2 PASS on AMD Radeongfx1036withLEONIDA_VK_VALIDATION=1(0 validation errors), and 2/2 PASS functionally on RTX 5080 withLEONIDA_VK_VALIDATION=0(see validation blocker #3 and Windows.exenote below).#2566runtime & Vulkan CTests passing withLEONIDA_VK_VALIDATION=1(0 validation errors) on both RTX 5080 and AMD Radeongfx1036:vk_title_detile(187 cases + batched/3D/pool checks),vk_bindless_grow,vk_bindless_dimensions,vk_console_heap_gpu,d3d12_bindless_churn,d3d12_bindless_churn_validated,d3d12_tsharp_refill,d3d12_unbound_tsharp_rules,d3d12_queue_wait*,d3d12_xmem_placed,title_mirror_hooks,title_mirror_hot_cold,r3b_runtime_hooks,replay_state_cache,list_value_progress,d3d12_compute,d3d12_draw,d3d12_shadow_keep_refill.Remaining Blockers Found on Native Windows / MSVC / NVIDIA (Still Present in
a8b1abe4c)Native MSVC
gta6rt.exefailsgta6rt_no_tls_callbacks(#35) — non-trivialthread_localdestructors linked in:check_pe_tls_callbacks.pyrejectsgta6rt.exebecause MSVC emits__dyn_tls_init(MSVCRT:tlsdyn.obj) and__dyn_tls_dtor(MSVCRT:tlsdtor.obj) in the PE TLS directory (which causes the title's_register_thread_local_exe_atexit_callbackto fast-fail with0xC0000409).thread_localadditions in#2566:runtime/shims/d3d12_vulkan_device.cpp:4615(static thread_local std::vector<...> stack)runtime/shims/d3d12_vulkan_device.cpp:8286(thread_local std::unique_ptr<FilterPageCache> tls_cache)runtime/shims/d3d12_vulkan_device.cpp:8406(thread_local std::unique_ptr<std::uint8_t[]> tls_buf)runtime/shims/d3d12_vulkan_device.cpp:8893(thread_local std::vector<PageWork> tls_page_work)runtime/shims/d3d12_vulkan_device.cpp:8932(thread_local std::vector<std::uint8_t> tls_batch_bufs)runtime/shims/d3d12_vulkan_device.cpp:24469(static thread_local std::vector<std::uint8_t> scratch)NVIDIA RTX 5080 sparse GPU address arena fails to initialize (confirming @azsekazvamdimitar's Linux RTX 3090 finding on native Windows):
VkBuffercreated withVK_BUFFER_CREATE_SPARSE_BINDING_BIT | VK_BUFFER_CREATE_SPARSE_RESIDENCY_BITonly exposes non-HOST_VISIBLE(DEVICE_LOCAL-only) memory types invkGetBufferMemoryRequirements().memoryTypeBits.runtime/shims/d3d12_vulkan_device.cpp:22073-22101,sparseis enabled without verifying thatrequirements.memoryTypeBitsincludes akArenaRequiredMemory(HOST_VISIBLE | HOST_COHERENT) type or falling back to the single-allocation non-sparse arena.arena.backing.acquire(0, head, true)fails (GPU address arena: no memory for its first 448 KiB->the GPU address arena could not be created) and leavesarena.size == 0.arena_sparse_gpu(line 184: type != UINT32_MAX+ leaksVkBufferon early exit),vk_heap_alias(line 186: home_info.memoryTypeIndex != UINT32_MAX),vk_title_mirror(line 257),d3d12_page_mirror(Skipped),d3d12_heap_in_place(Skipped),d3d12_texture_tiles,d3d12_xdxr_rt,xbox_bvh_builder,d3d12_dxr_validation,d3d12_dxr_validation_khr,d3d12_placed_dimensions,d3d12_placed_heap_lifetime,d3d12_method_variants,d3d12_heap_properties,d3d12_title_va_game_device,d3d12_geometry_views_game_device, andd3d12_vulkan_device.arena_sparse_gpu_test.cpp:97,vk_heap_alias_test.cpp:100, andvk_title_mirror_test.cpp:114pick physical device 0 directly and ignoreLEONIDA_VK_DEVICE.)Default
DenormFlushToZero 32violates Vulkan validation on NVIDIA (shaderDenormFlushToZeroFloat32 == VK_FALSE):tests/test_absent_lane_gpu.pyon RTX 5080 withLEONIDA_VK_VALIDATION=1emits 2 validation errors on FTZ32-enabled shaders:VUID-VkShaderModuleCreateInfo-pCode-08740(Capability DenormFlushToZerodeclared with no supported float width)VUID-RuntimeSpirv-shaderDenormFlushToZeroFloat32-06300(shaderDenormFlushToZeroFloat32 is VK_FALSE)DenormFlushToZero 32needs to be gated by a device probe (shaderDenormFlushToZeroFloat32) like the other translator fallbacks, or default off when the target GPU does not advertise it.Cross-GPU CTest regressions failing identically on both RTX 5080 and AMD Radeon
gfx1036:d3d12_com(#235): fails atd3d12_com_test.cpp:244(rt::d3d12::last_execute_result(queue.p) == ReplayResult::list_open), which also causesrun_tiny_frame(#452) andrun_tiny_frame_queue_test_settings(#453) to fail--probe exited with code 1.d3d12_present(#364): fails atd3d12_present_test.cpp:524(driver::binary.size() == 2), out of sync with the 4-deepVulkanPresenter::frames_change.vk_presenter_sync(#229): hitsVK_ERROR_DEVICE_LOST from vkWaitForFences (present readback)and fails atvk_presenter_sync_test.cpp:406(presenter.presented() == shown + 3 && presenter.composed_presents() >= 1).NVIDIA RTX 5080
vk_gpu_profile(#211) unsigned 64-bit timestamp underflow:vk_gpu_profile_test.cpp:310(e->ms > 0 && e->ms < 2000):vs spin_verticesreports18446744073709.5469 ms(~2^64wraparound inruntime/src/vulkan_gpu_profile.h:259:(ticks[k] - ticks[k - 1]) & r.mask_whenticks[k] < ticks[k - 1]). Passes cleanly with 0 validation errors on AMD Radeongfx1036. (Note:d1f53516donly added an Apple Paravirtual check invk_gpu_profile_test.cpp, leavingvulkan_gpu_profile.h:259unchanged.)Teardown leaks under
LEONIDA_VK_VALIDATION=1+ minor Windows/Radeon notes:d3d12_existing_heap,d3d12_existing_heap_no_write_watch,d3d12_existing_heap_write_watch, andxbox_list_value_fallbacklogVUID-vkDestroyDevice-device-05137(VkDevice has 87 leaked objects that have not been destroyed) at teardown on both RTX 5080 and AMD Radeongfx1036.gfx1036underLEONIDA_VK_VALIDATION=1,vk_device_markers(#207,vkCmdWriteBufferMarker2AMD) read backstarted=0 finished=0(expected5) with 0 validation errors (passed withLEONIDA_VK_VALIDATION=0), andsubmit_frame(#202) flaked once atsubmit_frame_test.cpp:95(worker_ns[worker_texture_reads] > 0, passed on RTX 5080 and Radeon without validation).tests/test_absent_lane_gpu.py:31-32hardcodesruntime/build/vk_compute_testandruntime/build/vk_ps_sweepwithout.exe, so it skips automatically on Windows unless patched.gfx1036,d3d12_page_mirrorandd3d12_heap_in_placeskipped cleanly due to missingbufferDeviceAddressCaptureReplayon Windows AMDVLK.)Full CTest totals on
232b4a1ee(507 tests, 2 not run / 15–17 skipped): RTX 508025 failed(17 cascading from #2 above + #1, #4, #5), AMD Radeongfx103615 failed(incl. #1, #4, the 3 device-0-hardcoded sparse tests from #2, plus Windows AMDVLK driver/test itemsvk_null_descriptor,d3d12_texture_tiles,pipeline_cache_seed,d3d12_clear,d3d12_mesh*).Imported from ubiquitarianism/leonida. Originally posted by Tauwni on 2026-11-28T14:22:45Z.
Another device class, in case it helps: Apple M3 under Wine on macOS (Wine 11.0 with its MoltenVK 1.4.1, macOS 26.5.1), Windows cross-build of the runtime tests, no game files. This head (
a8b1abe4c) conflicts with today'smaininruntime/README.md, so both sides are onmain7ce011205, the tree this branch merged cleanly onto.main7ce011205d3d12_existing_heapd3d12_title_vad3d12_title_va_shadow(MEASURED, 3 runs each side, same machine and build directory.)
d3d12_existing_heap:vulkan slot-133 written pages line 795: first_difference(got, want) == -1, twice per run. That is step 4 of the written-pages check, which this pull request does not change: 64 bytes written to the first watched page from another thread, then a GPU read. No otherline N:failure is printed.d3d12_title_vaand_shadow:line 276: srv_other == 0, withread-write pages: GPU copy in the arena (shader VA an arena offset); V# read run, 64/64 words matched, 32/64 read the other buffer's (negative control). The test's module now has"vsharp_base_sign_extended": true, so this may be the V# sign extension reaching the neighbouring buffer on this device. That cause is ASSUMED, not traced: I have not checked whether the arena is sparse here.The 41-test Wine suite in the description ran on RADV, where the arena can be sparse; NVIDIA's arena problem above is a different one. Happy to rerun anything on this Mac.
Not checked by a second agent or human yet.
AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by ecox982745 on 2026-11-28T14:44:01Z.
The cross-thread written-pages mismatch reported on Mac/Wine did not reproduce on native Windows 11 build 26300 with an RTX 4090 and NVIDIA driver 616.64.
7ce011205869a8b1abe4c201I built each revision with MSVC in Release and used a local test entry point to run just the four existing
check_written_pageslayouts. The comparison function and production code were unchanged. Each layout checks initial data, a partial rewrite, an unchanged submission, and finally a 64-byte write by a second thread followed by GPU readback. This includes both half-committed layouts and the fully committed write-combined layouts at offsets 0 and 64. Every byte matched, with Vulkan validation enabled and zero diagnostics.This narrows the platform comparison for the written-pages case. The title-VA failures in the Mac report are separate. To distinguish the two failing Mac layouts, the final assertion can print its existing
kindargument and the offset returned byfirst_difference(got, want).Coordination claim. AI-assisted with OpenAI Codex (GPT-6).
Imported from ubiquitarianism/leonida. Originally posted by Tauwni on 2026-11-28T14:55:41Z.
Thanks for the Windows run. Here is the
kindand offset on the Mac (same setup as my comment above; heada8b1abe4conmain7ce011205). I added one diagnostic line before the final assertion ofcheck_written_pages, printingkind,first_difference(got, want)and both bytes; nothing else changed. 3/3 runs, identical output (MEASURED):So only the two half-committed layouts fail; the fully committed ones pass. In both, bytes 0-15 of the other thread's 64-byte write reach the GPU and byte 16 onward does not (
0xd0=0xc0 + 16). Under Wine, not native Windows.AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by ecox982745 on 2026-11-28T15:01:31Z.
The Mac result at byte 16 rules out one explanation. At that offset the preceding, successful GPU readback contained
0x3b(the fixture'spattern_byte(16, 11)). The worker then writes0xd0. The0x00seen on Mac matches neither value. The first-difference report establishes where the mismatch starts. Checking the remaining 47 bytes separately would show how far it extends.I added a test-only diagnostic at head
a8b1abe4c201. It records the previous GPU byte, the CPU byte after the writer joins and before submission, and the new GPU byte after the fence. Two 64-bit masks record every mismatch in the updated region, one bit per byte. On the native Windows RTX 4090 all four layouts gave3b → d0 → d0, both masks zero, with Vulkan validation enabled. Running that diagnostic on Mac would distinguish a discrepancy already visible to the CPU from one first observed on GPU readback.Diagnostic patch for the stock PR test
AI-assisted with OpenAI Codex (GPT-6).
Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-28T15:43:37Z.
Review of #2566 on Windows / NVIDIA (RTX 4070 Laptop 8 GB): crashes before world entry; root cause found (sparse arena memory type)
Verdict: request changes. On this machine the PR does not run: the GPU address arena cannot be created, so every
pipeline and heap creation fails and the title crashes with
0xc0000005at about t = 180 s (3 runs out of 3, twoheads). The cause is a one-line assumption in the new sparse arena (details below), not the shader pack. With a
local 25-line fallback to the one-allocation arena, the PR runs 600 s without a crash, but it does not improve
the world-entry stall compared with raw
mainon this machine (table below). The ctest suite has 23 new failureshere, most of them the same arena problem, plus a real
gta6rt_no_tls_callbacksregression.Head note: tested at
232b4a1ee. The PR has since moved toa8b1abe4c(a merge ofmainplusd1f53516d, CI anddocs fixes). Between the two heads
runtime/shims/is unchanged, so the arena crash, thethread_localfindingsand the game numbers still apply;
d1f53516ddocumentsLEONIDA_BEFORE_EXECUTE_COALESCE(finding 3 is fixed) andchanges
vk_gpu_profile_test.cpp, which I have not re-run.Backend: every run here is the
runtime/loader (gta6rt.exe) with the D3D12 to Vulkan shims, not the separated3d12/runtime. The run script setsLEONIDA_D3D12=vulkan, and each run log says so:[rt] d3d12: Vulkan device: NVIDIA GeForce RTX 4070 Laptop GPU (maxPushConstantsSize: 256 bytes)and[rt] d3d12_xs: D3D12XboxCreateDevice -> proxy ... (Vulkan device ...). The driver version appears ascached calibration of NVIDIA 621.40in thecompile-gateline.AI-assisted review (Claude Code, Claude Opus 5.5). GPU: NVIDIA GeForce RTX 4070 Laptop GPU 8 GB (Resizable BAR),
driver 621.40, Intel Core Ultra 7 155H, Windows 11, MSVC 14.44, Ninja RelWithDebInfo.
What was tested
main=7ce011205, #2566 head =232b4a1ee. Local branchtest/2566-on-main=main+git merge --no-ff 232b4a1ee(merge commit
1d8304f76, not pushed).tools/vk_subgroup_info.py,query():mainaddeddriver_versionto thechosentuple (barycentric fallbackfor old AMD drivers), #2566 added
integer_dot. Resolution: the tuple carries both, in that order(
..., driver, driver_version, integer_dot), and the unpacking takes both.python -I tools/vk_subgroup_info.pythen prints
"integer_dot_product": trueand"barycentric_fallback": falseon this GPU.mainbuild, B = merged build, B' = merged build + a local diagnostic patch (see "Root cause"), not part ofthe PR. Each side had its own build folder and its own copy of
gta6rt.exe/pdb.Root cause of the crash: the sparse arena takes no host-visible memory on NVIDIA
The run log of B, in order (no game content):
Windows' crash record: faulting module "unknown", fault offset ending in
...65ff(same as on the previous headcd8b5632b, 2 runs). The slot-67E_NOTIMPLcomes fromcreate_compute(d3d12_vulkan_device.cpp:18427-18429):!device_.arena_ready()->stream_unsupported(...); graphics PSOs take the same exit (:17577, the "stage 1" line). So every compute PSO, heap and scratch buffer fails, and thetitle eventually uses something it did not get (the exact faulting object is a hypothesis; the cascade is not).
Why the arena fails:
create_arena()picks a sparse arena whenever the device can bind sparse buffers on a sparequeue and every module sign-extends V# bases (
d3d12_vulkan_device.cpp:21983-21995). Each 2 MiB unit is thenallocated with
kArenaRequiredMemory=HOST_VISIBLE | HOST_COHERENTand mapped (hooks.make,d3d12_vulkan_device.cpp:22078-22101). On NVIDIA 621.40, a buffer created withSPARSE_BINDING | SPARSE_RESIDENCYreports
memoryTypeBits = 0x2, a single type that is not host-visible, so the first block cannot be allocatedand the function returns
falsewith no fallback (d3d12_vulkan_device.cpp:22173-22184). The comment atd3d12_vulkan_device.cpp:22044-22045("A sparse arena's memory comes in blocks, which any heap holds") does nothold here.
The PR's own GPU test shows it without the game:
arena_sparse_gpufails atarena_sparse_gpu_test.cpp:184(type != UINT32_MAX): itspick_typefinds no host-visible type in the sparsebuffer's
memoryTypeBitson this GPU.It is not the shader pack: the pack used by both sides declares
vsharp_base_sign_extendedon all 29,279 modules(the log line above), has no
writes_buffer/tsharp_indexkeys (soShaderLibrarykeeps the conservative paths,shader_library.hWritesBufferCensus/TsharpIndexCensus), and the arena is created before any shader matters.A retranslation with the PR's translator would not change the memory types the driver reports.
Check used for B' (local only, 25 lines, not proposed as is): in
create_arena(), before decidingsparse,create a 2 MiB sparse probe buffer and keep the sparse arena only if its
memoryTypeBitscontains akArenaRequiredMemorytype; otherwise one allocation. With it the log readssparse buffers take no host-visible coherent memory (memoryTypeBits 0x2): one allocation, thenpage mirror off: the arena is one allocation, and the run has 0 slot-67 failures and no crash. Note that thisalso turns PageMirror off (it needs the sparse arena), so B' measures the rest of the PR, not PageMirror.
ctest (same exclusion on both sides: the tests that launch
gta6rtagainst the game)main7ce0112051d8304f76xbox_present(also fails onmain)New failures with the merged build, grouped by what the output says:
arena_sparse_gpu(line 184, no host-visible type),vk_heap_alias(line 186,home_info.memoryTypeIndex != UINT32_MAX),vk_title_mirror(line 257, mirror cover),d3d12_title_va_game_deviceandd3d12_geometry_views_game_device(line 1823,arena.size != 0),d3d12_texture_tiles(line 109,CreateHeap),d3d12_placed_dimensions(CreateHeap ... failed (0x80004001)),d3d12_placed_heap_lifetime(CreateHeap),d3d12_heap_properties(line 420, mismatches),d3d12_dxr_validation,d3d12_dxr_validation_khr(BLAS+TLAS execution failed),d3d12_xdxr_rt(ClosereturnsE_INVALIDARG),xbox_bvh_builder(batched builds did not complete),d3d12_vulkan_device(
ExecuteCommandLists failed: invalid copy or resolve),d3d12_com(line 244),d3d12_method_variants.Hypothesis: most of these pass once the arena falls back to one allocation; I did not rebuild the whole test
set with the B' patch.
gta6rt_no_tls_callbacks:gta6rt.exe has the C++ runtime's thread_local callbacks (__dyn_tls_init/__dyn_tls_dtor).This is the trap in AGENTS.md ("No
thread_localwith a destructor ingta6rt.exe"); see the code findings.d3d12_m4_compute_async_small_waitshits the 900 s timeout (2.05 s onmain),vk_gpu_profile(line 310,e->ms > 0 && e->ms < 2000),vk_presenter_sync(line 406),d3d12_present.Not investigated further; the first one may also follow from the arena (hypothesis).
Python, on the merged tree: the PR's 31 new or changed test files (unittest, one file at a time),
tests/test_docs_env_vars.pyand the full translator suitescripts/run_semantic_tests.py tests/semantic(529 files, 6,563 tests, 951 s on 22 jobs): one failing file,
test_valu_cvt_f16_int16_mods(2 subtests,Unsupported not raised), which failsthe same way on
main; everything else passes, including all the PR's new semantic files. The six top-level filesthe PR touches (
test_absent_lane_gpu(2 skipped: no GPU harness),test_desc_cache,test_f64_float_controls,test_image_load_typed,test_make_game_translator_flags,test_vk_subgroup_info) pass.tests/test_translate.pyneeds pytest and was not run.test_docs_env_varsfails on both trees:on
mainforLEONIDA_CLWB_PATCH(from #2559, not this PR); the merge addsLEONIDA_BEFORE_EXECUTE_COALESCE(read at
d3d12_vulkan_device.cpp:21076, documented in no.md).Game A/B (one variable: the build), warm pipeline caches
Same script on every side (
run_2566.ps1: 600 s,LEONIDA_ARENA_MB=1024,LEONIDA_STACKS=345,420, the sameshader pack, NVIDIA cache and input script; full env list at the end), except that each side has its own
persistent pipeline cache (a copy of the shared one). Warm-up runs were repeated per side until a run made no
more than a handful of pipeline-cache misses; one was enough on each side:
hit=0)(The cold runs below were already nearly warm: 1,480 / 1,483 creates with 1 miss each.) One
gta6rtat a time,closed after each run. B (the merged build unpatched) is not in the warm table: it crashes the same way every time.
mainnot done within 250 mslinesgpu-stall/device-stallOUT_OF_DEVICE_MEMORY/ device lost / crashFrame times per phase. The log has no per-present timestamps, only one
[rt] submit phases t=Ns: ... in D s ..., F frames/sline per window of about 5 s. Mean = total time / total frames over the phase (sum of D / sum of F x D),median = median over the windows of 1000 / F. A window with no frame counts as longer than any other, so "> 5 s"
means that most windows of the phase had no frame at all. There are no scene markers in the log, so the phases are
time ranges: t=60-100 is before the world, the world is entered around t=200-300.
mainReading:
at t=60-100). Run to run spread is of the same order (B' warm-up: 79.0 / 38.0 subs/s; A warm-up: 71.6 / 45.0), so
only the t=60-100 gain is consistent over the four warm runs.
submissions/s, under 0.1 fps. B' has no
not done within 250 ms(the CPU-side wait inwrite_staged_title_imageis gone, as the PR intends) but about three times as manygpu-stalllines (57 vs 20)starting earlier: the time moved to the GPU, it did not go away.
refresh; the queue watchers report no GPU progress (
watch_queue_progress, gpu-stall lines). Both are GPU-boundthere.
Cold runs (first builds, shared pipeline cache), kept for reference; B is the merged build unpatched:
main0xc0000005at t ≈ 180 snot done within 250 mslinesgpu-stall/device-stallOUT_OF_DEVICE_MEMORY/ device lostslot 67 ... failed with 0x80004001Cold frame times, same method (mean / median, windows, windows with 0 frames):
mainIn the cold B' run, t=345 showed a title thread in slot 70 (
proxy_create_placed_view_x->write_placed_texture_view,d3d12_vulkan_device.cpp:29168) blocked on astd::mutexwhile the releaser was inrelease_held->drain_held_while_executing->execute_now->refresh_title_textures(
d3d12_vulkan_device.cpp:23307) ->TitleReadPool::run(:24645), and cold A showed the knownwrite_staged_title_image->wait_submitted_locked(vulkan_backend.h:1677) wait. Neither shape came back in thewarm runs, so I do not draw a conclusion from them.
So on this 8 GB NVIDIA laptop: the PR (minus PageMirror) gives a modest gain before the world, does not fix the
world-entry stall, and makes GPU stalls more frequent. PageMirror itself could not be measured here.
Code findings
d3d12_vulkan_device.cpp:21983-21995,22078-22101,22173-22184). Either check the sparse buffer'smemoryTypeBitsagainstkArenaRequiredMemorybefore choosing sparse (the B' check above), or retry
create_arena()non-sparse when the first unit fails.Without one of them, Windows NVIDIA (and any driver that keeps sparse memory device-local only) loses the arena,
every pipeline, and the run.
arena_sparse_gpu_test.cpp:184shouldSKIP(as the runtime would fall back), notfail, on such a device.
thread_localwith destructors ingta6rt.exe(AGENTS.md, Runtime traps), caught bygta6rt_no_tls_callbacks:d3d12_vulkan_device.cpp:4615static thread_local std::vector<std::pair<const DeviceState*, std::uint64_t>> stack;(
write_back_exec_stack()).mainhad a plain aggregate here on purpose, with the comment "A std::vector heremade the title's CRT abort at startup"; the merge removes that comment.
d3d12_vulkan_device.cpp:8286(std::unique_ptr<FilterPageCache>),:8406(std::unique_ptr<std::uint8_t[]>),:8893(std::vector<PageWork>),:8932(std::vector<std::uint8_t>),:24469(std::vector<std::uint8_t>).The runs here did not abort at startup, but the test fails and AGENTS.md documents an
0xC0000409abort beforethe first frame from exactly this. Fixed-size plain-data
thread_locals, members of the worker objects, orper-call scratch would avoid it.
LEONIDA_BEFORE_EXECUTE_COALESCE(d3d12_vulkan_device.cpp:21076) needs a row inruntime/README.md(tests/test_docs_env_vars.py).LEONIDA_VALUE_WAIT_TIMEOUT_MS,LEONIDA_TITLE_EVERY_BUDGET_US,LEONIDA_TEXTURE_REFRESH_ASYNC,LEONIDA_TITLE_TEXTURE_FILL_MS/MB,LEONIDA_TITLE_TEXTURE_PERIOD_MS,LEONIDA_TITLE_TEXTURE_CHECK_KB,LEONIDA_TITLE_VIEW_REFRESH_MS,LEONIDA_TEXTURE_HASH_BUDGET_US,LEONIDA_TEXTURE_SWEEP_BUDGET_US,LEONIDA_ORDER_TEXTURE_UPLOADS. The README rows are gone, good; people's runscripts still set some of them (ours did), so a line in the description listing them would help.
LEONIDA_TITLE_HEAPREADME row (runtime/README.md:419) still says "unset /1makes ...", while the codereads it as on by default,
0off (shims/xmem.cpp:84,:110,:161). Pre-existing onmain, but the PRchanges what the heap is (now in the page mirror's range), so the row is worth fixing here.
hard to bisect. The arena backing + PageMirror part could go first, separately from the translator rules and the
submission/coalescing work, each with its own A/B.
Suggestions
arena at all; if not, PageMirror is off on Windows NVIDIA and the description should say so).
gpu-stall); per-pipeline GPU times withLEONIDA_GPU_PROFILEwould show which work grew.Not done
204 shaders in 193 s on one core). Not needed for the crash, which happens before shaders matter; it would only
affect the B' numbers through the new translator rules.
LEONIDA_ARENA_MB=4095,LEONIDA_SUBMIT_ASYNC=4, ...): not run; both sides used therecipe above.
Env of every run:
LEONIDA_VALUE_WAIT_TIMEOUT_MS=30000 LEONIDA_MAP_READBACK=1 LEONIDA_HOST_IMAGE_COPY=0 LEONIDA_DEVICE_TYPE=6 LEONIDA_SERIAL_BIG_COMPILES=0 LEONIDA_PIPELINE_PREWARM_ORDER=1 LEONIDA_MEM_PROBE=10 LEONIDA_TRACE_XGAMESAVE=1 LEONIDA_TITLE_WATCHDOG=0 LEONIDA_TITLE_WATCHDOG_KICK=<2 addresses> LEONIDA_DEVICE_FAULT=1 LEONIDA_STACKS=345,420 LEONIDA_ASYNC_PIPELINES=1 LEONIDA_REFRESH_MAPPED_TEXTURES=0 LEONIDA_TITLE_EVERY_BUDGET_US=4000 LEONIDA_DEVICE_FAULT_ROOTS=1 LEONIDA_STARTUP_CACHE_CHECKPOINTS=1 LEONIDA_PIPELINE_CACHE_DIR=<shared folder (cold runs) / one copy per side (warm runs)> LEONIDA_TRACE_PIPELINE_COMPILE=1 LEONIDA_COMPUTE_WARMUP=0 LEONIDA_GEOMETRY_MB=6144 LEONIDA_GEOMETRY_HOST=1 LEONIDA_DEBUG_TIME_SHADER=<one shader> LEONIDA_ARENA_MB=1024.LEONIDA_VALUE_WAIT_TIMEOUT_MSandLEONIDA_TITLE_EVERY_BUDGET_USare ignored by the merged build.LEONIDA_PAGE_MIRROR,LEONIDA_GPU_DETILE,LEONIDA_BEFORE_EXECUTE_COALESCEunset (defaults: on).Imported from ubiquitarianism/leonida. Originally posted by Tauwni on 2026-11-28T16:00:00Z.
Your diagnostic patch, applied as is to
a8b1abe4conmain7ce011205, on the Mac under Wine (same setup as above). 3/3 runs, identical output (MEASURED):So the discrepancy is already visible to the CPU: in both half-committed layouts, bytes 16-31 of the page read
00after the writer thread joins and before submission, and the GPU readback matches the CPU exactly. Bytes 0-15 and 32-63 hold the writer's values. The fully committed layouts are right on both sides.AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by DadaCap on 2026-11-28T19:01:51Z.
Review of #2566 on an RTX 5080: A/B against raw main
Tested at head
232b4a1ee. The PR has moved since, toa8b1abe4c, so the newer commits are not covered here.Summary
memoryTypeBits 0x2, which is device-local and has no HOST_VISIBLE | HOST_COHERENT type. Every pipeline is then refused (2,690DeserializeComputePipelineStateXcalls fail with0x80004001), and the title stays on its first loading image. This happened in 3 runs out of 3 on our RTX 5080, and OreoFR saw the same on an RTX 4070.pipeline_cache.session.binonly on a clean exit (d3d12_compile_exit.h), so a crash or force-quit loses every graphics pipeline built in that session. Over two hard-killed warm-ups, main's file stayed at 62.7 MB.Setup
d48a957bb. Itsruntime/and translator are identical to20a4e5d89: the 10 commits between them touch neither.20a4e5d89plus #2566 at232b4a1ee, with the local NVIDIA fallback below.LEONIDA_ASYNC_PIPELINES=1,LEONIDA_SUBMIT_ASYNC=4,LEONIDA_GPU_DETILE=1,LEONIDA_MAP_READBACK=1,LEONIDA_RT_AS=off,LEONIDA_ARENA_MB=4095, and the same scripted inputs.MsBetweenPresents,MsCPUBusy,MsGPUTime).Results (mean over the warm runs, range in brackets)
Raw main's first run lost the device at 124 s. It counts in the first two phases, which pulls main's first-minute minimum down to 13.9 FPS, and it's missing from the "after 120 s" phase, where main has 3 runs.
First minute (title and loading)
60 to 120 s
After 120 s (GPU-bound on both builds)
Usage per phase (one sampled run per side, 2 s samples)
The game's CPU share is measured against all 24 logical CPUs.
The first two minutes are not GPU-bound on either build (8-15 % GPU), so their frame rate is set by the CPU side and by waits. After 120 s the GPU is saturated on both.
Stability and pipelines
The NVIDIA fix (suggested change, tested locally)
The sparse arena binds each 2 MiB block with
kArenaRequiredMemory(HOST_VISIBLE | HOST_COHERENT) and maps it. When the sparse buffer allows no such type, no block can be bound, andcreate_arenafails. Ind3d12_vulkan_device.cpp, aftercreate_buffer(), we now check the real buffer'smemoryTypeBits. If no mappable type is allowed, we destroy the buffer and recreate it without the sparse flags, keeping the single-allocation arena that raw main uses. That costs 44 lines in 3 files.runtime/src/arena_size.h: a newsparse_arena_mappable(memory, type_bits), built onmemory_type_order.runtime/shims/d3d12_vulkan_device.cpp:sparseandlimitslose theirconst, and the check above is added, logging:GPU address arena: one allocation, not sparse: the device's sparse buffer allows no HOST_VISIBLE | HOST_COHERENT memory type (memoryTypeBits 0x...).runtime/test/arena_size_test.cpp: a newsparse_mappablecase covering device-local only (the NVIDIA case), host-visible, Resizable BAR, and no type.AMD keeps sparse mode. Running PageMirror on NVIDIA would need a staging path for blocks that can't be mapped, which is a larger change for Aslan to decide on.
Other notes
AI-assisted (Claude Code, Claude Opus 5.5), for DadaCap. Tested on an NVIDIA GeForce RTX 5080 (driver 621.24), Windows 11 Pro 10.0.26200.
Imported from ubiquitarianism/leonida. Originally posted by Maticcm on 2026-11-28T20:38:37Z.
Independent Ampere check for #2566, native Windows. I compared the exact PR head
a8b1abe4c2016a7ecd5a9cedd4a0227fd7a6230ewith its upstream merge parent0318164b8514490b2d6f9b6b1c230c4c01276066. Both builds used RelWithDebInfo, MSVC 19.50.35717, Vulkan SDK 1.4.363.1 and Khronos validation. GPU: RTX 3080 desktop, 10 GiB, driver 630.20, Windows 11 build 26340.d3d12_meshd3d12_vulkan_deviceCreateHeapassertiond3d12_buffer_tilesarena_sparse_gputype != UINT32_MAX)The arena fixture also reports
VUID-vkDestroyDevice-device-05137on the failing path as it destroys the device with a live buffer. The exact-head observations establish the sparse-memory compatibility problem on this Ampere configuration. The mesh fixture still rendered successfully. This was synthetic coverage, with no title run, performance measurement, or fallback patch applied.AI-assisted (Codex).
Imported from ubiquitarianism/leonida. Originally posted by Maticcm on 2026-11-28T21:23:45Z.
Windows AMD integrated GPU complement to the RTX 3080 report above. Same exact #2566 binaries at
a8b1abe4c2016a7ecd5a9cedd4a0227fd7a6230eand baseline0318164b8514490b2d6f9b6b1c230c4c01276066. AMD Radeon integrated graphics on Ryzen 9 9950X3D, AMD driver 26.11.2, Windows 11 build 26340, Khronos validation enabled. Two runs per revision, with matching outcomes.d3d12_vulkan_deviceandd3d12_buffer_tilespassed on both revisions. The tiled-buffer fixture matched all 12 tiles on the head. This differs from the RTX 3080 run, where the device test failed and tiled-buffer coverage skipped.d3d12_meshfailed at the same mixed-pipeline statistics assertion on both AMD revisions (line 774, unexpected invocations or primitives in a stage expected to report zero).arena_sparse_gpustill failed the compatible host-visible/coherent memory type assertion and reached the same live-buffer destruction VUID. The shared device and tiled-buffer fixtures did not exhibit the NVIDIA initialization failure here.Synthetic fixtures only. AI-assisted (Codex).
Imported from ubiquitarianism/leonida. Originally posted by ecox982745 on 2026-11-28T22:03:20Z.
The new head restores standalone heap creation and tiled-buffer readback on a desktop RTX 4090. I ran the same three synthetic CTests on native Windows with MSVC Release and NVIDIA 616.64, first with default settings and then with Khronos validation 1.4.369. The outcomes matched in both runs.
a8b1abe4c2eccc71b324d3d12_vulkan_deviced3d12_buffer_tilesarena_sparse_gpuVUID-vkDestroyDevice-device-05137).On the new head the runtime reported
memoryTypeBits=0x2for the sparse buffer and selected a single allocation. The device and tile tests exercised that fallback. The dedicated sparse fixture skipped before attempting sparse binding, so this run establishes fallback coverage on Ada. The new-head validation run emitted zero validation errors. No title or frame-rate measurement was involved.Coordination claim. AI-assisted verification with OpenAI Codex (GPT-6).
Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-11-28T22:13:05Z.
Pushed new changes, please retest on NVIDIA
Imported from ubiquitarianism/leonida. Originally posted by ecox982745 on 2026-11-28T22:33:32Z.
I retested the queue and presenter changes on a desktop RTX 4090, driver 616.64, in response to the NVIDIA retest request. The asynchronous compute wait now completes. The stock M4 shader fixtures still fail Vulkan validation on this card.
Native Windows, MSVC Release, Khronos validation 1.4.369, synthetic tests. I compared
eccc71b324directly with its parent660872215a.vk_presenter_syncpresenter.presented() == shown + 1after destroying the queuevk_presenter_sparse_captured3d12_m4_compute, stock shadersd3d12_m4_compute_async_small_waits, stock shadersRemaining fixture issue. The head's device probe reports
denorm_flush_to_zero_f32=false. The CMake fixture builder still emitsDenormFlushToZero 32for bothcs_m4_fillandcs_m4_indirect, triggeringVUID-VkShaderModuleCreateInfo-pCode-08740andVUID-RuntimeSpirv-shaderDenormFlushToZeroFloat32-06300.I rebuilt only those two synthetic shader modules with
--no-ftz32and reran the same test binaries with validation enabled. On the parent, ordinary M4 passed and the asynchronous case still timed out at 30 s. On the head, both passed 3/3. Each of the six runs read back all 1,924 expected words with zero validation errors. The synthetic FSSM inputs were byte-identical. Havingruntime/test/shaders/build.pyuse the FTZ32 capability decision already used bymake_game.pywould let the stock fixture exercise the fixed wait on this driver.Coordination claim. AI-assisted verification with OpenAI Codex (GPT-6).
Imported from ubiquitarianism/leonida. Originally posted by ecox982745 on 2026-11-29T00:07:14Z.
The attached patch fixes the stock M4 shader fixtures on the RTX 4090. It applies directly to
eccc71b324withgit am. The fixture builder now passes--no-ftz32when the selected GPU explicitly reports that it lacks float32 flush-to-zero. A supported or unknown capability keeps the translator default. The builder reuses one probe for this choice and the existing barycentric fallback.I rebuilt
d3d12_m4_compute_testfrom scratch on native Windows with MSVC Release, NVIDIA driver 616.64 and Khronos validation 1.4.369. Both stock CTests used the shaders generated by CMake.d3d12_m4_computed3d12_m4_compute_async_small_waitsEvery run matched all 1,924 GPU output words against the CPU reference, with zero Vulkan validation errors. Both generated shaders passed
spirv-val --target-env vulkan1.2. Before the patch, each stock test produced four validation errors on this same PR head. Earlier controlled comparisonThe shader-builder and translator-flag suites passed 7/7 and 42/42, respectively. The patch also isolates the translator tests from the host GPU and checks that an unavailable capability probe preserves the recorded FTZ choice. AI-assisted with OpenAI Codex (GPT-6).
Apply the three-file patch to the PR branch
Copy the following block to a file and run
git am shader-fixtures.patch.Imported from ubiquitarianism/leonida. Originally posted by Tauwni on 2026-11-29T05:11:55Z.
AMD RDNA4 complement:
vk_heap_alias(new in this PR) fails on a discrete AMD card, and an A/B narrows it to the queue the unbind runs on.Radeon RX 9060 XT (RDNA4, 16 GB, desktop), driver 32.0.23033.1002 (Vulkan driverInfo 26.3.1, API 1.4.344), Windows 10 Pro 22H2 19045.7846, MSVC 14.44 RelWithDebInfo. PR head
eccc71b32tested as is: it does not merge intomainb6bf3aa0b(conflicts intools/rdna2spirv.py,tools/lane_masks.py,runtime/shims/d3d12_vulkan_device.cpp,runtime/test/vk_harness.cpp,docs/design.md,tests/semantic/test_wave32_lane_select.py).ctest at the head vs
main. MEASURED, full run, then failures rerun alone 3 times. Head: 12 failures out of 505;main: 11 out of 497. Only one is new and reproducible:vk_heap_alias, 3/3,line 311: got[per_page + i] == 0. The other 8 reproducible ones fail identically onmainhere (Windows 10's in-box D3D12/WARP and known AMD driver cases).dxgi_waitable_latency,d3d12_compile_teardown_one_workerandtitle_texture_watchfailed only under-j 6and passed 3/3 alone.What the failing check reads. MEASURED, 3 runs, with a temporary print, not pushed. After
bind(mirror, kTitle, VK_NULL_HANDLE), all 16384 words of the "unbound" mirror page still hold the home's words, not zero. The arena view of the same page is correct, and the earlier never-bound guard page does read zero. The device reportsresidencyNonResidentStrict = true, so the test does not skip.One variable: the queue the sparse binds run on. Same binary, toggled by environment variables in a local debug build. MEASURED, 3 runs each:
vkQueueSubmit+vkQueueWaitIdleon the bind queue after the unbind: still fails 3/3.So on this driver, an unbind (
memory = VK_NULL_HANDLE) done on one queue is not seen by copies on another queue, even aftervkQueueWaitIdleon the bind queue. Binding real memory on the other queue is seen; the first half of the test passes. As far as I read the spec, a host wait should be enough, so this looks like an AMD Windows driver issue. ASSUMED: no RADV or second AMD card here to confirm.Why it may matter beyond the test. READ IN CODE, not measured:
ArenaBacking::reclaim(runtime/src/arena_backing.haround 243-260) unbinds released units on the dedicated bind queue thatpick_arena_bind_queuepicks, then frees their memory. If the driver keeps the old mapping visible to the work queues, a reclaimed range may keep reading the freed allocation instead of zero. ASSUMED.Possible ways out. Not tried in the runtime:
VK_NULL_HANDLE.vk_heap_aliasskip or downgrade the mirror-unbind check on AMD Windows until a driver fix.Happy to run any variant on this card.
Not checked by a second agent or human yet. AI-assisted: yes (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by bobcatchris on 2026-11-29T06:02:50Z.
Native Windows 11 + AMD Radeon RX 7900 XTX 24 GB A/B comparison (
main791899f65vs PR#2566eccc71b32), using the identical native wave64 shader pack, copied precompiled<2 MiBcompute journal, and recipe (first-run UI/menu, unattended 90 s steady-state runs).Summary (warm-to-warm,
t >= 30 s)VK_ERROR_DEVICE_LOST, 0 unmet held operations on both A and B.60.09 /s(main) →30.07 /s(#2566) (−50%; direct queue1,504→606submissions per 10 s).heapscost:4.65 ms/sub(~9.30 ms/frame) →3.79 ms/sub(~3.79 ms/frame) (>2.4× reduction per frame).6.5%→5.5%, max submit-to-done latency5.8 ms→2.1 ms(1.8 mscold).4,982 MiB(main) →5,157 MiB(#2566,+175 MiB).Imported from ubiquitarianism/leonida. Originally posted by qhukz13 on 2026-11-29T10:42:17Z.
NVIDIA: why the stack likely does not engage
READ IN CODE at the PR head, nothing run yet. GTX 1050 Ti numbers will follow.
create_page_mirror(runtime/shims/d3d12_vulkan_device.cpp:6169-6181) turns it off when no host-visible memory type can back a sparse buffer, or when the arena is one allocation. The arena code in this PR (aroundd3d12_vulkan_device.cpp:22049) notes that NVIDIA Vulkan restricts sparse buffers to DEVICE_LOCAL-only types, and then falls back to "one allocation, not sparse". INFERENCE: on NVIDIA the mirror is off with "the arena is one allocation".vulkan_title_detile.h:4-10,d3d12_title_image_upload.h:116-131), so it goes off with it. So does the in-place heap filtering.shaderDenormFlushToZeroFloat32 = false, so the pack is built with--no-ftz32;vulkan_memory.h:25): not on Pascal;pick_arena_bind_queuetakes a spare queue of a family with sparse binding.To confirm on any NVIDIA card: the
[rt] d3d12: page mirror off: ...line in stderr.A capability-gated adaptation, nothing keyed on vendor: when no host-visible type can back a sparse buffer, mirror homes go to DEVICE_LOCAL units and dirty pages are copied in from a staging ring before each submission. The existing write-back copy covers the other direction. AMD keeps host-visible homes, so its path and shader pack are unchanged.
AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-11-29T14:42:31Z.
Independent Vulkan readback for the dynamic typed-buffer fix now in #2566. I compared
91b7d7372with its first parenteccc71b32using the same nativevk_compute_testbinary, with only the translator swapped. This is a check of the decoder on the integration branch.The stock
cs_w64x_dynamic_r32_uintfixture returned0x8a600250in all 64 output words on both revisions on an RTX 4070 SUPER (NVIDIA 620.73.04) and an AMD Raphael iGPU (RADV Mesa 26.3.1-arch3.5) under Linux. The zero readback reported on the RTX 5070 Ti on Windows did not reproduce on these Linux drivers.I also ran one hand-written
buffer_load_format_xyzwprogram with a descriptor loaded from the test heap and a different input record per invocation. R32_UINT, R32_SINT, 2/3/4-channel 32-bit UINT and R10G10B10A2_UINT each ran with XYZW, WZYX and X/0/W/1 selectors. I checked the channel-repeat rule, literal selectors, full-width integer bits, and the untouched heap bytes. Every configuration matched the CPU reference on both revisions. Each A/B dump pair was byte-identical.112 dispatches with Khronos validation, zero errors. I used
--pc-tail-ubo --no-ftz32for both revisions and verified both modules withspirv-val --target-env vulkan1.2. The unadjusted NVIDIA run returned the correct stock words and raised the already reported FTZ32 validation issue. The translated SPIR-V changes between revisions.test_buffer_load_format.pyplustest_buffer_format_d16_hi.pypassed 37/37 at the head.AI-assisted, offline, synthetic inputs.
Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-11-29T15:44:25Z.
Pushed
1589d2a5atointegration/perf-cpu-gpu-r6— merged latest upstreammain(ddfe24fba), addressed the NVIDIA and AMD Windows hardware review findings, and brought in the Vulkan rendering-correctness & translator fixes built on top of this stack.What's in this update
main(ddfe24fba) + preserved PR #1 (3b9060496dynamicR32_UINTloads by @sodove, verified by @merzleckeier):tools/rdna2spirv.py,tools/lane_masks.py,runtime/shims/d3d12_vulkan_device.cpp,runtime/test/vk_harness.cpp,docs/design.md,tests/semantic/test_wave32_lane_select.py,runtime/test/xs_proxy_mock_test.cpp,tests/semantic/test_valu_cvt_f16_int16_mods.py).pipeline_workers_test/vk_bindless_dimensions_test), PR #2470 (batchedShadowPages::write_back), PR #2498 (local_mirror_tablemapped guard), PR #2516 (console_texture_layouttitle_layout), PR #2492 (ExecuteIndirect(DISPATCH_MESH)parity), PR #2508 (present_compose), PR #1783 (queue_holds), PR #850 (lower_addr64), PR #2575 (bundleExecuteIndirect(DISPATCH)), PR #1910, PR #2043, and PR #2046.--no-ftz32shader fixture fix (6ebdee197, thanks @ecox982745):runtime/test/shaders/build.py,tests/test_make_game_translator_flags.py, andtests/test_shader_build_fallbacks.py(preserving upstreamf16_interp_fallback()). Ready for retest on RTX 4090 / 5080 with Khronos validation enabled.3ef235a68, thanks @Tauwni):VK_DRIVER_ID_AMD_PROPRIETARY(override viaLEONIDA_SPARSE_UNBIND_ZERO_PAGE=1/0, documented inruntime/README.md),ArenaBacking::reclaim()andTitleMirrorunbind/unalias paths rebind released sparse ranges to a single shared 64 KiB zero-filled page instead ofVK_NULL_HANDLE(falling back cleanly toVK_NULL_HANDLEif!sparseResidencyAliased), keepingVK_NULL_HANDLEon RADV/NVIDIA/Intel.vk_heap_alias_test,arena_sparse_gpu_test,vk_title_mirror_test,arena_backing_test, andtitle_mirror_hooks_test(with VulkanapiVersionguards before chaining 1.2/1.3 structs). Ready for retest on RX 9060 XT Windows.8f46352fb..cd5ee1107):runtime/): Read-only DSV HTILE layout & nativeD16_UNORM[_S8_UINT]+R16_UNORMshadow aliasing; PSO read-only DSVs, Blob ACB_TARGET_MASK (+0xcc), depth bias,OMSetDepthBoundsreplay, and runtime VS/MS→PS varying linking;VK_EXT_shader_image_atomic_int64R64uibinding 29 & buffer UAVR32_UINT; 16-byteD3D12_DESCRIPTOR_HEAP_TYPE_SAMPLERdescriptor stride; forwarded Xbox list slots (DispatchMesh129,CopyResourceX86,CopyMemoryToMemoryX62/60, queries 28–30,SyncTopOfPipeX/SyncBottomOfPipeX131/132 [older 129/130]);OMSetSampleMaskX(slot 142) with runtime SPIR-V quad mask + on-demand masked twin PSO (LEONIDA_SAMPLE_MASK=0opt-out); partial-mip streaming (LEONIDA_TITLE_PARTIAL_MIPSdefault ON) withVK_EXT_image_view_min_lodclamping,active_span,pending_streamdword 6console-heap refill (tsharp_index_words=true),gpu_ownedincompatible-base eviction & partial-copy pre-fill; andLEONIDA_COPY_CLIPtexture-to-texture destination-mip clipping.tools/rdna2spirv.py,tools/fssm_header.py): integerSV_Targetunpatching; wave32s_mov_b64 vcctuples, partialimage_storeRMW, and 64-bit 2Dimage_atomicon binding 29; intra-workgroup barrier+write promotion toVulkanMemoryModel+NonPrivatePointer/NonPrivateTexel+0x6948(ordered beforelower_addr64);SQ_RSRC_BUF.TYPE == 0guard; unconditional CS & MS OOB LDS bounds; PSDB_SHADER_CONTROLbit 12EarlyFragmentTests; mesh epilogue uninitialized-primitive culling; and PS quad-localds_swizzleviaOpGroupNonUniformQuad*.Verification
1002:164e, RADV Mesa 26.3, Khronos Validation Layers) for all unit/ctest/Wine GPU tests; AMD Radeon RX 7900 XTX (1002:744c, RADV Mesa 26.3) for live Wine runs.python3 -I scripts/check_no_game_data.py: exit 0python3 -m compileall -q make_game.py tools tests runtime/test/shaders/build.py: exit 0python3 -m unittest discover -s tests/semantic: 6,675/6,675 passed (3 skipped, 1 expected failure)tests/test_make_game_translator_flags.py(42/42),tests/test_shader_build_fallbacks.py(11/11),tests/test_fssm_header.py(47/47),tests/test_docs_env_vars.py(5/5): all PASSMESA_VK_DEVICE_SELECT='1002:164e!'):ctest --test-dir runtime/build --output-on-failure: 146/146 passed (2 skipped:shader_library_corpus,vk_sync_validation;pipeline_workersPASS)LEONIDA_VK_VALIDATION=1onarena,heap_alias,mirror,d3d12_m4,vk_sample_mask,sample_mask_fragment,vk_command_replay,replay_copy_memory,replay_state_cache,replay_pipeline_compiles— all PASS with 0 VVL errors (includingLEONIDA_SPARSE_UNBIND_ZERO_PAGE=1onarena_sparse_gpu,vk_heap_alias,vk_title_mirror).clang-cl23 + xwin) & Wine (prefix-igpu,VK_LAYER_KHRONOS_validation):xs_proxy_mock_test.exe,d3d12_sample_mask_test.exe,d3d12_existing_heap_test.exe --partial-mips&--gpu-copied-textures,d3d12_tsharp_refill_test.exe,d3d12_xs_placed_depth_test.exe(46/46),d3d12_indirect_dispatch_count_test.exe --bundle: all PASS, 0 runtime VVL errors.@ecox982745 and @Tauwni — when you have a chance, would love a retest on RTX 4090 (
--no-ftz32fixtures) and RX 9060 XT Windows (vk_heap_alias/ sparse zero-page unbind)!AI-assisted (Antigravity — Gemini 4 Neon & Claude Opus 5.5 review).
Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-11-29T16:12:00Z.
Review: COMMENTED
Tested PR #2566 at exact head
1589d2a5acon native Windows 11 + MSVC (19.44) + NVIDIA RTX 5070 (Vulkan validation enabled). The NVIDIA GPU runtime paths (--no-ftz32auto-detection, sparse-arena single-allocation fallback, sync validation, sample mask, tiles, existing heap, M4 compute, T# refill, absent-lane GPU) are solid, but there are 3 native Windows/MSVC regressions to fix during the rebase before merging:Findings (native Windows / MSVC)
Blocking -- MSVC
LNK2019on exact head1589d2a5ac(gta6rt.exeand all D3D12 targets fail to link):runtime/shims/d3d12_xs_device.cpp:3542declaresvoid dispatch_sample_mask(ID3D12GraphicsCommandList*, std::uint64_t);inside block scope ofcut_list(), whereas the definition at line3760is inrt::d3d12_xs::(anonymous namespace).cl.exe, the block-scope declaration resolves to global::dispatch_sample_mask, failing link ofgta6rt.exe,xs_proxy_mock_test.exe, and every test linkinggta6rt_d3d12_com.lib(LNK2019: unresolved external symbol "void __cdecl dispatch_sample_mask(...)").cut_list()to anonymous-namespace scope above line3495.Blocking -- Win32
CopyMemorymacro collision breaksd3d12_state_map_teston Windows MSVC (and creates a cross-TU ODR hazard):runtime/src/command_list.h:524addsstruct CopyMemoryinnamespace leonida.<windows.h>defines#define CopyMemory RtlCopyMemory. Inruntime/test/d3d12_state_map_test.cpp(wherevulkan_replay.hincludescommand_list.hbefore<windows.h>is pulled in),runtime/src/vulkan_replay.h:4515(std::get_if<CopyMemory>) and6706(std::holds_alternative<CopyMemory>) expand toRtlCopyMemory, failing MSVC compilation witherror C3861: 'RtlCopyMemory': identifier not found.<windows.h>beforecommand_list.h, the struct is silently macro-renamed toleonida::RtlCopyMemorywhile other TUs defineleonida::CopyMemory.struct CopyMemory(e.g.CopyMemoryToMemoryorCopyMemoryCmd) acrosscommand_list.handvulkan_replay.h.Blocking (Windows test regression) --
d3d12_vulkan_devicefails host-D3D12 copy comparison (12 of 75 cases differ from the host) under default-onLEONIDA_COPY_CLIP(091bfa8d4d):runtime/test/d3d12_vulkan_device_test.cpp:5559fails because the host D3D12 runtime refuses the 12 oversized-copy cases (Close failed 0x80070057), while the layer clips and accepts them under defaultLEONIDA_COPY_CLIP=1.d3d12_vulkan_device_testwithLEONIDA_COPY_CLIP=0passes completely (copy comparison: 0 of 75 cases differ from the host,Resolve comparison: 15/15 matched,0 mismatches, 0 VVL errors).leonida::detail::copy_clip_override()to0aroundcopycmp::compare_copies(...)ind3d12_vulkan_device_test.cpp(so host-D3D12 parity stays covered whiled3d12_state_map_testtestsLEONIDA_COPY_CLIP=1), or updated3d12_copy_compare.hfor clipped copies.Non-blocking Notes
scripts/run_gpu_tests.pymissed--no-ftz32auto-detection from6ebdee1978:make_game.pyandruntime/test/shaders/build.pyboth detectdenorm_flush_to_zero_f32: falseand pass--no-ftz32(confirmed working on RTX 5070 -- all D3D12 shader fixture CTests pass with 0 VVL errors), whereasscripts/run_gpu_tests.pystill emitsDenormFlushToZerofor f32, triggeringVUID-VkShaderModuleCreateInfo-pCode-08740+VUID-RuntimeSpirv-shaderDenormFlushToZeroFloat32-06300underLEONIDA_VK_VALIDATION=1(andps_mul_legacy_denorm*mismatches on NVIDIA).main(git merge-tree --write-tree): 5 files (runtime/shims/d3d12_com.cpp,runtime/shims/d3d12_vulkan_device.cpp,runtime/src/command_list.h,runtime/src/vulkan_replay.h,runtime/test/gfx10_descriptors_test.cpp).Verification on NVIDIA RTX 5070 (synthetic fixtures + translator tests; no title run)
tools/vk_subgroup_info.py:subgroup_size: 32,denorm_flush_to_zero_f32: false,per_vertex_inputs: true,barycentric_fallback: false,max_push_constants_size: 256,integer_dot_product: true.LEONIDA_VK_VALIDATION=1):gta6rt.exe+ 29 test targets built and linked cleanly (all exceptd3d12_state_map_testdue to #2).d3d12_m4_compute,d3d12_m4_compute_async_small_waits(confirms6ebdee1978--no-ftz32on RTX 5070),d3d12_buffer_tiles,d3d12_texture_tiles,d3d12_existing_heap,d3d12_existing_heap_no_write_watch,d3d12_existing_heap_write_watch,d3d12_indirect_dispatch_count,d3d12_bundle_indirect_dispatch,d3d12_sample_mask,sample_mask_fragment,vk_sample_mask,d3d12_tsharp_refill,d3d12_unbound_tsharp_rules,d3d12_xs_placed_depth,xs_proxy_mock,d3d12_mesh,d3d12_draw,d3d12_compute,vk_presenter_sync,vk_presenter_sparse_capture,vk_presenter_capture_colour,vk_command_replay,vk_bindless_dimensions,pipeline_workers,arena_backing,arena_size,title_mirror_hooks.arena_sparse_gpu,vk_heap_alias,vk_title_mirror(exit 77; RTX 5070 sparse buffers expose device-local memory only, andd3d12_vulkan_devicecleanly logspage mirror off: no aliased strict sparse buffers/the arena is one allocationwith 0 crashes or VUIDs).d3d12_vulkan_device(finding #3; passes completely withLEONIDA_COPY_CLIP=0).LEONIDA_VK_VALIDATION=1 VK_VALIDATE_SYNC=1): 7/7 passed (vk_presenter_sync,d3d12_indirect_dispatch_count,d3d12_bundle_indirect_dispatch,d3d12_m4_compute,d3d12_m4_compute_async_small_waits,d3d12_sample_mask,d3d12_tsharp_refill).tests/test_absent_lane_gpu.py): 2/2 passed (test_partial_quad_1x1_pixel_wave32_and_wave64,test_partial_wave_compute_5_threads).scripts/check_no_game_data.pyPASS,compileallPASS,test_make_game_translator_flags.py42/42,test_shader_build_fallbacks.py11/11,test_fssm_header.py47/47,test_docs_env_vars.py5/5,test_absent_lane_ub.py18/18, plus r9b semantic tests (test_lds_unconditional_bounds3/3,test_ps_early_depth5/5,test_ps_quad_swizzle3/3,test_ms_prim_export6/6,test_mesh_cull_store2/2).GPUs tested: NVIDIA GeForce RTX 5070 12 GB (Windows 11, driver 610.88, Vulkan 1.4.341,
VK_LAYER_KHRONOS_validation 1.4.363).AI-assisted (Antigravity, Gemini).
Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-11-29T17:05:22Z.
Pushed
eff40832etointegration/perf-cpu-gpu-r6— addressed all 4 findings from @lixonik's Windows 11 / MSVC / RTX 5070 review, fixed a live-measured WC-BAR VRAM scan regression during streamed texture publish, and merged latest upstreammain(0bc6e21a1).Changes in this update
f051ae518, thanks @lixonik):LNK2019(runtime/shims/d3d12_xs_device.cpp): Hoisted thedispatch_sample_maskforward declaration out of block scope incut_list()to anonymous-namespace scope matching its definition.CopyMemorymacro collision (runtime/src/command_list.h,runtime/src/vulkan_replay.h,runtime/test/replay_copy_memory_test.cpp): Renamedleonida::CopyMemorytoleonida::CopyMemoryCmdso<windows.h>#define CopyMemory RtlCopyMemorynever collides across TUs.d3d12_vulkan_device_testhost-D3D12 parity (runtime/test/d3d12_vulkan_device_test.cpp): Added an RAIICopyClipGuardsettingleonida::detail::copy_clip_override()to0aroundcopycmp::compare_copies(...)(restoring prior value on scope exit), keepingd3d12_state_map_testcoveringLEONIDA_COPY_CLIP=1.scripts/run_gpu_tests.py--no-ftz32auto-detection: Addeddenorm_flush_to_zero_f32: falseprobing viatools/vk_subgroup_info.py(matchingmake_game.pyandruntime/test/shaders/build.py) plus--no-ftz32CLI override and unit tests intests/test_run_gpu_tests.py.ac93aac0d):in_known_heaponImageKeyEntry/PendingImageKeysowrite_tsharp_index_words()only scans layer-owned heaps (visible_heaps/cpu_view_heaps) while console-heap streamed textures wake vianote_texture_change, eliminating a multi-second WC-BAR read stall during menu/world streaming (publish:67.1 ms/pass/3414 ms max->0.004 ms/pass).main(0bc6e21a1->eff40832e):d3d12_com.cpp,d3d12_vulkan_device.cpp,command_list.h,vulkan_replay.h,gfx10_descriptors_test.cpp), preserving upstream'sSamplePositions/custom_samples(1u << 11) alongsidesample_masked(1u << 10),CopyMemoryCmd, scope coalescing,in_known_heap, and sparse zero-page unbind.Verification
1002:164e, RADV Mesa 26.3, Khronos Validation Layers) for all Linux/Wine tests.check_no_game_data.pyexit 0,compileallexit 0,tests/semantic6,675/6,675 OK,test_run_gpu_tests.py78/78,test_make_game_translator_flags.py42/42,test_shader_build_fallbacks.py11/11,test_fssm_header.py47/47,test_docs_env_vars.py5/5.ctest148/148 passed (2 skipped:shader_library_corpus,vk_sync_validation).clang-cl+ xwin) & Wine (prefix-igpu, VVL):gta6rt.exe,d3d12_state_map_test.exe,d3d12_vulkan_device_test.exe,xs_proxy_mock_test.exebuilt & linked cleanly;d3d12_state_map_test.exe,xs_proxy_mock_test.exe, andd3d12_tsharp_refill_test.exePASS under Wine + Khronos VVL.@lixonik — ready for another quick check on native Windows MSVC / RTX 5070 whenever convenient!
AI-assisted (Antigravity — Gemini 4 Neon).
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-11-29T17:30:49Z.
Independent retest of
eff40832emerged locally into currentmain4364a4fa6(clean merge). CachyOS, RTX 4070 SUPER / NVIDIA 620.73.04 and AMD Raphael / RADV Mesa 26.3.1. Windows targets were built with clang-cl and xwin and run under Wine 11.22. All inputs were synthetic.cs_store.asmThe M4 fixtures were generated by CMake with the NVIDIA ICD selected. Both passed
spirv-val --target-env vulkan1.2and neither M4 case emitted the earlier FTZ32 validation messages. The three Python suites for the GPU runner, translator flags and shader-build fallbacks passed 131/131.Tile fixture and Wine validation. All 12 Vulkan tiles matched on both GPUs. The Linux Vulkan loader inserted Khronos validation 1.4.363 under Wine, and CTest marked the tile case red for
VUID-vkCreateDevice-ppEnabledExtensionNames-01387(VK_EXT_external_memory_dma_bufmissingVK_KHR_external_memory_fd). The identical VUID occurs in the tile test on baremainon both GPUs. Direct runs without forced host validation exited 0 on main and the PR. AMD also matched all three host-D3D12 readbacks through VKD3D-Proton. That comparison was unavailable on NVIDIA because headless DXVK could not initialize.One flaky mock assertion.
xs_proxy_mockfailed once atxs_proxy_mock_test.cpp:4707, immediately after seeingreleased_cycle == 1. The next five isolated runs passed, and all five baseline controls passed. The counter is updated innote_releasedbefore the deferredsignal_gate_fencecall, so the test can observe the counter before the mock fence advances.This covers selected Linux and Wine tests. Native Windows and in-game frame time were outside this run. AI-assisted with OpenAI Codex (GPT-6).
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-11-29T17:36:00Z.
Follow-up on the
xs_proxy_mock_test.cpp:4707failure from the retest above. I reproduced the assertion deterministically oneff40832ewith a test-only rendezvous in the mock fence. It defers the targetSignaluntil the test thread first samples the fence afterreleased_cycle == 1. That sample consistently returnsb_gate_before + 1, and the mock then delivers the deferred signal. No runtime code changes were needed for the experiment.xs_proxy_mockexecutableThe pump counts its decision before the releaser calls
signal_gate_fence. The test can wait for both observations within its existing deadline and retain thecell2(6) == 0check before explicitly completing the writer. This replacement for the current polling loop and two assertions passed the controls above:Retested the integrated
de1694c31combined withmainat4364a4fa6under Wine 11.22. With the same controlled mock, all three delayed signals now pass. All three omitted signals still fail the one-second deadline. The upstream mock test also passed once without the scheduling probe.Synthetic CPU fixture, no game data. AI-assisted with OpenAI Codex (GPT-6).
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-11-29T17:43:26Z.
Presenter follow-up on
eff40832e, compared with660872215afrom the earlier NVIDIA retest. clang-cl/xwin, Wine 11.22, headless Gamescope, RTX 4070 SUPER (620.73.04) and AMD Raphael (RADV Mesa 26.3.1). The latest build uses the clean merge with4364a4fa6and has the same runtime tree as the PR head.660872215aeff40832evk_presenter_sync, RTX 4070 SUPERvk_presenter_sync, AMD Raphaelvk_presenter_sparse_capture, explicit owner SID in the local fixture, RTXEvery old sync run failed
presenter.presented() == shown + 1after the queue was destroyed. Every current run reached the confirmation that the queued Present ran and completed the full test. Three RTX runs per revision used the host Khronos validation layer. Both revisions emitted the sameVUID-vkCreateDevice-ppEnabledExtensionNames-01387previously seen with host validation under Wine.The stock sparse fixture stopped at
Folder::createon RTX on both revisions. A minimal Win32 probe parsed the originalOW/SYSDDL successfully, then gotERROR_ACCESS_DENIEDfromCreateDirectoryW. The corresponding ACL using the user SID from the current process token created the directory. I applied that substitution only to local copies of the sparse test fixture; the ACL still restricts access to the owner and SYSTEM. The capture tests then verified frames 1 and 4, the capture cap, final fence drain, explicit readback, disk contents and splash handoff on both GPUs.The NVIDIA headless compositor exited abnormally during teardown, after the harness had recorded every Windows test process exit. The AMD sessions exited normally. All runs used synthetic data. AI-assisted with OpenAI Codex (GPT-6).
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-29T17:48:43Z.
Verified as far as this machine allows, and the numbers are worth having before review, because this is the largest open pull request.
It merges cleanly onto today's
main(4364a4fa6) - a merge, not a cherry-pick:git diff --name-only origin/main..HEADgives 234 files.The translator side is fully green here:
That is larger than
main's own suite (529 files, 6526 tests) and, unlikemain, it has no failing file: thetest_interp_computed_ij_fallbackthat is red onmainpasses here.The runtime builds:
cmake --build runtime/build --target gta6rtfinishes with[65/65] Linking CXX executable gta6rt.exe, on Windows C++ (Ninja,MSVC 19.44), with no errors.
One overlap worth knowing before this lands. The suite is green partly because this branch changes the interp oracle itself: it adds
f16_rtz_bits(val)-"narrow to f16 bits toward zero, matching
v_interp_p2_f16(SHADER-468)" - totests/semantic/test_interp_computed_ij_fallback.py. That is the same class of fixas the still-unowned
TEST-INTERP-COMPUTED-IJ-FALLBACK-RTZ, so if this merges first, that item is done and the standalone copies circulating for it becomeredundant. Better that someone knows now than after two merges collide.
Not verified: anything that needs a GPU run of the title, and the Rust side (
d3d12/), because this machine has nocargo. The translator suite and the C++runtime build are what I could exercise, and both are clean.
Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-29T17:49:34Z.
A measured note on scope, since this pull request turns the translator suite green and that could be read as "the translator item is done".
Merging this branch onto
mainand running the other translator check:So
CI-MESH-SERIAL-WAVES-ADDR64is not covered by this branch even though the semantic suite comes out clean - it lives intests/(thetranslator-testsjob), notin
tests/semantic, and this branch does not touch that file. The fix for it still applies on top of this branch and still works, so the two do not conflict; whoevermerges this still needs that one-line change, and it can go before or after without fighting (measured: clean cherry-pick, 1 file, 4 insertions, 3 deletions).
The encoding item is a third and unrelated one: nothing here touches
scripts/windows-boot/test_crash_monitor.py, and #2616 is its pull request.Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-11-29T17:53:06Z.
Pushed
de1694c31tointegration/perf-cpu-gpu-r6— applied @merzleckeier's test-only fix for thexs_proxy_mock_test.cpp:4707cycle-release fence polling race (waiting for bothreleased_cycle != 0andfence_completed(b_gate) >= b_gate_before + 2within the 1 s deadline, preserving thecell2(6) == 0check).Verified
xs_proxy_mock_test.exe(clang-cl + xwin, Wine on AMD Raphael iGPU1002:164e) 3/3 PASS andscripts/check_no_game_data.pyexit 0.Thanks @merzleckeier for the RTX 4070 SUPER / AMD Raphael retest and deterministic repro, and @fiestorra for verifying the clean merge, native Windows MSVC 19.44 build, and full 6,675/6,675 semantic suite!
AI-assisted (Antigravity — Gemini 4 Neon).
Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-11-29T17:59:55Z.
Pushed
8db8335d2tointegration/perf-cpu-gpu-r6— fixed the 3 test-only CI regressions spotted oneff40832eso every CI job on this PR is strictly at or greener thanmain:linux-gpu-tools(llvmpipe subgroup 8):scripts/run_gpu_tests.pynow evaluatescs_w64x_dynamic_r32_uintwithjudge_cs_dump(..., wave64=not w64_emulated(), partial=False, emulated=w64_emulated())so exit 77 on devices without 64-wide compute subgroups recordsSKIPrather thanFAIL.R64ui) counts: Updatedtests/test_spirv_metal_set0_aliases.pyandtests/test_spirv_metal_set0_extra.pyfor 30 Set 0 bindings (0..29, binding 29 capacity 1024, sum 14337, OOB test binding 30).D16_UNORM_S8_UINTformat table row: Moved the trailing parenthetical note inruntime/src/gfx10_descriptors.habove row 7 and addedD16_UNORM_S8_UINTtoBY_HANDintests/test_gfx10_descriptors.py.Verified locally:
test_gfx10_descriptors.py(5/5),test_spirv_metal_set0.py,test_spirv_metal_set0_aliases.py(9/9),test_spirv_metal_set0_extra.py(24/24),test_run_gpu_tests.py(78/78), andscripts/check_no_game_data.py(exit 0).AI-assisted (Antigravity — Gemini 4 Neon).
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-11-29T18:11:35Z.
Independent check of
8db8335d2andde1694c31, each merged ontomainateedd72e30. CachyOS, Python 3.14.10, Mesa 26.3.1 llvmpipe with LLVM 23.1.5 and subgroup range 8–8.vk_compute_test: nativecs_w64x_dynamic_r32_uintchanged from FAIL (child exit 77) to SKIP. With Wave64 emulation, both revisions passed and returned eight copies of0x8a600250.test_gfx10_descriptors.py(5),test_spirv_metal_set0_aliases.py(9),test_spirv_metal_set0_extra.py(24), andtest_run_gpu_tests.py(78).tests/test_spirv_metal_set0.py:40. The pytest suite is 15/15 on plainmain, but 14/15 on both PR revisions.test_capacities_match_vulkan_bindlessstill expects three entries incounts[26:]. Binding 29 adds1024forr64ui. I tested the following one-line change on the current head and got 15/15.Synthetic shader and descriptors only. AI-assisted with OpenAI Codex.
Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-11-29T18:22:02Z.
Good catch @merzleckeier —
test_spirv_metal_set0.pyruns underpytest, so running it directly withpython3earlier skippedtest_capacities_match_vulkan_bindless.Pushed
7b5cb2941updatingtests/test_spirv_metal_set0.py:40to expect[256, 256, 256, 1024](including Set 0 binding 29r64ui). Verified withpytestacross all fourtest_spirv_metal_set0*.pysuites (55 passed,test_spirv_metal_set0.py15/15) andscripts/check_no_game_data.py(exit 0).AI-assisted (Antigravity — Gemini 4 Neon).
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-11-29T18:52:38Z.
CI follow-up on
7b5cb2941. The GitHub translator job reports exactly the sixtest_serial_mesh_compute_modulefailures previously identified here:6 failed, 2043 passed, 15 skipped, 159 subtests passed. The separate semantic and Linux GPU jobs passed.I reproduced the six failures on both plain
main(7c330c76) andmain+ this PR (tree400e56d9). The existing test-only patcha255e207dapplies cleanly to either tree and gives31 passedintest_mesh_serial_waves.pyon both. It counts the defaultOpBitcastaddress form alongsideOpConvertUToPtr.With that patch on the PR merge, I ran the full 41-file/node
translator-testsselection fromci.ymllocally. Result: 2,049 passed, 15 skipped, 159 subtests passed. CachyOS, Python 3.14.10, pytest 9.2.0, LLVM 23.1.5. The PR branch on GitHub was unchanged. AI-assisted with OpenAI Codex.Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-11-29T19:17:16Z.
Review: COMMENTED
@aslan2142 Re-tested PR #2566 at exact head
7b5cb29414on native Windows 11 + MSVC19.44+ NVIDIA RTX 5070 (LEONIDA_VK_VALIDATION=1, plusVK_VALIDATE_SYNC=1).All 4 findings from my previous review (
LNK2019ondispatch_sample_mask, Win32CopyMemorymacro collision,d3d12_vulkan_devicecopy parity guard, andscripts/run_gpu_tests.py--no-ftz32auto-detection) are fixed and verified on exact head7b5cb29414, and the branch now merges cleanly onto latestmain(git merge-tree --write-treeexit 0). Also auditedac93aac0d4(in_known_heapOR-promotion inPendingImageKey/ImageKeyEntryandmaterialize_sample/bind_image) -- looks sound.Two small failures remain (one Windows-only GPU test, one CI
translator-testsfailure); concrete code fixes for both are below:Remaining Issues & Suggested Fixes
1. Windows GPU test failure:
cs_texture_uav(d3d12_texture_uav_test) fails under default env (got 0x11, expected 0x3f9)check.py:2256):rdna2spirv.pynow emitsdescriptor_table: "tagged"by default, socs_texture_uav.spvreads the kind bit from the descriptor table (desc_map) before everyOpImageWrite/OpImageRead.d3d12_texture_uav_testloadscs_texture_uav.spvdirectly viavkCreateShaderModulewithoutLEONIDA_SHADERS, sostate_.library()has 0 modules. Atruntime/shims/d3d12_vulkan_device.cpp:22547, the 0-module default isDescriptorTableLayout::plain, leaving the kind word zeroed -- every storage op incs_texture_uav.spvresolves to index 0 and becomes a no-op (kind 0 mip 0 first 0 count 1 texel 0: got 0x11, expected 0x3f9).cs_texture_uavwithLEONIDA_DESCRIPTOR_TABLE=taggedpasses immediately on RTX 5070 withLEONIDA_VK_VALIDATION=1(PASS cs_texture_uav: D3D12/Vulkan storage-image readback matched).runtime/shims/d3d12_vulkan_device.cpp:22546-22551): Since the kind word is additive (plain modules ignore it while tagged modules require it), default totaggedwhen no shader library / 0 modules are loaded (preservingshader_library_test's directShaderLibrary::descriptor_table_layout()tests):2. CI
translator-testsfailure: 6/6test_serial_mesh_compute_modulecases intests/test_mesh_serial_waves.py:134-137lower_addr64()(ADDR_PAIR = True,tools/rdna2spirv.py:19298-19303) lowers%mp{k} = OpConvertUToPtr %_ptr_PSB_uint %ma{k}into%mp{k} = OpBitcast %_ptr_PSB_uint %a64_{n}v, sore.findall(r"%mp\d+ = OpConvertUToPtr %_ptr_PSB_uint", plain_main)returns0for all 6SERIALshaders (ms_tri,ms_clip,ms_f16_pack,ms_w64x_ballot,ms_w64x_wave_votes,ms_w64x_wave_loops).OpConvertUToPtrandOpBitcastmatches all 6 shaders with exact per-pass store counts (ms_tri: 14,ms_clip: 15,ms_f16_pack: 18,ms_w64x_ballot: 14,ms_w64x_wave_votes: 14,ms_w64x_wave_loops: 14), and all 8/8ms_*fixtures pass live on RTX 5070 withLEONIDA_W64_EMULATE=1 LEONIDA_MESH_SERIAL_WAVES=1.tests/test_mesh_serial_waves.py:134-137):Verification Summary on Exact Head
7b5cb29414(synthetic fixtures + translator tests; no retail title run for visual rendering inspection on this machine)gta6rt.exe+ 37 test targets (includingd3d12_state_map_test,replay_copy_memory_test,d3d12_vulkan_device_test,d3d12_texture_uav_test,xs_proxy_mock_test,vk_texture_test,vk_bindless_test,vk_sampler_test,vk_store_test,vk_harness,vk_ps_sweep,vk_compute_test) built & linked cleanly (RC=0).LEONIDA_VK_VALIDATION=1(default env): 31 passed, 3 expected-skipped on NVIDIA (arena_sparse_gpu,vk_heap_alias,vk_title_mirror), 0 failed -- includingd3d12_vulkan_device(default env,CopyClipGuardverified),d3d12_state_map,replay_copy_memory,d3d12_texture_uav --descriptors-only,d3d12_m4_compute,d3d12_m4_compute_async_small_waits,d3d12_buffer_tiles,d3d12_texture_tiles,d3d12_existing_heap(default/_no_write_watch/_write_watch),d3d12_indirect_dispatch_count,d3d12_bundle_indirect_dispatch,d3d12_sample_mask,sample_mask_fragment,vk_sample_mask,d3d12_tsharp_refill,d3d12_unbound_tsharp_rules,d3d12_xs_placed_depth,xs_proxy_mock,d3d12_mesh,d3d12_draw,d3d12_compute,vk_presenter_sync,vk_presenter_sparse_capture,vk_presenter_capture_colour,vk_command_replay,vk_bindless_dimensions,pipeline_workers,arena_backing,arena_size,title_mirror_hooks.LEONIDA_VK_VALIDATION=1 VK_VALIDATE_SYNC=1): 10/10 passed (vk_presenter_sync,d3d12_indirect_dispatch_count,d3d12_bundle_indirect_dispatch,d3d12_m4_compute,d3d12_m4_compute_async_small_waits,d3d12_compute,d3d12_draw,d3d12_sample_mask,d3d12_tsharp_refill,d3d12_mesh).scripts/run_gpu_tests.py(LEONIDA_VK_VALIDATION=1): 285/285 shaders translated &spirv-valclean; 216/275 passed, 58 skipped, 1 failed (cs_texture_uav, issue #1 above; passes withLEONIDA_DESCRIPTOR_TABLE=tagged-> 217/217 runnable GPU fixtures green with 0 VVL errors, includingps_exp_f32_denorm*andps_mul_legacy_denorm*exact).LEONIDA_W64_EMULATE=1 LEONIDA_MESH_SERIAL_WAVES=1): 8/8ms_*fixtures passed on RTX 5070 with 0 VVL errors.tests/test_absent_lane_gpu.py): 2/2 passed.check_no_game_data.pyPASS,compileallPASS,test_run_gpu_tests.py78/78,test_make_game_translator_flags.py42/42,test_shader_build_fallbacks.py11/11,test_fssm_header.py47/47,test_docs_env_vars.py5/5,test_absent_lane_ub.py18/18.GPUs tested: NVIDIA GeForce RTX 5070 12 GB (Windows 11, driver 610.88, Vulkan 1.4.341,
VK_LAYER_KHRONOS_validation 1.4.363).AI-assisted (Antigravity, Gemini).
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-11-29T19:27:44Z.
I independently reproduced the texture UAV finding on
7b5cb2941merged ontodd87aa405(treeedf8ac34). Windows x64 clang-cl build on CachyOS / Wine 11.22, RTX 4070 SUPER (620.73.04) and AMD Raphael (RADV 26.3.1). My local Wine-only fixture omitted the WARP calls and kept the existing exact Vulkan readback assertions. Both synthetic shader variants passedspirv-val.0x11, expected0x3f9). ExplicitLEONIDA_DESCRIPTOR_TABLE=taggedpassed all 14 readback cases on each.plainstill produced the expected mismatch with tagged SPIR-V.plainand passed all 14 with the matching shader. The descriptor-only checks passed as well.The host validation layer reported the same
VK_EXT_external_memory_dma_bufdependency message across both variants under Wine (VUID-vkCreateDevice-ppEnabledExtensionNames-01387). The native Linuxshader_library_testpassed.Separately, the exact
e3ddc2e0diff from #2627 gave 2,055 passed, 15 skipped, 159 subtests passed in the full translator CI selection on this same merge tree, versus six mesh failures before applying it. A/B details. Synthetic inputs only. AI-assisted with OpenAI Codex.Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-11-29T19:28:04Z.
Thanks @lixonik for the thorough Windows 11 / MSVC 19.44 / RTX 5070 re-test and catching the 0-module descriptor table default!
Pushed
cfd12b24fupdatingruntime/shims/d3d12_vulkan_device.cpp:22547-22550to defaultdescriptor_tabletoDescriptorTableLayout::taggedwhentable_modules.total() == 0(so standalone fixtures liked3d12_texture_uav_test/cs_texture_uavmatchrdna2spirv.py's default tagged layout without affectingshader_library_test). Verifieddescriptor_table,shader_library, andscripts/check_no_game_data.py(exit 0).Left
tests/test_mesh_serial_waves.pyuntouched here sinceCI-MESH-SERIAL-WAVES-ADDR64already has its own open PR (#2627).AI-assisted (Antigravity — Gemini 4 Neon).
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-11-29T19:35:50Z.
CI follow-up now that #2627 is on
main. The red translator job forcfd12b24fchecked out a merge with the older basedd87aa405and reports the same six mesh failures. I cleanly merged this exact PR head onto0e8737f2(treeea28dddb), which contains #2627, and ran its full 41-selectiontranslator-testsjob locally without source edits. Result: 2,055 passed, 15 skipped, 159 subtests passed. CachyOS, Python 3.14.10, pytest 9.2.0, LLVM 23.1.5.The separate stdlib-tests-linux failure is the empty synthetic shader-cache fixture issue tracked in #2629. AI-assisted with OpenAI Codex.
Imported from ubiquitarianism/leonida. Originally posted by azsekazvamdimitar on 2026-11-29T20:01:32Z.
Retail game-run check on latest PR head
8db8335d2(clean worktree, no local patches) — NVIDIA GeForce RTX 3090 24 GB, Linux (GE-Proton, NVIDIA 590.48.01), Series X profile, warm--wave64-emulate --mesh-serial-waves --compute-serial-waves+ #2501 shader set, 600 s run (after warming the new 30-binding Set 0 cache over two runs):VK_ERROR_DEVICE_LOST, 0 crashes across 11,453,404 D3D12 calls (5+ continuous minutes in live gameplay).memoryTypeBits=0x2-> 4,094 MiB single-allocation arena,page mirror off).before-execute96% skipped (0 single-flight waits); submit path 16–23% of wall time in-world (heaps~2.5 ms,shadows~0.9 ms,textures~0.5–1.3 ms,replay~1.2–1.5 ms/sub).AI-assisted report (Antigravity / Gemini 4 Neon).
Imported from ubiquitarianism/leonida. Originally posted by qhukz13 on 2026-11-29T20:02:28Z.
RUN (no game): #2566 A/B of the runtime test suite on a low-end NVIDIA card without Resizable BAR.
No regressions: the 11 failures are the same tests in A and B:
d3d12_close_parity,d3d12_heap_properties,d3d12_pso_validation,d3d12_state_sweep,d3d12_vulkan_device;root_sig,root_signature_oracle,xbox_present;title_window,xgameruntime_offline(_hdr).They are known on this machine: the last three fail only because the run was started over SSH (session 0) and pass from an interactive session, and
d3d12_close_parityis WARP answering differently on Windows 10.The PR's new tests: of the 26 ctest tests B adds, 21 pass. 5 skip:
arena_sparse_gpu,d3d12_heap_in_place,d3d12_page_mirror,vk_heap_alias,vk_title_mirror. Their output on this card is the page mirror being off (below), so they have nothing to check here (the skip reason is read from the log, not from each test's code).The page mirror's reason line, as asked: printed by the runtime in B's tests on this card.
This matches what I read in the code earlier in this thread: on NVIDIA the mirror (and what builds on it) stays off. So on cards like this one #2566 should be neutral for correctness, and its mirror-based speed-ups do not apply.
Not covered: no game run, so no FPS or "how far" numbers; the 3090/5080 A/Bs cover that. AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-29T20:05:51Z.
NVIDIA A/B, as asked for in the dev discussion: yes, it regresses on this machine, and consistently. Details so it can be checked rather than taken on trust.
Machine: RTX 4090, Windows 11, MSVC 19.44, Ninja
RelWithDebInfo, NVIDIA driver 32.0.16.2124. No game data needed: this is the full C++ctestsuite, every testbuilt from each tree.
main4364a4fa6xbox_present3/3,xbox_packed4444_clear_sample1/3 (SEGFAULT)main+ this branchxbox_present3/3,vk_gpu_profile3/3,d3d12_clear3/3,loader1/3Test counts: 536 in A, 561 in B - the branch adds 25 tests of its own.
xbox_presentfails in both, so it is pre-existing and not this branch.xbox_packed4444_clear_sampleis flaky in A (1 of 3), andloaderis flaky in B (1 of 3);neither is a difference you can build on.
The two that matter are
vk_gpu_profileandd3d12_clear: they pass in every arm-A run and fail in every arm-B run.d3d12_clearsays why in its own output:which reads like a format the branch started refusing (or counting) in the castable-RTV path.
vk_gpu_profileprints its whole table and then fails; the last line ofinterest is
vs spin_vertices … 4 calls in 1 runs, 0.0000 ms, so a zero-duration graphics result is a candidate, but I have not proven which assertion it trips - I amnaming the observation, not the cause.
What I have not done: the fps comparison. That needs the title running in the world, our boots end in the driver's watchdog more often than not, and three runs per
arm there is hours of non-deterministic work. What this A/B does prove is narrower and still useful: the branch is not neutral on Windows/NVIDIA in the test suite,
before anyone spends GPU hours on frame rates.
Reproduce: apply the branch on
main4364a4fa6,cmake -S runtime -B build -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo, build all, thenctest --test-dir build -C RelWithDebInfo -j 6 --timeout 180three times.Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-29T20:06:40Z.
Follow-up with one of the two regressions localized, and the other honestly not.
d3d12_clear- located. The test file isruntime/test/d3d12_clear_test.cpp, and this branch does not change it (git diff --name-only origin/main..<head> -- runtime/test/d3d12_clear_test.cppis empty). Its message is its own:
and what it reports is
format 28 {87} took an RTV in unlisted format 91- the format-28 texture was served its RTV in 91 where the table expects 87.On the runtime side, this branch introduces exactly that path: a
zero_castablevector carrying the format and its UNORM/sRGB twin, replacing the assumption that atyped RGBA8/BGRA8 target takes its view "without a castable list":
in
runtime/shims/d3d12_vulkan_device.cpp. So the shape is: an unchanged test pinning the listed/unlisted format pairs, and a branch that changes which of them atexture is created with. That is where to look, and it is a behaviour change the test was written to catch rather than a stale test.
vk_gpu_profile- not located. It prints its whole table and then exits non-zero. The last interesting line isvs spin_vertices 4 calls in 1 runs, 0.0000 ms, whichsuggests a zero-duration graphics result tripping an expectation, but I could not find the source of that test's checks in
runtime/testto quote the assertion, so I amnot going to name a cause. It passes 3/3 on
mainand fails 3/3 here, so it is still a regression; it just needs someone who knows that test to say which line fails.Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-29T20:07:21Z.
CORRECTION to my A/B comment above, on
vk_gpu_profile.I wrote that it "passes in every arm-A run and fails in every arm-B run, so it is still a regression". That is wrong.
runtime/test/vk_gpu_profile_test.cppdoes notexist on
main(4364a4fa6): the file is added by this branch. So it could not have passed on arm A - it was not there to run. The 536-versus-561 test counts in my owntable say the same thing, and I should have read them before writing the sentence.
What is true, and what I should have said:
d3d12_clearis a genuine regression: the test exists onmain, passes 3/3 in arm A, fails 3/3 with this branch, and the branch changes the code path the testpins (the new
zero_castablelist carrying a format and its UNORM/sRGB twin, against an unchanged test that expects the listed pairing);vk_gpu_profileis a new test in this branch that fails on this machine, 3/3. It prints its table and exits non-zero; the last interesting line isvs spin_vertices 4 calls in 1 runs, 0.0000 ms. That is still something to fix before merging, but it is a new test failing, not something that used to be green.The difference matters for whoever reads this: one says "this branch breaks a check we had", the other says "this branch ships a check that does not pass here". Both are
reasons not to merge blind, but they are not the same claim, and only the first one is a regression.
Everything else in that comment stands:
xbox_presentfails on both arms (pre-existing),xbox_packed4444_clear_sampleis flaky in A (1 of 3),loaderis flaky in B(1 of 3), and no fps comparison was done.
Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-29T20:08:30Z.
Second regression localized too, and it is a threshold rather than a wrong count.
Running the new test through ctest on this machine gives its own assertion, not just "Failed":
Which is this loop (
runtime/test/vk_gpu_profile_test.cpp, added by this branch):On this machine the exemption does not apply, and it should not:
queue.span_msis 0.2180 ms, not 0, and the device is a GeForce RTX 4090, so it is not theparavirtual case the comment describes. But the graphics entry is exactly zero:
So
vertices->ms == 0and the loop's first term fails. The counts in the same run are right (vertices->calls == 4 && vertices->runs == 1passed), so this is theduration of a graphics pass measuring zero on a fast native desktop GPU, not a structural mistake.
Two readings, and I cannot pick between them from here: either the profile genuinely cannot time a sub-tick graphics pass on this hardware (in which case
> 0is thewrong contract, the same way the span-0 exemption admits for paravirtual), or the graphics timestamps are equal by mistake and the profile is under-reporting. The
first needs a threshold or an exemption, the second needs a fix in the timing path.
The two structural points that would settle it are cheap for whoever owns the test: print
vertices->mswith more digits than%.4f(so "0.0000" tells whether it is0 or 0.00004), and check whether the graphics begin/end timestamps are equal.
Everything else on this branch measured clean here: the counts, the queue accounting and the other two entries.
Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-11-29T20:23:02Z.
Independent follow-up to the RTX 4090 reports. I tested PR head
cfd12b24fmerged onto720bd3b4e(tree824258cd) on CachyOS with an RTX 4070 SUPER (620.73.04) and Radeon Raphael (RADV 26.3.1). Native Linux for the profiler, Win64 ClangCL 23.1.5 Release under Wine 11.22 for the RTV probe. Synthetic fixtures only. AI-assisted with OpenAI Codex.vk_gpu_profileMEASURED. The original test failed at line 320 in 8/8 NVIDIA runs and passed in 8/8 RADV runs. The graphics entry still reported four calls in one run. With raw-query logging on NVIDIA, the signed
q5 - q4deltas forvs spin_verticeswere-3072, -3072, -4096, -3072, -3072, -4096, -3072, -4096ticks (1 ns/tick). The existing clamp yielded zero in every run. The queue span was positive.READ IN CODE. The profiler deliberately clamps a backwards interval in
resolve. A test-only change permits zero for the graphics interval and retains positive durations and scaling for both compute pipelines, all call/run counts, and query checks. Clamp inresolveMEASURED. With that change and the raw logging removed, the full profile test passed 8/8 on each GPU.
d3d12_clearand unlisted RTVsMEASURED. I ran the existing
check_unlisted_rtvsdirectly before WARP setup. On base and PR source it passed 3/3 per GPU, including all nine expected rejections per run. In28 {87} -> 91all sevenTargetViewfields matched the empty descriptor in the PR build. Native WARP coverage remains open. Wine could not provide WARP on NVIDIA and used a hardware fallback on RADV, where both stock trees failed the same depth case.READ IN CODE. The test compares the entire object representation with
memcmp. The PR adds twoboolmembers. In the Win64 buildsTargetViewgrows from 24 to 32 bytes, with six bytes of trailing padding. TargetView declarationMEASURED with a controlled padding change. Writing
0x5aonly to byte 26 of a rejected descriptor reproduced the exact ‘format 28 {87} took an RTV in unlisted format 91’ error 3/3 on each GPU. Every member still matched the empty descriptor. With the same change to byte 26 and a member-wise comparison of the resource, mip, layer range, format and both read-only flags, the probe passed 3/3 on each GPU. This demonstrates how padding alone can trigger the error. A native Windows/MSVC run with the member-wise check would establish whether it accounts for the original result.Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-11-29T20:28:47Z.
Great catches @fiestorra and @merzleckeier — pushed
1d0867c4afixing both Windows/NVIDIA findings:d3d12_clear(runtime/src/command_list.h): Added explicit zero-initialized trailing paddingstd::uint8_t pad_[6] = {};(withstatic_assert(sizeof(TargetView) == 32)) toleonida::TargetViewsoview = {}/TargetView{}never leaves uninitialized bytes 26..31 ford3d12_clear_test.cpp'sstd::memcmpunder MSVCRelWithDebInfo.vk_gpu_profile(runtime/test/vk_gpu_profile_test.cpp:320): Kept positive-duration + scaling assertions on both compute pipelines (heavy,light) while permittingvertices->ms >= 0 && vertices->ms < 2000for the short graphics pass whose consecutiveBOTTOM_OF_PIPEtimestamps can invert slightly on NVIDIA (clamped to0.0invulkan_gpu_profile.h::resolve()).Verified locally (
command_list,typeless_rtv,vk_gpu_profileon AMD Raphael iGPU1002:164e, andscripts/check_no_game_data.pyexit 0). Note #2627 is now merged onmain, sotranslator-testson the merge commit should also turn green.AI-assisted (Antigravity — Gemini 4 Neon).
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-11-29T20:34:37Z.
Retest of
1d0867c4aonedf0ff5d(tree2ad27fd6). CachyOS, RTX 4070 SUPER (620.73.04) and Radeon Raphael (RADV 26.3.1). I built the profile test natively and as Win64 ClangCL Release for Wine 11.22.MEASURED — RTVs. The existing unlisted-RTV check, run directly before WARP setup, passed 3/3 on both GPUs, with all nine refusals on each run. The unmodified full test reached and passed that check on RADV, then hit the same Wine hardware-fallback depth mismatch as before. NVIDIA Wine could not provide WARP. A native Windows/MSVC full retest is still open.
MEASURED — graphics duration and compute scaling. The zero-millisecond graphics assertion did not recur in any of the 128 exact runs. Counts passed: NVIDIA 31/32 native and 30/32 through Wine, RADV 32/32 each. The three remaining failures were all at line 326, the pre-existing strict
heavy per call > 2 * light per callcheck. The displayed heavy/light totals were 0.2047/0.0512 ms on native NVIDIA and 0.2050/0.0522 and 0.2054/0.0522 ms through Wine (four heavy calls, two light calls).MEASURED — test-only follow-up. Raising
kHeavyTurnsfrom20000to40000while retaining the same assertions passed 24/24 for each of the four GPU/platform combinations. The NVIDIA graphics interval continued to print 0.0000 ms. This gives the existing compute ratio more margin.Separate merge note. I confirmed that #2633 conflicts with this branch only in
tests/semantic/test_interp_computed_ij_fallback.py. Taking the exact file from #2633 on the precedingcfd12b24fmerge passed the full semantic run with 6,675 tests discovered in 549 files and zero failing files.1d0867c4aleaves the semantic suite and translator files alone. Standalone semantic A/BSynthetic inputs only. AI-assisted with OpenAI Codex.
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-11-29T20:53:27Z.
Follow-up on the
submit_framefailure in the macOS runtime job for1d0867c4a. It fails in the CPU-only scripted section atload(f.part_ns[sp::part_lock_wait]) >= 2 * ms. macOS jobMEASURED. On
1d0867c4amerged onto7bbc1d22(81220131), delaying the waiter by 8 ms just after the holder's flag in the shadows check reproduced that exact assertion in 12/12 runs, before Vulkan setup. The unmodified fixture passed 12/12 without that delay.Test-only fix. The holder keeps the real mutex locked until
lock_timedenters its blocking path and has recorded its start. The test then gives it the same 4 ms hold. This covers all three contention checks and keeps the existing time and counter assertions. Cherry-pick1c4f7d64MEASURED. The candidate passed 12/12 CPU runs with and 12/12 without the injected delay. It also passed the full
submit_frame_test8/8 per GPU natively on CachyOS and 3/3 per GPU as Win64 ClangCL/MDunder Wine 11.22. RTX 4070 SUPER (620.73.04), RADV Raphael (26.3.1). Native macOS validation is still open. Synthetic fixtures only. AI-assisted with OpenAI Codex.Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-11-29T21:18:22Z.
Thanks @merzleckeier for both root causes and A/B verifications — pushed
eade9562capplying both test-only fixes:runtime/test/vk_gpu_profile_test.cpp: RaisedkHeavyTurnsfrom20000to40000for clean compute scaling margin on NVIDIA while preserving all assertions.runtime/test/submit_frame_test.cpp: Synchronized all threelock_timedcontention checks so the holder keeps the realstd::mutexlocked untillock_timedhas entered its blockinglock()path (via a localTrackedLockwrapper), then holds for 4 ms — eliminating VM thread-scheduling flakes on macOS runners without modifying runtime code.Verified
submit_frame(5/5) andvk_gpu_profile(5/5) on AMD Raphael iGPU (1002:164e) andscripts/check_no_game_data.py(exit 0).AI-assisted (Antigravity — Gemini 4 Neon).
Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-11-29T21:24:18Z.
Retested the two fixture changes at
eade9562cmerged locally withmain060c471604on native Windows 10 22H2, RTX 5070 (610.88), MSVC 19.44 and Khronos Vulkan validation.vk_gpu_profile: 5/5 passed with the new compute workload.submit_frame: 6/30 runs failed atload(f.worker_ns[sp::worker_texture_reads]) > 0. This is the worker-clock check at line 114, separate from the contention checks addressed in this commit. The worker scope aroundsp::add(sp::textures, 5 * ms)can begin and end within onesteady_clocktick. The same fixture is in the preceding PR revision.sp::now_ns() == busy.startafter the syntheticsp::add, the completesubmit_frametest passed 30/30. No runtime changes were needed.Synthetic fixtures only. AI-assisted.
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-11-29T21:24:37Z.
Independent retest of
eade9562c(GitHub merge47a53d19bonto060c47160). I rebuilt the previous head1d0867c4aon the same base for the controls. CachyOS, RTX 4070 SUPER (620.73.04), Radeon Raphael (RADV 26.3.1), native Linux and Win64 clang-cl Release under Wine 11.22.vk_gpu_profile. The previous head passed 31/32 on NVIDIA natively and 31/32 under Wine. Both failures were the strict heavy/light per-call comparison. The new head passed 32/32 on each GPU and platform (128/128). From the printed totals, the new NVIDIA minimum heavy/light ratio per call was about 4.03 natively and 4.10 under Wine, above the unchanged 2× threshold. The NVIDIA graphics interval still printed zero.submit_frameCPU. An 8 ms delay after the holder acquired the mutex in the shadows case reproduced the same lock-wait assertion on all 12 previous-head runs. The new head passed 12/12 with that delay and 12/12 with the unmodified test. These CPU runs deliberately excluded Vulkan.submit_frameGPU. The unmodified new test passed 5/5 per GPU on native Linux and 5/5 per GPU under Wine with an explicit/MDbuild. All 20 runs reached the 20-submission check and the final queue checks. The default local cross-build faulted on startup under Wine on both revisions. The explicit/MDprevious-head control also passed 3/3 on NVIDIA.Synthetic fixtures only. AI-assisted with OpenAI Codex.
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-11-29T21:29:27Z.
I ran a controlled clock-resolution A/B for the Windows worker-accounting finding on
eade9562c(GitHub merge47a53d19b). I used native Linux and Win64 clang-cl Release (/MD) under Wine 11.22.submit_phases::now_ns()to 100 μs, aligned to its first read. Every run measured 0 ns for that worker and failed atload(f.worker_ns[sp::worker_texture_reads]) > 0(24/24 failures per platform). The other threads retained their real clocks.while (sp::now_ns() == busy.start) std::this_thread::yield();aftersp::addwas the only difference between the two quantized runs. This measured one 100 μs tick every time and passed 24/24 on each platform. That quantum is the injected probe setting.Synthetic fixtures only. AI-assisted with OpenAI Codex.
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-29T21:44:23Z.
Frame-rate A/B on NVIDIA, as the dev discussion asked for. One machine (RTX 4090, Windows 11, driver 32.0.16.2124, 24 GB profile), same recipe both arms, 600 s per launch, three launches per arm.
Metric: median of
submit frame t=Ns: N frames in 10.0 sover the 150-300 s window, i.e. after loading and before the tail. Every launch reached the world (the counter runs), so this is a comparable measurement, not a boot-time proxy.edf0ff5d0Prediction, written before the arm-B runs: the branch reaches the world in at least 2 of 3 and its median does not drop more than 5% below the arm-A reference (>= ~59 fps). Not refuted: 3 of 3 reached the world and the medians are 60.0 / 61.3 / 68.4.
What I claim: no frame-rate regression detected on this machine, and the fastest single run of the day is arm B (68.4). What I do not claim: that it is faster. The arm-B spread (60.0-68.4) straddles arm A (61.8-63.0), n is 2 and 3 launches, and B2 contains a stall to 6.9 fps that drags its mean to 47.7 while its median stays 60.0 - a single run's mean is not a stable number.
Two honest limits: this is the C++ runtime (
gta6rt.exe, the one that builds here); the Rust side has nocargoon this machine, so if the integration's frame-rate claim is aboutd3d12/, this says nothing about it. And the earlier "one boot in four reaches the world" from this machine no longer reproduces: all five launches across both arms today reached it, so that history is not a factor in these numbers.Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-11-29T21:51:40Z.
Thanks @lixonik and @merzleckeier for catching and A/B-verifying the Windows
steady_clocktick flake insubmit_frame_test(and thanks @fiestorra for the RTX 4090 gameplay A/B)!Pushed
22e1349d7applying the 1-line test-only yield inruntime/test/submit_frame_test.cpp(while (sp::now_ns() == busy.start) std::this_thread::yield();).Verified
submit_frame10/10 on AMD Raphael iGPU (1002:164e, RADV) andscripts/check_no_game_data.py(exit 0).AI-assisted (Antigravity — Gemini 4 Neon).
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-11-29T22:19:41Z.
Retested
22e1349d7on GitHub mergea77fa84f8onto060c47160.submit_frame. The CPU section passed 16/16 each on native CachyOS and Win64 clang-cl 23.1.5 Release (/MD) under Wine 11.22, with Vulkan disabled. The full fixture passed 5/5 per GPU and platform on RTX 4070 SUPER (620.73.04) and Radeon Raphael (RADV 26.3.1), reaching the final queue checks in every run. With a test-only 100 µs clock scoped to the texture-read worker, removing the yield measured 0 ns and triggered the worker assertion in all 12 runs per platform. With the committed yield, all 12 runs per platform passed and measured one tick.submit_framepassed in both jobs. The macOS job reported success for the CTest stage beforeps_exp_f32_denorm_rtfailed on the Apple Paravirtual device. Pixel 0 got0x00fffffewhere0x01000000was expected. Windows job · macOS jobdf79ee784from #2641 combines cleanly witha77fa84f8. I replayed the failing pixel and the device line through the combined Python runner using a stub harness. The runtime-denormal case changed from FAIL to SKIP. The same bad pixel still failed withApple M5 Maxas the stub device label. On actual NVIDIA and RADV hardware, both denormal fixtures each passed all 4,096 pixel comparisons before and after the commit. The full #2641 head has a conflict intests/semantic/test_interp_computed_ij_fallback.py. #2641 macOS jobSynthetic fixtures only. AI-assisted with OpenAI Codex.
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-11-29T23:09:59Z.
Retested
22e1349d7after merging it locally intomain452d1d1b6(tree8c23d50f8, includes #2649).command_listpassed 3/3 on native CachyOS and 3/3 as Win64 under Wine. This includes the new programmable sample-count assertions.submit_frameandvk_gpu_profileeach passed 3/3 per GPU and platform. There were no Vulkan skips.submit_framereached 20 submissions and the final queue checks in every run.vk_gpu_profileresolved seven timestamps per capture, and the compute ratio assertion passed even with the NVIDIA graphics interval displaying0.0000 msin all six NVIDIA runs.RTX 4070 SUPER (620.73.04), Radeon Raphael (RADV 26.3.1), native Linux and Win64 clang-cl 23.1.5 Release (
/MD) under Wine 11.22. Synthetic fixtures only. AI-assisted with OpenAI Codex.Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-11-29T23:36:19Z.
Confirmed the committed timer fix at
22e1349d7, merged locally withmain452d1d1b6. On native Windows 10 22H2, RTX 5070 (610.88), MSVC 19.44, with Khronos Vulkan validation and synchronization validation,submit_framepassed 30/30 andvk_gpu_profilepassed 5/5. The committed fixture ran without local edits. This resolves the worker-clock flake I reported above.AI-assisted.
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-11-30T00:33:14Z.
MoltenVK integration check with #2641. The
ps_exp_f32_denorm_rtpixel 0 result (0x00fffffefor0x01000000on Apple Paravirtual) is identical in the #2566 macOS job and the upstreammainjobs fora84c41909and32b9f4a3e.I merged #2566 head
22e1349d7intomain452d1d1b6, applied the Paravirtual skip commitdf79ee784from #2641, and ran the project’s macOS job in the fork. The combined job passed.submit_frameandvk_gpu_profilepassed, the denorm case logged the explicit Apple Paravirtual skip, andps_ssharpwas the sole GPU failure, already covered by the upstream expected-failure policy.Synthetic fixtures only. AI-assisted with OpenAI Codex.
Imported from ubiquitarianism/leonida. Originally posted by DadaCap on 2026-11-30T01:13:51Z.
#2566 A/B on an RTX 5080: full report (2026-11-30)
Builds. A is main
32b9f4a3e, which already contains #2649 (the fix for the #778 device loss). B is A with #2566 at22e1349d7merged in (merge --no-ff, local commitf1e96bddd). Both runs use the Vulkan runtime (gta6rt) with the same settings:LEONIDA_DEVICE_FAULT=2and the same run switches on both sides. Each side has its own build, its own shaders (translated with that side's translator) and its own compute pipeline journal. Each side also got a launch-set precompile and one uncounted 600 s warm-up run.Order. The counted runs went A1 B1 A2 B2, 600 s each. Machine: RTX 5080 16 GB, NVIDIA 621.24, Windows 11, 24 logical CPUs.
Measures. FPS come from PresentMon; "1 %" is the FPS of the slowest 1 % of frames. RAM is the game's private memory and VRAM its dedicated GPU memory, both peaks in GiB. CPU % is the game's share of all 24 logical CPUs, and GPU % is nvidia-smi utilization, both averages sampled every 2 s. Times are seconds since the game started.
Summary
4364a4fa6.Counted runs
A1 (main)
B1 (main + #2566)
A2 (main)
(The 99 % of 981 in A2's 120 s+ window comes from a handful of very short frame intervals, not from a real frame rate.)
B2 (main + #2566)
Side by side
The 60-120 s gap appears in every A/B pair measured on this machine:
4364a4fa6(first attempt)4364a4fa6(first attempt)32b9f4a3eThe first attempt on
4364a4fa6lost the device on both sides at 100-230 s. That loss was caused by #778 and is fixed by #2649 (now on main).Investigation: where B's second minute goes
1. Submission phases (MEASURED, runtime
submit phaseslog, ms per submission, n=2 per side)In this window the other phases (heaps, geometry, pipelines, replay) are similar on both sides. B's lower frame rate is CPU time spent preparing each submission in the textures phase (title texture refresh and upload) and the shadows phase (slot-133 shadow copies of title memory).
2. Title texture refresh volume on B (MEASURED,
title texture refresh:statistics, new in #2566)B1 periodic statistics, each covering about 10 s:
That is several GiB of CPU-staged texture uploads during world entry, at the moment the frame rate falls. Main has no equivalent counter, but its textures phase stays at 13-20 ms.
3. Shadow copies per submission (MEASURED,
slot-133 shadow copies by cause, KiB per submission)B copies about 5x more aliased title memory per submission. It also copies 0.4 MiB per submission of read-only memory that A never copies.
4. Messages only B logs (MEASURED, both takes)
gpu_owned refusal: 16 lines (logging caps at 16), 13 of them at ~47 s. The run total is 24 textures not filled, from thetextures over GPU-written memorycounter.tsharp-refuse: 16 lines between 62 and 98 s. Reasons: "T# extent does not match the texture" 8, "T# names mips the texture lacks" 5, "no view for the T#'s format or range" 2, "T# type or samples do not fit the texture" 1.These are guards added by #2566 (
runtime/shims/d3d12_vulkan_device.cpp:DeviceState::index_texture~line 20534, and the T# refusal logging ~line 21130). Their counts are small, and they fire in the same window as the slowdown. They read as symptoms of the same world-entry texture traffic, not as its cause (hypothesis).5. Where to look (READ IN CODE, hypothesis)
refresh_title_texturesinruntime/shims/d3d12_vulkan_device.cpp(~line 23728; statistics printed at ~24517 and ~26091) does the reads and uploads above.dd78a02f6(back deferredpending_streamimages inrefresh_title_texturewhen pages arrive) ande4c070874(publish deferred streamed views once backed). If many streamed images get backed and read whole in the same few seconds of world entry, that matches the 5.4 GiB window.fbeb3d908(eliminate false texture re-uploads) and09f8cb66b(read-back cache and coalescing) touch the same path.Suggested checks for the author:
Limits
Tested by DadaCap's agent (Claude Code), AI-assisted.
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-11-30T01:21:01Z.
Synthetic texture/shadow coverage and a counter detail for the RTX 5080 A/B. I merged
22e1349d7into0eab02a8b(treebf58cee8).title_texture_refresh,vk_title_detile,shadow_keep,title_frames,title_texture_watch,title_write_policy) passed on native CachyOS and Win64 clang-cl Release/MDunder Wine 11.22, using RTX 4070 SUPER and Radeon Raphael. Each completed run exercised 187 GPU detile cases plus descriptor batching and 3D multi-mip readback, with bit-for-bit parity. This covers the synthetic paths and leaves the world-entry throughput question open.stage2_backedcounts allocations performed inside Stage 2. The slot-70 callback can back a deferred texture earlier throughback_title_texture(t, nullptr, nullptr, from), leaving its texel upload for the batched pass. Once that early backing succeeds, Stage 2 seesunbound_bytes == 0and omits that texture from its backing count. The first upload’s bytes would need separate attribution to slot-70 backing to test that hypothesis. Slot-70 path · Stage-2 count.Synthetic fixtures only. AI-assisted with OpenAI Codex.
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-11-30T01:29:47Z.
I put a focused measurement for the RTX 5080 A/B in a fork. The diagnostic commit tags a deferred texture only when slot 70 gives it backing before submission. The periodic log line
title texture slot-70 early backingreports backing operations, first successful uploads, source-footprint bytes, and the subset staged by the CPU. A pending upload survives reporting windows and upload retries. The diagnostic patch also applies cleanly to the frozen32b9f4a3e+22e1349d7merge used for the B arm.With the synthetic Vulkan probe, I ran three fresh launches per mode and GPU (RTX 4070 SUPER and Radeon Raphael) using a Win64 clang-cl Release build under Wine 11.22. All 12 reached submission and descriptor retirement. Each early-backing run reported one backing operation, one first upload, and 2,048 source bytes, all CPU-staged. The existing
stage2_backedcounter stayed at zero. Each submission-time control reportedstage2_backed=1and emitted no early-backing line.The probe uses synthetic pages and forces CPU staging. The reported gameplay FPS drop still needs an instrumented workload run.
AI-assisted with OpenAI Codex.
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-11-30T01:48:25Z.
I checked what the slot-133 numbers in the RTX 5080 A/B measure. The higher aliased figure shows more source bytes scheduled for shadow refresh. It does not give the number of bytes written to the shadow destinations.
add_jobcharges the source range to the “by cause” counter before copying. With the defaultLEONIDA_SHADOW_KEEP, the refresh reads and hashes that range, then credits the “submissions … copied” line for writes into destination ranges. The latter is a total across causes. Source accounting32b9f4a3eand B (22e1349d7merged onto A, tree127f841a). A separate B/NVIDIA control withLEONIDA_SHADOW_KEEP=0reported 64 KiB copied on both. All readbacks matched.submit phases … shadowsalso includes PageMirror refresh and flush work. For the same 60–82 s interval in the existing logs, the slot-133copied … KiBandwalk … ms, copies … msrows show shadow destination volume and refresh cost. B’sbefore-executerow, when present, gives separate mirror and flush timings. Those rows can distinguish a more expensive slot-133 refresh from time spent in PageMirror. Phase scopesThe readback probe uses synthetic pages and one refresh per submission. It measures the counters rather than gameplay performance. AI-assisted with OpenAI Codex.
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-11-30T02:17:57Z.
Independent retest of
1aefed0daon GitHub merge1ac6eea36(base182d0c174). The control merged the previous head22e1349d7on the same base.submit_framepassed 3/3 per GPU and platform on RTX 4070 SUPER and Radeon Raphael, both native CachyOS and Win64 clang-cl Release under Wine 11.22. Every run reached the new Present mutex ordering and async-versus-sync held-queue assertions.queue_holdsandlist_value_progresspassed 3/3 per platform. Win64xbox_list_value_fallbackpassed 3/3 per GPU andxs_proxy_mockpassed 3/3. The previous head passed its corresponding tests too.vk_presenter_syncpassed 3/3 per GPU on each revision. All runs reached the deferred-Present order, destroyed-queue, and concurrent Present checks. NVIDIA Gamescope aborted on teardown after the six child tests finished. An independent Gamescope run with onlysleep 1as the child also crashed during teardown.VkDeviceCreateInfo::enabledExtensionCount = 0creates a device successfully natively and under Wine. In all six Wine runs, the host trace addsVK_EXT_external_memory_dma_bufwithoutVK_KHR_external_memory_fdand the host Khronos layer reports the dependency VUID. This was absent in the six native controls. Wine 11.22 device-extension translationThe slot-70 diagnostic still applies cleanly to this merge. These runs use synthetic inputs. AI-assisted with OpenAI Codex.
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-11-30T02:30:27Z.
Follow-up for the RTX 5080 A/B. The combined diagnostic commit splits first uploads of deferred streaming textures by where backing was assigned: slot 70 before submission or Stage 2 during submission. Each log line gives backing operations, first uploads, source bytes, and the CPU-staged subset. The pending origin survives report boundaries and is consumed once on a successful upload. The combined patch applies cleanly to the original uninstrumented
32b9f4a3e+22e1349d7B tree.MEASURED I added the synthetic probe to merge
1ac6eea36(182d0c174+1aefed0da). All 12 Win64 clang-cl Release runs under Wine 11.22 reached the submission and descriptor retirement checks, with three runs per path and GPU (RTX 4070 SUPER and Radeon Raphael). Each run attributed one backing and one upload of 2,048 CPU-staged source bytes to the selected path. The other path emitted no attribution. The counter unit test also passed natively and as Win64 under Wine.The probe forces CPU staging and uses synthetic inputs. This adds a way to measure the two paths in a world-entry rerun. AI-assisted with OpenAI Codex.
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-11-30T07:48:46Z.
Independent offscreen guest-scene A/B for
1aefed0da, cleanly merged onto currentmaine1fe82f63(local merge treee8408f4e3). MEASURED on CachyOS, Wine 11.22, clang-cl 23.1.5 Release/MD, static SDL 3.4.20; RTX 4070 SUPER (NVIDIA 620.73.04) and Radeon 610M/Raphael (RADV 26.3.1).spirv-val-valid synthetic shaders. All runs used the same Windows SDK guest binary and both shader packs produced the same output on both runtimes.424a0ed99442a42a.Close()on both GPUs. SettingLEONIDA_D3D12_LISTS=pcfor both arms resolved that fixture issue, as proposed in #1541.This is an offline synthetic smoke test of the merged runtime and translator, using no game assets. Retail frame rate, VRAM behavior and sustained world loading remain outside this test.
AI-assisted with OpenAI Codex.
Imported from ubiquitarianism/leonida. Originally posted by ecox982745 on 2026-11-30T08:06:36Z.
Native RTX 4090 retest of the integrated float32 denorm fixture fix requested above. I rebuilt the stock M4 fixtures from
1aefed0damerged ontoe1fe82f63(treee8408f4e3) with no source or fixture edits. Windows 11, MSVC 19.44 Release, NVIDIA 616.64, Khronos Vulkan validation 1.4.369.d3d12_m4_computeandd3d12_m4_compute_async_small_waitsboth passed 3/3. Each run logged the RTX 4090 with validation on and matched all 1,924 output words against its CPU reference. Zero validation errors in the six runs.spirv-val --target-env vulkan1.2. Neither declaresDenormFlushToZero.This closes the requested stock-fixture retest on Ada and uses synthetic GPU input. Earlier failure and patch.
AI-assisted with OpenAI Codex (GPT-6.2 Sol).
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-11-30T08:55:32Z.
Cold retail boot comparison for
1aefed0daone1fe82f63(local merge treee8408f4e3). MEASURED on CachyOS, Wine 11.22, RTX 4070 SUPER 12 GiB, NVIDIA 620.73.04, private Gamescope/Xwayland with DRI3, 1280×720. Series S, sound off, RT acceleration structures off, fresh prefix, saves and pipeline caches per run. Both shader packs were independently rebuilt with wave64 emulation and 29,280 of 29,280 programs passedspirv-valin each. Both arms used the same fitted DirectStorage profile.mainmain+ #2566Every run traced the same null write (
0xc0000005) 29.69–30.88 s after the package splash. That signature matches the hang-watchdog description in running.md. The watchdog was left armed in all runs. VRAM above is whole-card startup usage, including idle desktop allocations. These runs establish a shared startup blocker on this recipe. World-load and gameplay performance remain unmeasured.AI-assisted with OpenAI Codex.
Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-11-30T09:42:19Z.
Pushed
efc192990(root-cause fix for@DadaCap's RTX 5080 60–120 stextures&shadowsregressions) and merged latestmandy/main(b8508a974, resolving thetests/semantic/test_interp_computed_ij_fallback.pyconflict with#2633cleanly).Root Causes Found & Fixed (
efc192990)title_memory_map::changed()broadcast storm (runtime/shims/xmem.cpp):sections_committed()returnstrueon Wine andfalseon native Windows 11. On Windows 11, every DirectStorage physical-page scatter transfer (dstorage.cpp→xmem.cpp:commit_pages_locked()) calledtitle_memory_map::changed()with no range ([0, UINTPTR_MAX]), waking all ~8,000 watched textures every submission (1.36Mwoken /1.05Mre-hashed unchanged /77kread-whole), invalidatingt.memory/t.write_combined_known+TextureVqCache+TitleTextureCells::arm_batch, and marking everyShadowPagespagekRequery.PageCommitBitsperSection(host_heap) andcoalesce_page_runs()(host_heap::vector) incommit_pages_locked()so already-committed /file_backed/ unmapped pages emit zero map changes, and newly committed mapped/table pages notify only their exact coalesced[lo, hi)ranges.shadows:read-only (not ours): 0 → 405–450 KiB/sub&aliased/ lock churn (runtime/src/title_geometry_watch.h,runtime/shims/d3d12_vulkan_device.cpp):TitleTextureCells::arm_batch()arms 64 KiB tilesPAGE_READONLYbeforerefresh_shadows(), causing non-aliasedShadowPagesoverlapping a guarded tile to seePAGE_READONLYwithkProtected == 0and re-copyCopy::read_onlyevery submission forever.geometry_writes::query_pages_guarded()(restricted toPAGE_READWRITE/PAGE_EXECUTE_READWRITErestores) so non-aliased/non-pinnedShadowPagesadoptkProtectedon guarded tiles after a single copy; addednote_external_reopen()forShadowPages::reopen_locked(); madeset_hot(..., true)/set_hot_batch(..., true)bumpCell::versionand emit targetedtitle_memory_map::changed(lo, hi); passedallow_hot = falseinShadowPages::update_aliased(); batchedtitle_frames::for_each_part()across the wholeShadowPages::copy_changed()job (16× fewer lock/refcount pairs per 64 KiB page).texturesburst & O(N) overhead (runtime/src/title_texture_refresh.h,runtime/shims/d3d12_vulkan_device.cpp):DeviceState::title_partial_bytesincrementally (eliminating O(N)title_texturesscan per pass), removed redundant uncachedtitle_texture_readable()/is_write_combined()VirtualQuerycalls on table-backed pages, keptt.fillsguard onmc.written_tilesso never-filled textures never upload partial mirror data, and addedTitleStreamBudget(LEONIDA_TITLE_STREAM_BUDGET_MB, default16MiB,0= unlimited) bounding unmapped first-time streamed uploads / partial-mip upgrades withwatch.touch(t.address)deferral while never deferring mapped video planes or dynamic updates.Verification (AI-assisted: implemented & audited via 2 rounds of independent read-only adversarial review,
VERDICT: CLEAN)MESA_VK_DEVICE_SELECT='1002:164e!', AMD Raphael iGPU, Mesa RADV):155/155CTests PASS (153passed,2skipped:shader_library_corpus,vk_sync_validation).clang-cl + xwin) + Wine on Raphael iGPU:14/14targeted tests PASS (xmem,xmem_no_write_watch,xmem_write_watch,xmem_wine_commit,xmem_pool_zero_read,d3d12_existing_heap,d3d12_existing_heap_no_write_watch,d3d12_existing_heap_write_watch,d3d12_xmem_placed,title_texture_refresh,title_texture_watch,queue_holds,submit_frame,vk_gpu_profile), including new regression tests for targetedcommit_physical_pagesnotifications,ShadowPagesadoptinggeometry_writesguards +set_hot/ aliased-peer invalidation +note_external_reopen, andTitleStreamBudget/coalesce_page_runs/PageCommitBits.tests/test_ctest_registration.py(14/14),tests/semantic/test_interp_computed_ij_fallback.py(9/9),scripts/check_no_game_data.py: PASS.Ready for a fresh native Windows 11 A/B re-run (
@DadaCap/@merzleckeier)!Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-11-30T09:54:05Z.
Independent native-Windows check of the XMem notification change in
b8508a974(includesefc192990). This used a GitHub-hosted Windows Server 2025 Datacenter runner, build 26100, MSVC 19.52.37029 x64 Release. Completed Windows jobCurrent head:
xmem,xmem_no_write_watch,xmem_write_watchandtitle_texture_refreshpassed 4/4.Negative control: I restored only
runtime/shims/xmem.cppfrom1aefed0da, the revision beforeefc192990, and rebuilt against the new tests. Exactly three assertions failed. Unmapped commits broadcast a map change, mapped commits invalidated an unrelated VA, and repeat commits notified again. This isolates the native notification change from the test and streaming-policy code.Wine 11.22 check: the same 4/7 targeted CTest entries passed before and after. The three full
xmemvariants had the same failure in the unrelated 512-page commit-charge assertion on both trees. Linuxtitle_texture_refreshalso passed with ASan and UBSan.This covers synthetic memory and policy tests on native Windows and Wine. The RTX 5080 in-game texture and shadow performance still needs its own A/B.
AI-assisted: yes (OpenAI Codex).
Imported from ubiquitarianism/leonida. Originally posted by ecox982745 on 2026-11-30T10:10:15Z.
Native Windows texture verification after
efc192990. Tested PR head70ea7d6ecmerged with1b0f657f3(treebe66afc1). Clean MSVC 19.44 Release build, Windows 11 build 26300, RTX 4090 on NVIDIA 616.64, Khronos Vulkan validation 1.4.369.0)d3d12_existing_heap_test --partial-mipsd3d12_existing_heap_test --gpu-copied-texturesd3d12_existing_heap_test --mapped-plane-asyncAll 18 GPU processes selected the RTX 4090 with validation on and passed without validation diagnostics. The partial-mip and copied-texture logs show both the host-copy and forced-staging checks ran, including the min-LOD upgrade and partial-copy mip preservation. The separate
title_texture_refreshCPU fixture, which exercises the budget policy at its limits, also passed 3/3. These fixtures check correctness. They leave retail frame timing and streaming-burst behavior to the in-game A/B.AI-assisted with OpenAI Codex (GPT-6.2 Sol).
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-11-30T10:15:01Z.
Independent slot-133 shadow readback on Wine. I merged
70ea7d6econto1b0f657f3(treebe66afc1b) and rebuilt with clang-cl 23.1.5 Release. On each GPU,d3d12_existing_heappassed with write watch default, forced off and forced on, andtitle_mirror_hot_coldpassed. The focused single-tile and batch checks also passed.For the batch check I extended the existing guard fixture to reopen two adjacent 64 KiB guards with one
set_hot_batchcall, then wrote distinct synthetic bytes into each region before the next Vulkan readback. The journal recorded exactly one 128 KiB range and the readback matched byte for byte. A separate two-entry batch reopened the second host view of an aliased tile. A write through that view reached the next Vulkan readback from the original view.set_hot_batch+0x2000.+0x11000.CachyOS, Wine 11.22 (Wayland), RTX 4070 SUPER (620.73.04) and Radeon 610M/Raphael (RADV 26.3.1). Synthetic memory only. This complements the separate native Windows texture checks. The RTX 5080 gameplay A/B is still open. AI-assisted with OpenAI Codex.
Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-11-30T10:24:07Z.
Merging with 8/8 CI checks green (
Runtime/windows7m54s,CI/check14m,CI/linux-python-and-viewer5m45s,CI/semantic-tests4m33s,Runtime/linux-gpu-tools4m28s,jactionlint19s,No Game Data15s) and independent verification + negative controls across Windows Server 2025, Windows 11 RTX 4090, CachyOS RTX 4070 SUPER / Radeon 610M, and RX 7900 XTX. Huge thanks to@DadaCapfor the RTX 5080 A/B data that surfaced the Windows 11commit_pages_lockedbroadcast storm andShadowPages/TitleTextureCellsguard interaction, and to@merzleckeier,@ecox982745,@zmasi, and@Tauwnifor the thorough cross-GPU/OS verification and negative controls!Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-11-30T10:30:38Z.
Post-merge stream-budget retry check on
main012b79a67. I added a local mode tod3d12_existing_heap_testthat creates three pending 1024×2048 R8 slot-70 views (2 MiB each) over reserved memory. It commits all three together, writes synthetic bytes, and issues one texel-write notification. The fixture forces staged Vulkan uploads and counts populated bindless descriptors after each fenced queue submission. It does no further CPU writes or descriptor rewrites.0)watch.touch(t.address)from the budget-deferral branchPreviously published descriptors kept their indices. The stock
title_texture_refresh_testalso passed. The focused test covers initial progress when one texture is larger than the limit and automatic retry of the rest. The negative control was built locally from the same runtime and fixture.Both GPUs gave the same results on CachyOS, Wine 11.22 (Wayland), clang-cl 23.1.5 Release. RTX 4070 SUPER (620.73.04) and Radeon 610M/Raphael (RADV 26.3.1). Synthetic textures only. AI-assisted with OpenAI Codex.