victory-gpu: compile indirect argument clamps as cs_5_0 with explicit root signatures #411
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/readmet3xt-lab--foxhound!411
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-411"
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?
@kwaadrat on GitHub · 2026-12-01 23:24 UTC · original
kwaadrat:fix/indirect-clamp-sm50→main· +92 −21 · 2 files · 72 commits · closed without mergingSummary
crates/victory-gpu/src/indirect.rsandcrates/victory-gpu/src/indirect/batch.rs) ascs_5_0instead ofcs_5_1with inline[RootSignature(RS)].D3D12SerializeVersionedRootSignature(clamp_root_signature), keeping the exact same bindings (b0root constants,t*SRVs,u0/u1UAVs).RWStructuredBuffer<uint> budget : register(u1)with standard HLSLInterlockedOr/InterlockedCompareExchange/InterlockedAdd/InterlockedMaxonbudget[0..4]instead ofRWByteAddressBuffer.Interlocked*methods.[RootSignature(->cs_5_1fallback inmake_fromfor customVICTORY_BENCH_CLAMPshader overrides.Why
Neither clamp shader uses Shader Model 5.1 features —
cs_5_1was only needed for[RootSignature(RS)]andRWByteAddressBuffer.Interlocked*. Under Wine/Proton (d3dcompiler_47), both fail to compile withE_FAIL (0x80004005):When
make_fromfails, all indirect draws and dispatches are dropped for the entire session.Verification
victory.exeonwindows-latest(cargo build --release --locked -p victory) and tested on RTX 3060 12 GB (i5-9600KF) under Proton Experimental (vkd3d-proton): all fourargument clamp/no batched argument clamp/no argument clampwarnings are completely gone.@readmet3xt-lab on GitHub · 2026-12-02 01:48 UTC · original
Thank you. These pin down exactly which of our own shaders fail under Proton's built-in compiler and what it costs when the card-side compare is missing, which is the clearest data we have on #407. We're going to solve it one level lower: our shaders will ship already compiled, so no shader compiler is asked at run time on any system, and Windows keeps exactly the bytecode it has today. Because of that we won't merge these three as they are (they change the shader model and two buffer types on Windows too). Your findings and measurements go into that change, with credit. When the build is out, a run under Proton with Full logs from you would be the best test we could get.
Pull request closed