Repository navigation
Conversation
…_OVERRIDES) VICTORY_SHADER_OVERRIDES=<folder>: a shader whose console container hashes to <hash> (the 16 hex digits runs name shaders by) runs the DXIL container in <folder>\<hash>.dxil instead of the translator's code. Only the code is replaced. The translation's root signature, user-data dwords, immediate samplers, root views and heap views are kept, so a replacement is written against the translation's own register layout (its disassembly shows it: `victory translate --list` with VICTORY_EMIT_DUMP, then `dxc -dumpbin`). The point is the shaders that cost the most on the card for reasons of the generic translation (wave64 emulation, lane-mask bookkeeping): a hand-written equivalent compiled by dxc can do the same work faster. The replacement is applied after the shader cache (the cache keeps the translation; the folder can change between runs) and looked up once per hash. A file that is not a DXIL container is ignored with a warning and the translation runs. Three unit tests: the container check (accepts a DXIL part, refuses others and truncated files) and the lookup by hash in a folder. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
KyleS98
force-pushed
the
feat/shader-overrides
branch
from
November 25, 2026 06:32
6f018c4 to
a59cfdd
Compare
Author
|
Rebased onto 8dd30ab. The only conflict was In-game test of this branch (RTX 3090 Ti, Windows 11, diag build, retail title, Series X profile), done end to end with an identity replacement:
That shows the replacement path loads a container, keeps the translation's bindings, and runs on a card. A replacement that actually differs from its translation, measured for speed, will follow separately. AI-assisted (Claude Code, Claude Opus 5.5). No game data attached. |
KyleS98
force-pushed
the
feat/shader-overrides
branch
from
November 25, 2026 08:47
a59cfdd to
94da4cf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A small, opt-in mechanism for running a hand-written DXIL shader in place of the translator's output for a given shader. It's aimed at the handful of compute shaders that cost the most GPU time because of the generic translation (wave64 emulation on 32-lane hosts, lane-mask bookkeeping). A hand-written equivalent compiled by
dxccan do the same work in less time, without changing anything else the host builds.How it works
VICTORY_SHADER_OVERRIDES=<folder>: a shader whose console container hashes to<hash>(the same 16 hex digits that "first bind", "shader does not translate" and the GPU timing lines print) runs<folder>\<hash>.dxilinstead of the translated code.victory translate --listwithVICTORY_EMIT_DUMP=<dir>, thendxc -dumpbin.DXILpart) is ignored with a warning, and the translation runs.Testing
shader_override::tests): the container check accepts a DXIL part and refuses other parts and truncated files, and the lookup by hash in a folder finds a good file, ignores a bad one and handles a missing one. All pass.cargo clippy -p victory-gpu --all-targetsadds no new warnings.AI-assisted (Claude Code, Claude Opus 5.5). No game data attached.
🤖 Generated with Claude Code