Shaders: accept known D3D_MIN_PRECISION signature elements #286
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!286
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-286"
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?
@tarcisioads on GitHub · 2026-11-24 02:03 UTC · original
tarcisioads:shader/min-precision-signature→main· +50 −2 · 1 files · 1 commits · openAllow known
D3D_MIN_PRECISIONvalues (1FLOAT_16,2FLOAT_2_8,4SINT_16,5UINT_16,240ANY_16,241ANY_10) at offset+28ofISG1/OSG1/PSG1signature rows incrates/victory-shader/src/emit/mod.rs, instead of failing with"a minimum-precision signature element".DXBC already encodes those elements with a 32-bit
ComponentType(1..=3), and DXIL SM 6.x declares them as 32-bit withMinPrecision = 0. Unknown/reservedMinPrecisionvalues (such as3) continue to returnShaderError::Unsupported.Adds a unit test
signature_accepts_known_min_precision_and_rejects_unknowncovering all knownD3D_MIN_PRECISIONvalues and an unknown value.Verification
cargo test -p victory-shader(57/57 passed on macOS; Windowsdxil.dllvalidation not run)cargo xtask policy(ok)rustfmt --edition 2024 --check crates/victory-shader/src/emit/mod.rs(ok)@jeremygold02 on GitHub · 2026-11-24 04:16 UTC · original
Tested PR #286 at head
6afdb58eeb875499ff79b3f8434500894df2ace4(state at test time: OPEN). Pre-comment refresh: state OPEN, head unchanged at6afdb58eeb875499ff79b3f8434500894df2ace4.cargo test --locked -p victory-shader signature_accepts_known_min_precision_and_rejects_unknown— passed (ok. 1 passed; 0 failed; 0 ignored; 0 measured; 69 filtered out; finished in 0.00s ); cases: emit::tests::signature_accepts_known_min_precision_and_rejects_unknown.Behavior covered: Checks known D3D_MIN_PRECISION signature elements are accepted while unknown values are rejected.
Code: crates/victory-shader/src/emit/mod.rs
@Marvisak on GitHub · 2026-11-25 00:29 UTC · original
Automated triage for the maintainers.
Needs work.
signatureincrates/victory-shader/src/emit/mod.rsnow accepts min-precision signature elements as plain 32-bit ones (half: false); the enum values are right. The open question is how the console program passes these values: main decides 16-bit packing from the signature's component type and, for outputs, from the native program'sfp16/pack2flags (half_outputsinlower.rs). If the console compiler stores or interpolates min16 values packed, declaring them 32-bit unpacked reads or writes the wrong bits, whereas the current refusal at least fails clearly. Please add a console shader (or its translation log) with a min-precision element showing how its GFX10 code accesses it, or a round-trip test that passesdxil.dllvalidation and reads the right values.CI: no check runs on the head commit.
Generated by Claude Code
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.