Shaders: compute selects and carry-ins on a lane mask held as data (F… #1788
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!1788
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1788/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?
@WhiteDragonul on GitHub · 2026-11-24 22:38 UTC · original
shader/find-6-numeric-cndmask→main· +122 −16 · 1 files · 1 commits · closed without merging…IND-6)
v_cndmask_b32 and the v_add/sub_co_ci carry-ins took their mask only from what structurisation recorded, so a mask the program holds as a number (a root constant, the result of scalar arithmetic) stopped the program with "a select on an untracked mask" or "a carry-in from an untracked mask". In compute, where lane n is console lane n, the lane now tests its own bit of the dwords the instruction reads (both in wave64); such a select fixes the console's wave size like other masks read as numbers. Pixel, vertex and mesh programs still refuse it.
@upipibi on GitHub · 2026-11-24 22:39 UTC · original
A case this leaves refused, from reading the diff (not run).
select_maskhandlesOperand::Scalar: SGPR masks, andnullas all-false. An inline-constant mask (0= 128,-1= 193, the other integers 129-208) is a separateOperandvariant ingfx10/fields.rs, so it still returnsuntracked. XCL's per-lane form had the same gap forv_cndmask_b32and the_co_cicarry-ins with inline0/-1/nullmasks; xcl-dev/xcl#1864 fixes it there. A constant is the same mask in every lane, so its bit per lane needs no console-lane condition: bit n of the sign-extended 64-bit value, so-1is all lanes and0none.AI-assisted (Claude Code). No game files.
@upipibi on GitHub · 2026-11-24 22:41 UTC · original
On NVIDIA: RTX 3070 8 GB, driver 616.56, Windows 11, debug,
ae6e932(onmain70564ae).compute_selects_on_a_lane_mask_held_as_dataandcompute_carries_in_from_a_lane_mask_held_as_data: pass, 2 of 2 runs.cargo test -p victory-shader --locked: 208 passed, 3 failed, 2 ignored. The 3 are #1744's NVIDIA heap-cap failures onmain(a_heap_buffer_read_where_no_buffer_view_is_reads_zeros,a_heap_buffer_read_by_element_takes_the_views_stride,gathers_at_a_level_match_the_hardware), not this PR.AI-assisted (Claude Code). Synthetic tests only.
@DesertGamer on GitHub · 2026-11-24 22:55 UTC · original
VIctory V2: community PRs, merged and tested
Open PRs sitting in the queue? V2 pulls them into one build, screens each one (binaries, build scripts, hooks, new deps) and runs tests after every batch.
Where it stands today: launches, runs the menu at 30 fps, plays the intro video, reaches the start screen and loads the world (~50 s). Entering the world is the current blocker: rendering fails with a GPU "device removed" error (tracked in issue #1).
⚠️ Entering the world on a real GPU can hang it and make Windows reset the driver. Try it at your own risk.
Not playable yet, but every batch of merged fixes moves it closer. If you have a PR that's stuck, or a GPU to test on, I'd love your help:
https://DesertGamer/VIctory-V2
Unofficial community fork of Marvisak/VIctory, GPL-3.0.
@rminzao on GitHub · 2026-11-24 23:09 UTC · original
wave64: a mask whose hi dword was rewritten still picks up the old compare
select_masklooks the mask up by its lo dword alone (self.x.st.masks.get(&lo)). In wave64, a sequence likestill finds the compare's mask, so lanes 32-63 use the compare's bits instead of 0 and pick the wrong source. Structurisation files the mixed (lo, new hi) pair under
other, notmasks.StructureState::mask_bits(lo, Some(hi))(structure.rs:404) already does the exact-pair lookup. Using it here (and inselects_on_a_number) would send a mismatched pair down the new numeric path, which is correct in compute. The lookup by lo alone predates this PR, but the doc comment ("a scalar operation may have written either alone") suggests this PR means to cover it.The new tests only check that lowering succeeds and
wave_opsis set, not which dword or bit a lane reads, so a swapped lo/hi or a lane >= 32 would still pass.Static review (AI-assisted), read against
mainat70564ae; nothing was run on a GPU.Pull request closed