Shaders: lower buffer cache invalidations as no-ops #368
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!368
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/368/head"
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?
@Quat3rnion on GitHub · 2026-11-24 02:40 UTC · original
Quat3rnion:victory-shader-coverage→main· +27 −1 · 2 files · 1 commits · merged 2026-11-25 00:19 UTCWhat
buffer_gl0_invandbuffer_gl1_invwere the only buffer cacheinstructions the translator refused:
resource::trackdemanded a resourcedescriptor even though the instructions carry no data operand, and lowering
had no arm for their names. The host has no console buffer cache to drop,
so this skips descriptor tracking for
_invbuffer instructions and lowersthe pair as no-ops — the same treatment the scalar
s_gl1_invands_dcache_invalready get. A synthetic full-pipeline test covers bothopcodes.
This was one of the refusals listed in PR #163's audit. That PR only prints
a notice when a listed opcode begins to lower, so the two lines become
stale rather than failing.
An AI tool wrote part of this change.
Tested
cargo test --workspacewith PR #112's Linux build fix applied locally (not part of this PR): 165 passed, 0 failed, 3 ignored. One new test runs both opcodes through decoding, resource tracking, structure and lowering.cargo check --target x86_64-pc-windows-gnu --workspace --testspasses. No Windows host here.cargo xtask policypasses (150 files ok). No game files or data from them were added.shaders.rpfwith no reader in the repo, so the test uses synthetic instruction words.Checklist
cargo xtask policypasses. No game files or data from them were added.@jeremygold02 on GitHub · 2026-11-24 04:03 UTC · original
Thanks @Quat3rnion for this change. I tested head
d3c40da1c8371648774e11963cd880539e3d8085with:Result: 1 passed, 0 failed (61 filtered out). The synthetic lowering test decodes and lowers both
buffer_gl0_invandbuffer_gl1_invthrough the shader pipeline. This validates translator acceptance and no-op lowering; it does not exercise behavior in a real title or GPU dispatch.