Skip to content

Sync fxceless d510ee4: VICTORY_DXC resolved to a full path before loading - #172

Merged
pablogonz12 merged 1 commit into
mainfrom
sync/fx-dxc-path
Nov 25, 2026
Merged

pablogonz12 merged 1 commit into
mainfrom
sync/fx-dxc-path

Conversation

@pablogonz12

@pablogonz12 pablogonz12 commented Nov 25, 2026 •

Copy link
Copy Markdown
Owner

The DXC fallback for our own HLSL is already in main, but its VICTORY_DXC lookup is not:
LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR searches the loaded module's own folder, and the loader can only
do that for a fully qualified path. A relative VICTORY_DXC=.\sdk passed is_file and then failed
to load, so the fallback still had no compiler — which under Wine/Proton means no indirect-argument
clamp (every indirect execution dropped), no card compare, no depth-plane twins.

The path from VICTORY_DXC is now made absolute (std::path::absolute) before it is tried.
On Windows nothing changes.

Credit: ours (pablogonz12) from the fxceless-fork sync branch; the rest of that branch's DXC work
(dxc.rs, host::compile and indirect routing) is already in main.

Gates:

  • cargo xwin clippy --target x86_64-pc-windows-msvc -p victory-gpu --all-targets -- -D warnings: clean.
  • cargo xwin test -p victory-gpu under GE-Proton11-14, Wine's builtin d3dcompiler_47 forced
    (WINEDLLOVERRIDES=d3dcompiler_47=b), VICTORY_TEST_ADAPTER=hw on the RADV card:
    dxc:: 3 passed, 0 failed (0 skipped).
  • cargo xtask policy: 240 files ok.

Not tested in a game run.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed loading the DirectX Shader Compiler when its configured location is a relative path. Relative locations are now resolved before loading, while directory-based configuration continues to work as before. If a relative location cannot be resolved, the original location is retained. Other compiler search locations and loading behavior remain unchanged.

`LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR` searches the loaded module's own folder,
which the loader can only do for a fully qualified path; a relative
`VICTORY_DXC=.\sdk` passed `is_file` and then failed to load, so the
fallback still had no compiler. The path is made absolute first.

Under Wine with its builtin compiler (`WINEDLLOVERRIDES=d3dcompiler_47=b`)
the test's shader is refused by the system compiler (`0x80004005`) and DXC
compiles it: a container with a root signature and a digest, taken by the
assertions. (`cargo xwin test -p victory-gpu --lib dxc` under GE-Proton11-14:
3 passed, with dxcompiler.dll/dxil.dll from the tool's files.)

(cherry picked from commit 04c804e)
@coderabbitai

coderabbitai Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Changes: DXC path resolution

Layer / File(s) Summary
Resolve the DXC path
crates/victory-gpu/src/dxc.rs
Relative VICTORY_DXC file paths are made absolute when resolution succeeds. If it fails, the loader retains the original path. Directory inputs continue to expand to dxcompiler.dll.

Possibly related PRs

Suggested reviewers: errusso

Change: Bug fix

Merge Risk: Minimal · up to 7f594

This change makes relative VICTORY_DXC file paths absolute before the DXC compiler is loaded, so such paths no longer fail to load. Other behavior is unchanged. No merge-blocking risk was found.

Architecture risk: Low · up to 7f594

The change affects 1 system.

Changed systems: crates

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — crates (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in crates/victory-gpu/src/dxc.rs: VICTORY_DXC directory inputs are still expanded to dxcompiler.dll, while file inputs are now made absolute before being added to the candidate paths; if absolute-path resolution fails, the original path is used.
Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Usage-based review receipt

  • Mode: Continue automatically
  • Reviewed files: 1
  • Waived: $0.25 (charged $0.00)
  • View usage details

Note

This review exceeded your plan’s limits and used usage-based reviews—free during trial, billed after paid activation unless disabled. Manage usage-based reviews.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 467b32f8-1932-4908-b973-d5563e41b13d
Commits

Reviewing files that changed from the base of the PR and between d28b77d and 7f594ea.

Files selected for processing: 1

  • crates/victory-gpu/src/dxc.rs

Limit details: You’ve used all 10 included reviews currently available.

@pablogonz12
pablogonz12 merged commit 2fc2283 into main Nov 25, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant