WIP: Preserve packed scalar bits when reading a compute lane mask #535
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
hle
input
INTEL
lighting
linux-proton
memory
MULDER
needs-info
needs-logs
needs-rebase
NVIDIA
performance
post-merge
pr-diagnostics
pr-docs
pre-merge
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
relevance
high
relevance
low
relevance
medium
relevance
very-high
rendering
report
roadmap-proposal
saves
series-s
shaders
startup
status
blocked-by-rework
status
needs-test-report
status
needs-triage
status
ready-for-review
status
stale
status
superseded
status
wip
tools
ui
upstream
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
TrustNo1/Darner!535
Loading…
Reference in a new issue
No description provided.
Delete branch "holoslicer/Darner:fix/preserve-packed-scalar-bits"
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?
Refs #67. Tested offline on an RTX 3090. An in-game shadow comparison is still needed.
Contributor role (optional)
Already requested in #529.
What it changes
The compute translator refused a shadow shader when a scalar AND/OR result had also been tracked as a lane mask. When only a subset of lanes is active, a wave ballot cannot recover the original 32-bit number.
After ordinary compute lowering exhausts its existing paths and reports this specific refusal, retry with the original scalar bits for 32-bit AND and OR. Both sources must have exact dwords, and the destination must be an ordinary scalar register. EXEC and VCC retain their existing handling. If the retry fails, report the original error.
How it was tested
bff7629onc8258f9, Windows x64, RTX 3090 with NVIDIA driver 617.42. The same private Wave32 input failed on the release, main and #501. A synthetic program in the PR reproduces the refusal without game data.cargo test --locked -p darner-shader --lib packed_scalar_mask_keeps_bits_outside_the_active_lanes -- --nocapture. The baseline fails lowering. The change dispatched both scalar-branch paths and read back all five expected 32-bit values, including high bits with only one active lane. This machine's WARP adapter lacks the required 32-lane wave size.cargo clippy --locked -p darner-shader --all-targets --all-features -- -D warningsandcargo xtask policypassed on this revision. The workspace gates and a same-scene in-game A/B are outstanding. Submitted as a draft.cargo test --locked --offline -p darner-shader --lib -- --test-threads=1 --skip oracle64::legacy_mul_forms_are_exactpassed 568 tests with 16 ignored. The exhaustive all-f32 multiply oracle was the one explicitly excluded test.Checklist
main.docs/asset-policy.md. The committed fixture is synthetic.Checked for overlap
WIP: [pr-fix][shaders][RAYTRACING] Preserve packed scalar bits when reading a compute lane maskto WIP: Preserve packed scalar bits when reading a compute lane maskView 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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.