Repository navigation
Shaders: a select or carry-in on an untracked mask tests this lane's bit - #1084
undeadhuman37 wants to merge 1 commit into
Conversation
v_cndmask_b32 and v_*_co_ci_u32 refused when their scalar mask was not one structure followed (a plain SGPR number). In compute with console lanes the lane now tests its own bit of the register (pair in wave64); inline 0 and -1 masks are constants. Taken from upstream PR Marvisak#585 (mask part only; its descriptor-dimension hunk is left to the resource work). Offline corpus (26148 programs): "a select on an untracked mask" 288 -> 0, no new refusal text; those programs now stop at later refusals (descriptor read as data +205, unknown stride +32, descriptor address/format +33), so compute programs emitted only 1441 -> 1443. Synthetic test on hardware: fails before, passes after. WARP cannot pin a wave size, so the test skips it. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
I replayed 105 distinct compute shaders that VIctory had refused during one local RTX 5070 mission-loading trace, after a fence-confirmed texture readback. I matched the local inputs to the logged identifiers and compared the same inputs on On main, 47 of the 105 stopped at the untracked-mask select. All 47 advanced on this PR. Their next reported reasons were:
Both builds still refused all 105 inputs before producing DXIL. This confirms the specific lowering change reaches this mission’s shaders and identifies which refusal appears next. The replay did not execute any of these shaders or measure frame time. AI-assisted. |
catminou4
left a comment
There was a problem hiding this comment.
v_cndmask_b32 and *_ci_u32 no longer hard-fail on untracked scalar masks: inline 0/-1 constants fold to bools, tracked masks keep the structure path, and plain SGPR masks fall back to per-lane bit tests (with wave64 hi dword and WAVE_OPS flag). The added guard extends cross-lane detection to these ops when the mask is untracked. The execution test is Windows-gated; lowering suite green here. Local verification: macOS arm64, rustc 1.98.1, PR head merged into main ffe310e, cargo test -p <crate> --locked. Shader execution tests (valu_tests/host) are #[cfg(all(test, windows))], so macOS covers lowering/decode/unit tests only. victory-shader: 96 passed, 0 failed.
|
Tested a local adaptation of Synthetic GPU readbacks pass for all 128 threads with native wave32 and wave64 for Missing-high, rewritten-mask and divergent-carry negatives also remain refused. The latter now propagates the existing lane-mask-as-data refusal at the consuming store; its assertion checks the exact Unsupported location and reason. Hardware tests are explicitly invoked and fail if the physical adapter or validator is unavailable. This is compute-path validation of the adaptation, not a game-rendering or frame-time result, and does not resolve the later refusal groups reported above. |
Conflicts kept both sides: the split execute/submit (breadcrumbs cleared at the start of submit), the debug pixel shader and the breadcrumb stage notes, the view-heap-cap and wave keys of the shader cache with the breadcrumb key, and the single-exit block with the breadcrumb loops. Tests added by Marvisak#1084/Marvisak#1130/Marvisak#1269 initialise Parts with crumbs: None. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Verified + integrated, with a runtime caveat. Stack: main Merged cleanly. Note: the offline untracked-mask gain did not transfer to our captured runtime containers — the "a lane mask read as data" (7) and "a lane mask holding lanes elsewhere read as data" (6) classes persist on the runtime "Wrapped" containers. The fix works on the offline archive; our runtime masks differ (likely loaded from memory rather than the spill/select patterns). Flagging so the offline count isn't read as a runtime guarantee. AI use: Qwen Code; local measurements. No game data posted. |
…e's bit Conflicts with our numeric selects (3d3f32e): mask_cond first looks the selector up in st.masks, then (with console lanes) in st.others, before testing the lane's bit of the raw SGPR; the raw bit is refused in a wave64 program split into 32-lane halves. The select keeps UNTRACKED_SELECT so compute still retries with numeric_selects, and #1084's console-lane trigger counts only live instructions, with selects only on that retry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…table names Brings #193's runtime stride table (#155) with #704's raw view pool. Conflicts and fitting it to this tree: - Heap layout is title slots, dynamic slots, the guard slot, then the raw view pool (alias_base = count + extra + 1). A heap capped at PORTABLE_VIEWS takes a pool of 2^14 (ALIASES_CAPPED), not 2^16, since each pool slot is a mirrored title slot less. - Stride entries follow every slot write of ours: mirror, make_at, the bindless buffer and placed-texture slots, typed nulls, null kinds, raw_at, bindless CBVs and unmapped nulls. - viewed_bytes cuts the raw view to its host copy as make does (cut_to_copy), so the host never refuses it. - stride_entry gets the slot through our uniform_heap_index (#1012); #704's heap_slot is dropped. handles keeps our props key. - Our cut_to_copy clamps stay in buffer_srv/uav; #704's are dropped. - The tests pass the heap guard in its user-data dword, take our make_at and emit signatures, and count the guard slot. - Shader cache MAGIC VSH3, KeySpec version 3 (stride_table encoded). - Formatting-only hunks from #704 left out. translate --host-lanes 32-32: compute 2285 -> 2487, vertex/geometry/pixel 14186 -> 14256 (with #1073, #1084, #416 before it), mesh 8381 -> 8383; "a structured buffer of unknown stride" 206 -> 0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#1215 #1135 #1296 #1277 #1238 #464 #1073 #1057 #1084 #416 #704 #621. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sak#98, Marvisak#334 to Marvisak#492, validation) The line rebuilt on the bundles' current heads (Marvisak#1402 119b763, Marvisak#1492 5bbc098 without Marvisak#98, Marvisak#1504 1d41891, Marvisak#1511 ca601f0) with every merge replayed, and the merges after this file's first version (Marvisak#334, Marvisak#346, Marvisak#1024, Marvisak#211, Marvisak#492): merge order, the runner's numbers on 967d3ae (RTX 571, WARP 570 + the known Marvisak#1084 failure, all features 580; Marvisak#98's one test leaves), what is not included (Marvisak#98, Marvisak#282 for Marvisak#346, Marvisak#693 for Marvisak#1024, Marvisak#306's latest commit), and the open pull requests whose head is contained here (109, from the 18:24 collection). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Automated triage for the maintainers. Needs rebase. This PR does not merge cleanly into current The content has not been reviewed yet; it will be once the branch is rebased onto Generated by Claude Code |
v_cndmask_b32andv_*_co_ci_u32were refused when their scalar mask was not one thatstructurefollows (a plain SGPR number). In compute with console lanes, the lane now tests its own bit of the register (the pair in wave64); inline 0 and -1 masks are constants.Credit: this is taken from #585 (the mask part only). Its descriptor-dimension hunk is left out; that belongs with the resource work. It overlaps #585, so whichever merges first, the other should drop this hunk.
Measured offline over the shader corpus (26148 programs):
Tests: a synthetic hardware test fails before the change and passes after (run earlier on a GPU, not re-run for this PR). WARP cannot pin a wave size, so the test skips it.
cargo clippy -p victory-shader --all-targets -- -D warningsis clean on this rebase.No game data. AI-assisted: written with Claude Code (Claude Sonnet 5.5).
🤖 Generated with Claude Code