DXC fallback: helpers compile as HLSL 2018 (ambient raise never built under Proton, #2769) #3417
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!3417
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3417"
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?
@ErRusso on GitHub · 2026-11-29 23:01 UTC · original
ErRusso:fix/dxc-hlsl-2018→main· +29 −1 · 1 files · 1 commits · openFixes the
raisepart of #2769.What it changes
The DXC fallback in
hlsl.rsnow compiles the layer's helper shaders as HLSL 2018 (-HV 2018).What was wrong:
||and?:work per component on vectors.isnan,[RootSignature]dropped), so they go to DXC.||. The ambient estimate'sraisethen never builds:The last line means the whole stand-in for indirect light is off, so scenes come out darker and flatter.
Effect on other platforms:
Open PR #1702 has the same
-HV 2018in its owndxc.rs. This is just that one line, formain'shlsl.rs.How it was tested
cargo xwin test -p victory-gpu --lib, withVICTORY_DXCpointing atdxcompiler.dll1.8):dxc_takes_the_system_compilers_vector_logiccompilesraise's vector logic with DXC. It fails without-HV 2018and passes with it. It returns early when nodxcompiler.dllcan be found.hlsl::: 4 passed.ambient::the_passes_compilefails onmainunder Wine with DXC and passes with this change.ambienttests (neutral_probe_replaces_colour_without_depth_and_preserves_bounds,raise_opt_in_chroma_scrub_filters_spikes_and_preserves_scene_tones_on_hardware_and_warp) fail under Wine with and without this change.hlsl.rs.victory-shaderuntouched; the shader cache key is unchanged).cargo xtask policy --staged: ok.Checked for overlap
isnanfor Wine's own compiler), #3044 (raisewrites inside its image).🤖 Generated with Claude Code
The helpers we compile at run time are written for the system compiler, where || and ?: work per component on vectors. When it refuses one (Wine's d3dcompiler under Proton: no isnan, no [RootSignature] kept) the fallback gave it to DXC at its default, HLSL 2021, which refuses vector || and the ambient estimate's raise never built: error: operands for short-circuiting logical binary operator must be scalar, for non-scalar types use 'or' found = (isnan(found) || isinf(found)) ? 0.0 : max(found, 0.0); and with it the whole stand-in for the indirect light was off ("no stand-in for the indirect light"). DXC is now asked for -HV 2018. A test compiles raise's vector logic with DXC when a dxcompiler.dll can be found; it fails without -HV 2018. Under Wine with DXC, ambient's the_passes_compile now passes as well. Co-Authored-By: Claude Opus 5.5 <[email protected]>@lewisenator on GitHub · 2026-11-30 23:33 UTC · original
Tested in the game under Proton: this is needed, and it works.
Setup: Linux (CachyOS, kernel 7.3.6), GE-Proton11-15, RTX 3080 Ti 12 GB (driver 620.73.04), Ryzen 7 5800X, Series X profile, DLSS Quality at 2560x1440, with and without FSR 3 frame generation 2x.
dxcompiler.dllis DXC 1.9 (the one beside the exe).Before (main at
4d98ca87, 2026-11-29): the log in every start hadoperands for short-circuiting logical binary operator must be scalarforraise, thenno stand-in for the indirect light, and the picture was dark and flat, as described here.After: the same one-line change (
-HV 2018inhlsl.rs) has been in every build we have run since, on main at4d98ca87,cec481f4,41adb551,c71899d9ande1251c31: about 330 starts, the prologue and the prison cell. In each log:The other helpers that go to DXC here (
compose,plane,card compare,card compare batch,clamp,reflect_light) still compile with it. NoWARNfromvictory_gpu::hlslorvictory_gpu::ambientin any of those logs.I did not run the PR's new unit test; the above is the game only.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.