d3d12: compile runtime SM 5.1 shaders via app-local DXC on Wine (D3D12-LINUX-DXC-RUNTIME-SHADERS) #2642
Code
Clone this repository
Checkout
From your project repository, check out a new branch and test the changes.
git fetch -u origin "github-pr/2642:github-pr/2642" git switch "github-pr/2642"
Open
leonida/mandy
zmasi wants to merge 13 commits from
github-pr/2642 into main
pull from: github-pr/2642
merge into: leonida:main
leonida:main
leonida:github-pr/3295
leonida:beta
leonida:docs/changelog-3483-3500
leonida:github-pr/3294
leonida:github-pr/2975
leonida:github-pr/2815
leonida:feat/gate-driver-start
leonida:feat/skip-pipelines-release
leonida:perf/lazy-compare
leonida:perf/mwaitx-wait
leonida:test/prio-ceiling-main
leonida:fix/ab-cpu-stdout
leonida:fix/gate-old-crashes
leonida:diag/ab-cpu
leonida:test/main-0312
leonida:github-pr/3291
leonida:diag/indirect-clamp-census
leonida:feat/barrier-enhanced
leonida:perf/texture-frame-ceiling
leonida:perf/dstorage-threads
leonida:fix/console-queue-dma-tables
leonida:fix/port-descriptors-record-parts
leonida:fix/frame-waits-fence
leonida:fix/console-sampler-words
leonida:fix/graphics-userdata-spill
leonida:fix/xg-reserved-layout-rotation
leonida:fix/barrier-console-flags
leonida:fix/switches-wait-test-child
leonida:test/list-value-waits
leonida:test/lot-gxdk-0412
leonida:fix/bvh-compacted-size
leonida:docs/i18n-quickstarts
leonida:feat/native-pipeline-slots
leonida:fix/clippy-leonida-gpu
leonida:fix/list-value-producers
leonida:fix/descriptor-page-straddle
leonida:fix/xmem-low-window
leonida:fix/ffx-jitter-never-zero
leonida:fix/run-stdout-closed
leonida:github-pr/2892
leonida:github-pr/2896
leonida:feat/warm-save-every
leonida:github-pr/2980
leonida:github-pr/2994
leonida:github-pr/3005
leonida:github-pr/3010
leonida:github-pr/3136
leonida:github-pr/3303
leonida:github-pr/3220
leonida:github-pr/3143
leonida:github-pr/3330
leonida:github-pr/3226
leonida:github-pr/3187
leonida:carry/3395
leonida:github-pr/2946
leonida:github-pr/2947
leonida:github-pr/2945
leonida:github-pr/2983
leonida:github-pr/3001
leonida:github-pr/3372
leonida:github-pr/3128
leonida:github-pr/3296
leonida:github-pr/2588
leonida:github-pr/3119
leonida:github-pr/3378
leonida:fix/crash-diagnostics
leonida:feat/dlss-mip-bias
leonida:fix/retired-out-of-order
leonida:fix/dxr-postbuild-barrier
leonida:fix/amd-relay-default
leonida:fix/removed-report-wait
leonida:feat/heap-twin
leonida:feat/vram-margin
leonida:github-pr/2472
leonida:github-pr/3123
leonida:github-pr/3088
leonida:assets/annonce-v1
leonida:github-pr/2794
leonida:github-pr/3300
leonida:github-pr/3304
leonida:github-pr/3308
leonida:github-pr/3367
leonida:github-pr/3369
leonida:fix/launcher-dlss-diagnostics
leonida:github-pr/3269
leonida:github-pr/2957
leonida:github-pr/3205
leonida:fix/crash-zero-guard
leonida:github-pr/3185
leonida:github-pr/3099
leonida:github-pr/3104
leonida:github-pr/3348
leonida:github-pr/3379
leonida:github-pr/3377
leonida:perf/darner-title-priority-ceiling
leonida:github-pr/3376
leonida:gh-readonly-queue/main/pr-3311-b5c45b663dbc5a9c3532bb3f307e5f81b32faefa
leonida:gh-readonly-queue/main/pr-3088-af22e7847ff5808f72d1a1881c24be2fafd20b54
leonida:gh-readonly-queue/main/pr-3123-7f3fa026a94c6646e89244f28e1ce22290361867
leonida:github-pr/3373
leonida:github-pr/3368
leonida:github-pr/3198
leonida:gh-readonly-queue/main/pr-3354-637baa0b77ba47222e7280b17c1a59c6a1781d57
leonida:gh-readonly-queue/main/pr-3365-d7a0e0196a43834813014b4bd3aa5502a8263b14
leonida:gh-readonly-queue/main/pr-3361-5dfe8bbd05ed12fb2f2e1718d9af77a7c5f46fd8
leonida:gh-readonly-queue/main/pr-3366-8da9148204e9d12c585efa9ac2b7cc1ab08c7682
leonida:github-pr/3346
leonida:github-pr/3375
leonida:github-pr/2958
leonida:github-pr/3151
leonida:github-pr/3307
leonida:github-pr/3278
leonida:github-pr/3374
leonida:fix/runtime-test-conservative-fixtures
leonida:github-pr/3366
leonida:ci/shard-semantic-linux
leonida:github-pr/3354
leonida:docs/fg-limit-fps-switch
leonida:github-pr/3365
leonida:fix/read-file-hard-link
leonida:github-pr/3364
leonida:fix/book-slot-heap-never-read
leonida:github-pr/3361
leonida:github-pr/3263
leonida:github-pr/3360
leonida:github-pr/3353
leonida:github-pr/3331
leonida:fix/alias-later-queued-submissions
leonida:github-pr/3352
leonida:github-pr/3228
leonida:github-pr/3349
leonida:claude/gallant-sagan-aamatr
leonida:github-pr/3200
leonida:github-pr/3132
leonida:github-pr/3323
leonida:github-pr/3332
leonida:github-pr/3340
leonida:github-pr/3311
leonida:github-pr/3334
leonida:github-pr/3297
leonida:github-pr/3256
leonida:github-pr/2567
leonida:github-pr/2851
leonida:d3d12/agility-sdk-621
leonida:github-pr/3164
leonida:github-pr/3114
leonida:github-pr/3050
leonida:github-pr/3113
leonida:github-pr/3326
leonida:github-pr/3144
leonida:github-pr/3072
leonida:github-pr/2789
leonida:github-pr/2643
leonida:github-pr/3009
leonida:github-pr/3035
leonida:github-pr/3031
leonida:github-pr/2686
leonida:github-pr/2834
leonida:github-pr/3321
leonida:github-pr/3325
leonida:github-pr/3290
leonida:github-pr/3324
leonida:github-pr/3130
leonida:claude/fervent-curie-m19lnr
leonida:github-pr/3309
leonida:github-pr/3305
leonida:github-pr/3306
leonida:github-pr/3302
leonida:github-pr/3301
leonida:github-pr/3345
leonida:github-pr/3211
leonida:github-pr/3027
leonida:github-pr/3286
leonida:github-pr/3235
leonida:github-pr/3265
leonida:github-pr/3275
leonida:codex/skip-no-hit-ray-passes
leonida:github-pr/2823
leonida:github-pr/2911
leonida:github-pr/3262
leonida:github-pr/3125
leonida:github-pr/3206
leonida:github-pr/3250
leonida:github-pr/3238
leonida:github-pr/3188
leonida:github-pr/2952
leonida:github-pr/3217
leonida:github-pr/3168
leonida:t3/preserve-fsr-sdk-restart-path
leonida:t3/propagate-host-failure-hresult
leonida:github-pr/3209
leonida:t3/launcher-custom-parameters
leonida:github-pr/3207
leonida:github-pr/3183
leonida:github-pr/3160
leonida:github-pr/3201
leonida:ci/less-to-run
leonida:github-pr/2930
leonida:github-pr/2797
leonida:github-pr/2999
leonida:perf/native-compute-shader-forms
leonida:github-pr/3191
leonida:github-pr/3011
leonida:github-pr/3019
leonida:github-pr/2996
leonida:gh-readonly-queue/main/pr-2789-45dc41f95c1cd0dcc29c2c50582e0e9af8a77259
leonida:claude/blissful-franklin-ukp7ag
leonida:github-pr/3141
leonida:github-pr/3156
leonida:github-pr/3150
leonida:github-pr/3153
leonida:github-pr/3163
leonida:github-pr/3142
leonida:github-pr/3139
leonida:github-pr/2841
leonida:github-pr/3069
leonida:github-pr/3098
leonida:github-pr/3107
leonida:github-pr/3071
leonida:github-pr/2774
leonida:github-pr/2889
leonida:github-pr/3075
leonida:github-pr/2661
leonida:github-pr/3064
leonida:github-pr/3054
leonida:github-pr/3049
leonida:github-pr/2855
leonida:github-pr/2943
leonida:github-pr/3016
leonida:github-pr/2887
leonida:github-pr/3006
leonida:github-pr/3003
leonida:github-pr/2993
leonida:notes/card-time-and-plant-flicker
leonida:github-pr/2989
leonida:feat/vulkan-rs
leonida:github-pr/2985
leonida:github-pr/2951
leonida:github-pr/2982
leonida:github-pr/752
leonida:github-pr/792
leonida:github-pr/2877
leonida:github-pr/2654
leonida:github-pr/2893
leonida:github-pr/2948
leonida:github-pr/2944
leonida:github-pr/2919
leonida:github-pr/2915
leonida:archive/ci/less-to-run/20261202T1121Z
leonida:github-pr/2800
leonida:github-pr/2822
leonida:github-pr/2833
leonida:github-pr/2840
leonida:github-pr/2831
leonida:github-pr/2832
leonida:github-pr/2801
leonida:github-pr/2890
leonida:github-pr/2891
leonida:github-pr/2664
leonida:github-pr/2807
leonida:rt-call-trace
leonida:github-pr/2755
leonida:perf/ahead-split
leonida:github-pr/2587
leonida:github-pr/2698
leonida:github-pr/2609
leonida:github-pr/3219
leonida:docs/readme-runtime-proposal
leonida:github-pr/2017
leonida:github-pr/1741
leonida:github-pr/1667
leonida:codex/coord-claim-check-20261124-7e48
No reviewers
Assignees
Clear assignees
No assignees
Labels
Clear labels
bug
Something isn't working
dependencies
Pull requests that update a dependency file
documentation
Improvements or additions to documentation
enhancement
New feature or request
missing claim
Needs a claim in #14
needs rebase
Conflicts with the base branch: rebase it on main
needs-triage
Needs maintainer evaluation before the next triage state
question
Further information is requested
ready-for-agent
Fully specified and ready for an AFK agent
submodules
Pull requests that update submodules code
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
Projects
Clear projects
No items
No project
Milestone
Clear milestone
No items
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Reference
leonida/mandy!2642
Loading…
Reference in a new issue
No description provided.
Delete branch "github-pr/2642"
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?
This branch is out-of-date with the base branch
Reviewers 0 approvals
Details
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Claimed in #2570:
D3D12-LINUX-DXC-RUNTIME-SHADERS(https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7250675174)Summary
Implements
D3D12-LINUX-DXC-RUNTIME-SHADERSacrossd3d12/crates/leonida-gpu,d3d12/README.md, andd3d12/docs/switches.md:compiler.rs,lib.rs,d3d12/README.md):compiler::compile_named. On native Windows (wine_get_versionabsent onntdll.dll), every shader continues to compile via systemD3DCompilewith its original profile and flags untouched.dxc_profile_for), whenflags & !D3DCOMPILE_ENABLE_UNBOUNDED_DESCRIPTOR_TABLES == 0and the target iscs_5_1,ps_5_1, orvs_5_1,compile_namedloadsdxcompiler.dll, preloadsdxil.dllfrom the executable's own directory usingLOAD_LIBRARY_SEARCH_DLL_LOAD_DIR | LOAD_LIBRARY_SEARCH_SYSTEM32, creates and cachesIDxcCompiler3once behind aMutex, and compiles ascs_6_0/ps_6_0/vs_6_0(-HV 2016 -flegacy-macro-expansion -O1), preserving[RootSignature(...)]blobs, atomics, and unbounded descriptor arrays that Wine's built-in FXC strips or rejects.compiler.rswarns once and falls back to FXC; once DXC is loaded, compile errors extract UTF-8 diagnostics viaIDxcResult::GetOutput::<IDxcBlobUtf8>(DXC_OUT_ERRORS, ...)(withGetErrorBufferfallback, or an explicit{hr:#010x}status message when diagnostic blobs are empty), logtracing::warn!("DXC: ..."), and returnErrdirectly without retrying Wine's FXC.[RootSignature]shaders throughcompiler::compile_named(host.rs,compose.rs,host/trainer.rs,indirect.rs,indirect/bench.rs,inplace.rs,replay/play/merge.rs):host::compile(coveringambient.rs,descriptor/host.rs,host.rsdepth planes,host/awake.rs,host/card_steps.rs,host/send.rs,host/upcheck.rs,resource.rs, andtiles.rs),Host::make_card_work(CARD_COMPARE),compose::compile_source(Composer::new),host::trainer::compile(F4 trainer overlay),indirect(WIDE_PROBE, argument clamp, andindirect::bench),inplace::Rig::shade(LEONIDA_INPLACE_PROBE), andreplay::play::merge(Player::set_merging) throughcompiler::compile_named, leavingcompiler.rsas the sole non-testD3DCompilecaller ind3d12/(texture.rsalias_cast_testsandtests/replay.rsare test-only).compiler/tests.rs,d3d12/docs/switches.md):LEONIDA_TEST_DXC_DIRand compiler tests ind3d12/crates/leonida-gpu/src/compiler/tests.rs(classified under## Only in testsind3d12/docs/switches.md), covering the Wine/native routing table (dxc_profile_for), empty-error-blobHRESULTlogging (dxc_status_error),CARD_COMPAREFXC/DXC PSO + UTF-8 error diagnostics, and hardware D3D12 compute dispatch + readback (compiled_compute_shader_dispatches_and_reads_back_on_fxc_and_dxc) across both FXCcs_5_1and signed DXCcs_6_0with macro-concatenated[RootSignature], root constants, root UAV, and an unboundedByteAddressBuffer[]descriptor table.ambient_readback.rsandtests/replay.rschanges removed for a separate follow-up PR per review).Verification
164506d01) merged withorigin/main(b41763227) on Windows 11 Pro10.0.26200+ NVIDIA GeForce RTX 3090 (driver610.88) + Windows SDK DXC (dxcompiler.dll+dxil.dll):cargo test --locked --target x86_64-pc-windows-msvc -p leonida-gpu --lib compiler::and--features diagnostics --lib compiler::->5/5passed on both (including hardware D3D12 compute dispatch + readback on both FXCcs_5_1and DXCcs_6_0).cargo test --locked --target x86_64-pc-windows-msvc -p leonida-gpu --features diagnostics --libonthe_composer_compiles_with_and_without_the_nan_clamp,trainer_menu_shaders_compile_with_embedded_root_signature,inplace_probe_shader_compiles_with_embedded_root_signature, andmerge_shader_compiles_with_embedded_root_signature->4/4passed.cargo test --locked --target x86_64-pc-windows-msvc -p leonida-gpu --features diagnostics --test replay->1/1passed (a_frame_is_recorded_and_replayedon stockmaintests/replay.rs).cargo clippy --locked --target x86_64-pc-windows-msvc -p leonida-gpu [--features diagnostics] --all-targets --no-deps->0warnings in all new/modified hunks (0warnings crate-wide in default build).python -I tools/d3d12_switches.py --check d3d12/docs/switches.md,python -I tests/test_d3d12_switches.py(20/20),python -I tests/test_text_write_line_endings.py(3/3), andpython -I scripts/check_no_game_data.py-> all exit0.1.9.2609.5,WINEDLLOVERRIDES=d3dcompiler_47=b->0device-lost/crashes,0two-plane composer not madeerrors (vs1,334and black picture onmain),0DXC:warnings.1.9.2609->20/20runtime helpers compiled,DROPPED indirect2,400–3,700/frame -> 0.1.9.2609-> routing matrix and DXC root-signature/diagnostic checks passed across both adapters.GPUs tested: NVIDIA GeForce RTX 3090 24 GB (Windows 11 Pro
10.0.26200, driver 610.88, Windows SDK DXC); prior Linux Wine / VKD3D-Proton verification on AMD Radeon Pro Vega II (RADV 26.0.8), NVIDIA GeForce RTX 4050 Laptop (580.196.07), NVIDIA GeForce RTX 4070 SUPER & AMD Radeon Raphael (620.73.04 / RADV 26.3.1), and NVIDIA GeForce RTX 4090 (620.73.04).AI-assisted: yes — authored with OpenAI Codex / Claude Opus on initial branch commits, updated on this head with Gemini 4 Carbon (High), and independently reviewed in read-only mode on this head by Gemini 4 Neon (XHigh) (
opus-systems-critic).Checklist
mainand merges cleanly.CONTRIBUTING.md), including in logs or reports quoted here.docs/design.md, with how it was confirmed. (n/a: runtime HLSL compilation only)AI-assisted: yes (AI agent of a human operator, on an independent RTX 4090 Wine fork).
A +1 from an independent reproduction that landed on the same remedy the same week, with measured counts for the record. No stake beyond the symptom: our own branch is retired in favour of yours.
Offline (Wine 11.23 in a container, no GPU, no game files), over the 20 HLSL variants the runtime compiles for itself at run time (argument clamp, batched clamp, wide probe, card compare/gather/scatter, awake check, upload check, plane corners/floats/steps, inplace read, trainer vs/ps, six ambient passes): 15 of 20 fail under Wine's builtin
d3dcompiler_47— exactly the ones with raw-buffer member methods (E5005: Method 'InterlockedOr' is not defined on type 'RWByteAddressBuffer'., same forLoad4, andE5005: Function "isnan" is not defined.) — and the builtin also accepts[RootSignature(...)]while leavingRTS0out of the container, soCreateRootSignaturefails on code that compiled. The 5 that pass have neither a raw-buffer member nor a declared root signature — a split that lines up exactly with the sources yourwine_get_version+*_5_1+ flags-mask gate routes to DXC.Live (RTX 4090, driver 620.73.04, Wine 11.23, app-local
dxcompiler.dll+dxil.dll): with the fallback in, the five compile-failure WARN families disappear, the argument clamp comes alive andDROPPED indirectgoes from 2,400–3,700 per frame to 0, and the world renders lit where every earlier window showed a black world with perfect menus — menus and cinematics are drawn direct, which is why they looked fine all along. In one normal play window the fallback fires 12 times: 8 × compiled code holding no root signature the source declares, 2 ×isnan, 1 ×Load4, 1 ×InterlockedOr.One small design note from our tree: report "no app-local DXC found" apart from "DXC refused this source" — one combined message that always blamed the file sent us hunting for a DLL that was already loaded.
Thank you @z3r0rc for the independent Wine 11.23 + RTX 4090 reproduction (
15/20runtime HLSL variants,2,400–3,700 -> 0dropped indirects per frame) and for retiring the duplicate branch in favour of this PR!Confirmed on your diagnostic note as well:
compiler.rs(9075a5e419, lines 66–77 andcompile_dxc) separates those two failure modes — missing/unloadabledxcompiler.dll+dxil.dlllogs"app-local DXC unavailable; using FXC on Wine (embedded root signatures may be missing)"once in theLazyLockinitializer and falls back toD3DCompile, whereas a loaded DXC rejecting HLSL extractsIDxcBlobUtf8(DXC_OUT_ERRORS) and logs"DXC: ..."directly without falling back or blaming DLL discovery.AI-assisted.
Follow-up covering the graphics and diagnostic paths of
9075a5e41merged onto7bbc1d22(34fc022c). CachyOS, Wine 11.22, VKD3D-Proton71cae091, RTX 4070 SUPER (620.73.04) and Radeon Raphael (RADV 26.3.1). Microsoft DXC 1.9.2609MEASURED. With the matching pair beside the unchanged test executable, five cases per GPU switched from failing to passing. They cover
CARD_COMPAREand the unbounded root signature, display-plane composition, the trainer overlay, fog readback, and the offscreen unbounded texture table. The table test readfixed=1024 other=1765on both GPUs. On RADV, a compiler-only directory and a pair in the working directory alone both reproduced the representative FXC fallback failure. The full recorder/replay test stopped at the native command-list identity check in both arms.MEASURED, diagnostic unit test. The existing test that checks
Error::message()failed 3/3 per GPU even with the pair loaded. A local probe printedleonida.hlsl:1:12: error: expected parameter declaratorfromdxc_errorsbeforeError::new, followed by the genericCall failed.fromError::message().I put a small follow-up on my fork. The test checks the failed DXC status and the diagnostic text directly from
IDxcResult. The runtime still logs the detailed text and returns the same Windows result as before. This passed 3/3 per GPU, and the five working cases above stayed green on both GPUs. Test fixe32fa8b49Synthetic fixtures only. AI-assisted with OpenAI Codex.
Thank you @merzleckeier for testing the graphics, trainer, composition, fog readback, and unbounded-table paths across RTX 4070 SUPER and Radeon Raphael under Wine 11.22, and for isolating the Wine
Error::message()behavior indxc_compiles_card_compare_with_embedded_root_signature_and_utf8_errors!Folded in your
invoke_dxc/test_dxc_factorycheck (also probingload_dxc()beside the test executable before Windows Kits, and keeping anis_err()check oncompile_dxc) and verifiedcompiler::tests(2/2) on Windows 11 + RTX 3090 + Windows SDK DXC.AI-assisted.
Thanks for folding in the diagnostic check. I retested
603845afabfand9075a5e419on the same base (a84c41909b) with Wine 11.22 and VKD3D-Proton 3.2 (71cae091). I used the x64 DXC1.9.2609pair and selected one Vulkan ICD per process. The adapters were RTX 4070 SUPER (NVIDIA 620.73.04) and Radeon Raphael (RADV 26.3.1).LEONIDA_TEST_DXC_DIRunset,9075a5e419printed the DXC skip marker on both adapters (1 run each).603845afabfexecuted and passed the DXC root-signature/invalid-HLSL diagnostic test 3/3 times per adapter, with no skip marker.603845afabf. Both readbacks ran on the selected device.LEONIDA_TEST_DXC_DIRran the diagnostic test successfully. In a separate process with the same placement, the runtime-facing compiler test still hit the existing Wine FXC fallback error (0x80004005), consistent with the override's test-only scope.Offline, synthetic fixtures only. AI-assisted with OpenAI Codex.
Tested
603845afamerged (no commit) withmain060c47160: Windows 11, Rust toolchain fromd3d12/rust-toolchain.toml, CPU only, no game run.cargo test -p leonida-gpu --locked:main549 passed, 47 ignored; with this PR 553 passed, 48 ignored, 0 failed.cargo clippy -p leonida-gpu --locked -- -D warnings: 10 findings onmainand the same 10 with the PR (all inleonida-luaandleonida-shader); this PR adds none.mainand does not force a rebase of #2566.AI-assisted (Claude Code).
A Linux/NVIDIA data point from a machine that went through this exact wall: on Wine the builtin d3dcompiler_47 (vendored vkd3d-shader 2.1) refuses every runtime HLSL helper this tree compiles — no RWByteAddressBuffer member methods (E5005),
[RootSignature]/RTS0 dropped. Five WARN families sit in every log, and the consequence is a black world with fine menus: 2,400-3,700 indirect draws dropped per frame means the world-fill passes never run. Our interim fallback (system D3DCompile*_5_1first, app-local DXC*_6_0on refusal or missing RTS0, sources byte-identical) turns it into a lit, drivable world: 20/20 runtime helpers compile with an app-local dxcompiler.dll (DXC 1.9.2609),DROPPED indirectgoes to zero, and the same exe and env swing between the black world and 28-30 fps. Your app-local DXC shape is right — please land it; we will delete our local fallback the day it does.The full measured env baseline for Linux play is posted on #2577. AI-assisted comment; measured logs (RTX 4090, NVIDIA 620.73.04, Wine 11.23, VKD3D-Proton master).
Tested on Linux/NVIDIA without Microsoft's
d3dcompiler_47.dll:8db6aca2amerged (locally, nothing pushed) intomainf37c4a87d, against plainf37c4a87d. Both runs forced Wine's built-in compiler (WINEDLLOVERRIDES=d3dcompiler_47=b), same save and settings (scripts/play-linux.shdefaults,LEONIDA_SKIP_BINK=1), 180 s each.Setup: RTX 4050 Laptop 6 GB, NVIDIA 580.196.07, Fedora 44, Wine 11.21 Staging, VKD3D-Proton 3.2.0 (
71cae091b06571e+). Built with--target x86_64-pc-windows-gnullvm. DXC: the x64dxcompiler.dll+dxil.dllpair 1.9.2609.5 from a Microsoft DirectXShaderCompiler release, copied next toleonida.exe.maintwo-plane composer not made; showing base plane only error=Call failed. (0x80004005)With the PR the intro and the first scene look as they do with the native
d3dcompiler_47(which is what Linux users have needed until now to get any picture). One run each.AI-assisted: yes (Claude Code, Claude Opus 5.5): the runs, logs and this comment.
This pull request touches the render path, so it needs an in-game run before it can be merged: unit tests and CI do not catch rendering regressions (a device loss after an earlier merge is why this gate exists).
Could you, or anyone with a working setup, post a run report on the current head merged onto current
main:mainSHA it was merged onto;mainalone for comparison, if you can.Please do not attach logs or screenshots that show game content. If a run on this exact head is already posted, a link to it in a reply is enough.
AI-assisted (Claude Code).
In-game run on the current head for the render-path gate:
30b1e2984merged (locally, nothing pushed) ontomain21843cef0(merge commite8c818908). One run, 420 s.71cae091b06571e+), built with--target x86_64-pc-windows-gnullvm. DXC: the x64dxcompiler.dll+dxil.dllpair 1.9.2609.5 from a Microsoft release, next toleonida.exe. Wine's built-in compiler forced (WINEDLLOVERRIDES=d3dcompiler_47=b),LEONIDA_SKIP_BINK=1, otherwisescripts/play-linux.shdefaults, same save copy.two-plane composer not madelines and 0DXC unavailable/DXC:warnings. The other WARN families in the log (descriptor-view records, pipeline methods not implemented, texture re-upload checks) are not from the compiler and are not new to this PR.mainalone: not repeated on this SHA, so no new comparison. My earlier 180 s run of this PR againstmainf37c4a87d(the comment above) had 1,334 composer failures and a black picture onmain, and 0 failures and a normal picture with the PR.AI-assisted: yes (Claude Code, Claude Sonnet 5.5): the build, the run, the log reading and this comment.
Verification of #2642 (D3D12-LINUX-DXC-RUNTIME-SHADERS): third-party code review on Linux x86_64. The code was not built:
leonida-gpuis Windows-only (Wine/VKD3D-Proton not run here).ccf43e4c0, merge base5b1fff821. It merges cleanly intomain45dc41f95. 14 files. CI passes on this head (6/6). The last code commit is603845af; the commits after it are merges ofmainand regenerations ofswitches.md.Commands and results
python -I tests/test_d3d12_switches.pyon the merge: 20 tests, OK.python -I scripts/check_no_game_data.pyoncompiler.rs,ambient_readback.rs,tests/replay.rs,README.mdandswitches.md: clean.Review
compiler.rs: native Windows still callsD3DCompilewith unchanged flags and profiles. On Wine, onlycs/ps/vs_5_1with flags at mostENABLE_UNBOUNDED_DESCRIPTOR_TABLESgo to DXC*_6_0. The DLLs are loaded by absolute path withLOAD_LIBRARY_SEARCH_DLL_LOAD_DIR | SYSTEM32. A missing DXC is logged once and the code falls back to FXC. This is sound.compiler.rs:56-79: a DXC compile error on Wine returnsErrand does not fall back to FXC. The fallback only covers a DLL that failed to load. That may be intended, but the PR body and README say the code "uses FXC" whenever DXC is unavailable.compiler.rs:143-147: every compile creates a newIDxcCompiler3. This is not a hot path, but the instance could be cached next to the factory.compiler.rs:163-168: a failed status with no error text returns without logging anything.tests/replay.rs: the explicitNON_PIXEL_SHADER_RESOURCE -> COPY_DESTbarrier onshared.0is correct, because a buffer promoted to a read state cannot be promoted implicitly toCOPY_DESTin the same submission. However,a_frame_is_recorded_and_replayednow asserts (fails) on a VKD3D-Proton device (requires_native_lists, L1798) where it used to run. Any Wine test runner that includes this test will now go red. A skip with a message would match the "no adapter: skipped" style.switches.md:LEONIDA_TEST_DXC_DIRgoes into the main table instead of "Only in tests", because the generator reads it from a#[cfg(test)]function in a non-test file.Process
ambient_readback.rs), changes the replay test (awith_meshtoggle, an adapter-selected offscreen test, VKD3D interop detection) and fixes a barrier. CONTRIBUTING.md asks for one topic per pull request. The test infrastructure would review more easily as a follow-up.AI-assisted: yesbut does not name the models or the reviewer agent's model (CONTRIBUTING.md).9075a5e41.Verdict: defects (scope, disclosure, and the replay test now fails under VKD3D instead of skipping). The compiler routing itself looks correct.
AI-assisted verification: Claude Opus (Claude Code), separate agent per batch.
Generated by Claude Code
Thanks @MoonEyes for the detailed code review! Addressed every point in
164506d01c(merged with currentorigin/main):replaytest (CONTRIBUTING.md): removedambient_readback.rs, prunedcompile_runtime_hlsl, and restoredd3d12/crates/leonida-gpu/tests/replay.rstoorigin/main(0diff, soa_frame_is_recorded_and_replayedbehaves identically tomainunder VKD3D-Proton and any test-infrastructure updates can go in a separate PR).IDxcCompiler3caching (compiler.rs): created once insideload_dxc_fromand cached behindDxc { compiler: Mutex<SendCompiler> }alongsideIDxcUtils(freeing both DLL handles on any failed load/export/instance step).compiler.rs,d3d12/README.md): addeddxc_status_error+.inspect_errlogging so failed DXC compiles with empty error blobs still logtracing::warn!("DXC: ... ({hr:#010x})"), and alignedd3d12/README.mdwith actual behavior (falls back to FXC only when the app-local DXC pair is absent or cannot be loaded).switches.mdplacement & hardware dispatch/readback test (compiler/tests.rs): movedLEONIDA_TEST_DXC_DIRand compiler tests intosrc/compiler/tests.rssotools/d3d12_switches.pyplacesLEONIDA_TEST_DXC_DIRunder## Only in tests, and addedcompiled_compute_shader_dispatches_and_reads_back_on_fxc_and_dxctesting hardware D3D12 compute dispatch + readback across both FXCcs_5_1and signed DXCcs_6_0(5/5compiler::tests +4/4caller shader tests +1/1--test replay+20/20test_d3d12_switches.pypassing).CONTRIBUTING.md): updated the PR description'sAI-assisted:line to name the authoring and independent read-only reviewer models.RUN (in game, batch of nine pull requests), each head merged with
git merge --no-ffonto main81efe4566, in one build: #313674bd1bcd4, #315653c3100ce, #3206d024194b3, #3248efd21d867, #3256e7aad1d4c, #32623643c2879, #2851b83b0b375, #312589bf1d328, #2642164506d01. RTX 4060 8 GB, driver 610.88, Windows 11. Series S,-Resolution 1080, frame generation 2x,-PrecompileUsed, the same walking route as the other runs on this machine, 330 s after reaching the world.For reference, the same machine and route rendered 13.3 to 17.2 fps on other batches in the last day. These fps are a check that nothing fell over, not a measurement of a gain.
Verdict: PASS for the in-game gate (300 s or more in the world, no device loss) for this batch, on the heads listed above. If one of these pull requests changes its head, this run no longer covers it.
Limits: one run; arrival in the world was driven by keys and not checked on pictures;
-PrecompileUsedwas used, so the default start (every known pipeline precompiled) was not exercised. The precompile before the world took 619 s, against 157 s for the previous batch; the shader-side changes in this batch (#3156, #3262) probably left the pipeline cache cold (not checked). Switches that are off by default (for example #2851'sLEONIDA_TITLE_MEMORY_SCALE, #3136's timeline attribution) were not turned on: this run covers their default path only. #2642 targets Wine and was run on Windows only.AI-assisted (Claude Code).
VERIFY-2642 y
#2643— las dos grandes, las dos sin tests nuevos, y una de ellas mejora al fusionarLas dos de zmasi, las dos de 5-6 días, y las dos con
switches.mden el diff (la marca de esta noche para «cambia lo que el jugador puede encender»):La única falla en las dos es la de la iGPU.
#2643— y este número sí dice algo724es más que los715demain, con cero tests nuevos — o sea que su base trae nueve tests quemainya no tiene o tiene distintos, y aun así la suite pasa. Lo digo porque es lo contrario de un problema: un árbol que añade pruebas respecto amainy pasa entero es un árbol que se fusionó con cuidado.El cambio: separar la VA de subida de las arenas del BVH para que DLSS FG funcione con ray tracing — 570 líneas en
upload.rs, 229 enmemory.rs. Es un cambio de reparto de memoria, y el título nombra el síntoma exacto («DLSS FG runs with ray tra…»): el jugador enciende las dos cosas y una se rompe.#2642— compilar shaders SM 5.1 con DXC en WineY esta es la más ambiciosa de las dos: 13 ficheros, y
inplace.rs/replay/play/merge.rsen el diff — no es sólo el compilador, es el camino de la grabación.Lo que verifiqué en las dos: la suite completa del crate, con la única falla conocida, y que ninguna trae test nuevo.
Lo que no: que DLSS FG y el ray tracing convivan (
#2643) ni que un shader SM 5.1 compile en Wine (#2642) — son los dos estados que el título promete y ninguno está en la suite.Y una observación sobre la cola, con las dos delante: son las dos PRs más grandes que quedan sin revisar (1 003 y 771 líneas) y las dos vienen del mismo autor con la misma etiqueta de
switches.md. Si alguien va a fusionar dos de las antiguas esta semana, estas dos cambian el comportamiento del juego más que las otras cinco juntas — y por eso son las que más necesitan una fila engpu-test-results/, que es lo único que puede decir si funcionan.Merged
origin/main(6e97990505,#3318) into4b4d99a822strictly to regenerated3d12/docs/switches.md(needs rebase); all 12 non-switches.mdfiles preserve identical PR hunks againstorigin/maincompared to164506d01c.AI-assisted: Gemini 4 Carbon (High) and Gemini 4 Neon (XHigh).
RUN (in game, third party, batch of four pull requests), each head merged with
git merge --no-ffonto main6e9799050, in one build: #26424b4d99a82, #31518894c5812, #33230c836e32e, #332402f37bcf8. RTX 4060 8 GB, driver 610.88, Windows 11. Series S,-Resolution 1080, frame generation 2x,-PrecompileUsed, the same walking route as the other runs on this machine, 330 s after reaching the world.For reference, the same machine and route rendered 13.3 to 17.4 fps on other runs in the last day: a check that nothing fell over, not a measurement of a gain.
Verdict: PASS for the in-game gate (300 s or more in the world, no device loss) for this batch, on the heads listed above. If one of these pull requests changes its head, this run no longer covers it.
Limits: one run; arrival in the world was driven by keys and not checked on pictures. The precompile before the world took 529 s, against about 110 s for main alone: the translator change in #3324 left the pipeline cache cold. Switches that are off by default (for example #3323's own-pass timing) were not turned on: this run covers their default path only. #2642 targets Wine and was run on Windows only. #3151 changes what happens on a lost device; no device was lost, so that path was not exercised.
AI-assisted (Claude Code, Claude Opus 5.5).