Repository navigation
Conversation
…piler refuses it Wine's d3dcompiler_47 (vkd3d-shader HLSL) rejects RWByteAddressBuffer.Load (E5005), so under Wine every indirect execution was dropped. The same source now goes to dxcompiler.dll (cs_6_0, root signature inside) instead.
|
Tested
With the 12 indirect tests from #40 merged on top this would exercise the whole path; on its own branch those tests are not present yet. No game data used. |
|
Tested this independently on Linux under UMU-Proton. I used only crate tests: no game data, no title run, and Environment
Build
Tests under Proton
What the logs show:
The two remaining failures fail the same way on
Non-blocking nit: when DXC's Recommendation: merge, from a Linux/Proton point of view. The fallback does what it says, nothing changes on the path where D3DCompile succeeds, and no tests regressed. |
|
The fallback idea makes sense for Wine, but nothing in VIctory ships or locates Maybe look for Static review, not built or run. |
Review on Marvisak#178: load DXC from VICTORY_DXC, beside the dxil.dll that shader validation finds, then only the executable's folder and System32 (no bare LoadLibraryW search path). When DXC refuses the clamp, its error text is logged. README notes the Wine/Proton requirement.
|
Thanks for testing (RADV, UMU-Proton/RTX 2060 SUPER) and for the review. Pushed f435ad1, which addresses it:
Checked: |
|
Tested on Linux: RTX 5070 Ti, driver 620.73.04, GE-Proton11-14's vkd3d-proton. #178 was merged into a diag build of d2a4bae with other open PRs (#177, #454, #189, #493, …), with DXC 1.9.2609's The log shows Wine's In one traced world frame, dropped operations went from 4,273 (every indirect execution, "not bounded") to 2,836, and the G-buffer's writers that run went from 211 to 1,043. Details in #71. AI-assisted: Claude Code ran the builds and tests on my machine, read the logs and wrote this comment; posted at my request. |
|
I composed #40 at The focused change uses VIctory's existing DXIL validator with the selected compiler's companion library to validate and sign an unsigned fallback blob. The resulting digest matched the same SDK's |
The Windows SDK 26100 DXC DLL can compile a valid shader without finding its sibling signing library. Native D3D12 then rejects the unsigned shader. Sign only zero-digest output with the existing DXIL validator, resolving a sibling from the loaded compiler path. (cherry picked from commit f7411d0)
|
Thanks @aycow, good catch on the unsigned container from older SDK DXC. Cherry-picked your signer fix onto this PR with attribution ( |
…Marvisak#358 Marvisak#89 Marvisak#331 Marvisak#86 Marvisak#83 Marvisak#211 Marvisak#260 Marvisak#275) Conflict in crates/victory-gpu/src/descriptor/host.rs: gpu-state (Marvisak#251) moved the dynamic-slot search into free_table(); gpu-draw (Marvisak#86) bounds the search by the heap's spare slots instead of DYNAMIC. free_table() works over taken.len(), which is the spare count, so the helper is kept with gpu-draw's spare-based cursor wrap. Both sides' tests kept. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Heads-up for reviewers: #994 (4828716, @Slaktarn700) solves the same problem differently. It writes the clamp with structured buffers, so Wine's d3dcompiler_47 accepts it and no DXC is needed. I ported it to our Linux/NVIDIA branch and it works there; its 2 GPU tests pass under Wine + vkd3d-proton. If #994 (or that commit on its own) lands, this PR is unnecessary, and I'll close it. |
The tester tree (upstream main ffe310e plus its PRs, update 8; see its INTEGRATION.md) ran 11-25 minutes in the world on an RTX 5070 without a device removal. Where both sides carry the same PR (the wave64 stack #223/#233/#320 with #439 and #180, #454, #336, #259, #331 and others), the tester tree's newer head is taken; our own work and the PRs only we merged are kept. Conflicts, file by file: - descriptor/host.rs: the tester layout (`spare`, the guard slot after the dynamic slots, `free_table`, the capped sampler heap). A capped view heap keeps `capped_reserve()` dynamic slots, now 2^18 by default (the tester measurement, and our 91fed158), still `VICTORY_DYNAMIC_SLOTS` in diagnostics builds; uncapped hosts keep our 2^19. Our slot statistics (TAKEN/PEAK/SHORT), the bindless plan cache (`CommittedRegions`, `timed_valid_title_address`, `timed_find`, `title_bounds`) and the revision triple are kept beside the tester's `guard_slot`. - Buffer states: the tester tree's buffer-state tracker (#334: every list moves host copies of title memory between GENERIC_READ and UNORDERED_ACCESS and back to common before it closes) and depth twins (#469) are taken. #40's enhanced/legacy indirect barriers (the indirect prelude, `use_indirect_buffers`, the title buffer handoff mirrored in `host_barrier`) cannot share buffers with that tracker and are dropped; #40's argument checks (`byte_len`, exact spans, overflow-safe clamp shader, aligned counts) stay. `indirect::bound` and #282's `rectangles` go through `buffer_state`, and `indirect::execute` (#334) replaces `done`. #178's DXC fallback compiles both of our passes. Our segments (#387: `close` ends the segment, `close_native` closes a native list) carry the tracker: each native list returns its buffers to common and its twins to their depth targets, and each prelude also holds our texture uploads. - shadow.rs: our write flow (`queue_write`, one `snapshot` after the batch's refreshes, `finish_writes`, the unchanged-page cache) with #261's copy-back that also gives the snapshot the title's bytes; its tests run through our flow. - pipeline/make.rs: #275's per-frame budget and per-pipeline wake pair, with our compute waits (a dispatch waits for its pipeline, up to 20 s). - pipeline/library.rs: the tester version (#347, #275's saver thread); our concurrent-write test kept. shader_cache.rs: our byte-returning cache API with #358's "translated, only not kept". - draw.rs: #493's root SRV tables; where no table can stand in, our drop of a draw whose root view is unset or outside title buffers. Our refusal of a table offset past the capped heap stays. - resource.rs: `HostTexture` has both our `staged` generation and the depth twin. - Shaders: the tester's lower.rs for the wave64 stack, #160's image sampling (it covers our #73 and #136 sample forms) and #453/#587; kept from our side: #136's preference for an image or buffer use of a descriptor read as data and its `s_buffer_` arm, #422's nearest-even narrowing (also for #169's d16 loads and #453's interpolation), #452's spin-wait limit, #391's LDS limit, #302's spilled root arguments (now in `NativeProgram::translation_ir`), #136's PSV0 interpolation beside the tester's row harmonisation. split_tests.rs, lane_read_loop_tests.rs and docs/wave64-on-wave32.md are the tester versions (the same PRs at newer heads). - Tests: #483's heap guard dwords filled in our GPU tests of #200 (v_div_scale) and #437 (scalar loads from a raw view), which read through the guard slot otherwise; #334's debug-layer test passes an offset to our `indirect::bound`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… when D3DCompile refuses it (Wine/Proton)
… when D3DCompile refuses it (Wine/Proton)
Reuse the compiler loader and signing path for the indirect clamp, depth twins, card comparison, and in-place probe Based-on: Marvisak/VIctory#178
… when D3DCompile refuses it (Wine/Proton)
Reuse the compiler loader and signing path for the indirect clamp, depth twins, card comparison, and in-place probe Based-on: Marvisak/VIctory#178
|
Automated triage for the maintainers. Closing because another open pull request covers the same change. See #1279. Wine-only: when D3DCompile refuses the indirect-argument clamp it loads dxcompiler.dll (from VICTORY_DXC, beside dxil.dll, the exe folder or System32) and adds a windows-crate feature. #1279 solves the same problem by writing the clamp in HLSL both compilers take, with no external DLL and no Cargo change. If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution. |
Reuse the compiler loader and signing path for the indirect clamp, depth twins, card comparison, and in-place probe Based-on: Marvisak/VIctory#178
Reuse the compiler loader and signing path for the indirect clamp, depth twins, card comparison, and in-place probe Based-on: Marvisak/VIctory#178
Reuse the compiler loader and signing path for the indirect clamp, depth twins, card comparison, and in-place probe Based-on: Marvisak/VIctory#178
Reuse the compiler loader and signing path for the indirect clamp, depth twins, card comparison, and in-place probe Based-on: Marvisak/VIctory#178
Reuse the compiler loader and signing path for the indirect clamp, depth twins, card comparison, and in-place probe Based-on: Marvisak/VIctory#178
FXC can reject required shader profiles under Wine. Reuse the DXC loader and signing path for the indirect clamp, depth twins, card comparison, and in-place probe so their runtime pipelines can still be created. Based-on: Marvisak/VIctory#178 Tested-on: AMD Radeon RX 6800, Fedora Linux 45 (Wine/vkd3d-proton) (focused GPU tests on the integrated stack) Assisted-by: gpt-6.2-sol
With in-flight card fetches enabled, the comparison and clamp shaders can reach FXC under Wine, where profiles with embedded root signatures fail to compile. Use the runtime compiler fallback for both shaders so the fetch setup can create its pipelines on Wine. Based-on: fxceless#648 Based-on: Marvisak/VIctory#178 Tested-on: AMD Radeon RX 6800, Fedora Linux 45 (Wine/vkd3d-proton) (156 focused tests and a title launch) Assisted-by: gpt-6.2-sol
What
Under Wine/Proton,
D3DCompileis Wine'sd3dcompiler_47(vkd3d-shader HLSL), which rejects the argument clamp:clamp:19:27: E5005: Method 'Load' is not defined on type 'RWByteAddressBuffer'.clamp()then fails and every indirect execution is dropped on Linux.Change
If
D3DCompilefails, the same source is compiled with DXC (dxcompiler.dll, which shader validation already needs) ascs_6_0; the root signature stays inside the shader. Behaviour on Windows, whereD3DCompilesucceeds, is unchanged. Adds theWin32_Graphics_Direct3D_Dxcfeature towindows(no new crates;Cargo.lockunchanged).Testing
cargo checkforx86_64-pc-windows-msvc, with and withoutdiagnostics.