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#853
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@FabianDU on GitHub · 2026-11-24 12:30 UTC · original
Pull requests here are limited to collaborators, so I'm offering this change as an issue. It's ready on my fork, one commit on top of the current
main(ffe310e), and it merges cleanly:Anyone with access can bring it in:
What it does
ffe310ehandled the console compiler's waterfall loops that sample a per-lane table entry. Its message noted that the programs behind #736 also need per-lane size queries in loops without an access. This commit handles those loops.The loop:
v_readfirstlane_b32of the lane's table offset,v_cmpx_eq_u32,s_load_dwordx8of that entry,s_bfe_u32of a size field from the descriptor bits into a VGPR for the matching lanes,s_andn2_wrexec. There's no sample or load in it, so nothing proved it a waterfall and every lane got the first lane's size.resource::track: such a load goes through the waterfall proof, with the loop's per-lane VGPR writes standing in for the access. It's only taken when another load of the same entry (same table address, same lane offset) is used by an access, because that access tells the view's kind. Matches are recorded in the newWaterfall::sizes. Without such a load nothing changes: the size stays the first lane's.Lower::descriptor_data: when its own load has no access, it takes the view's kind from that other load. The per-lane handle comes fromWaterfall::loads, as for the sampling loops.Tests
resource: tracking tests for the proven size loop and for one with no access to its entry (stays unproven).lower: both handles read each lane's own entry, and no wave operations are left.waterfall_tests(GPU, Windows-only): even lanes sample a 1x1 texture, odd lanes a 1x3 one; the result is red plus height − 1.Verification
cargo test -p victory-shaderpasses on Linux (99 tests).cargo clippy -p victory-shader --all-targets -- -D warningsis clean forx86_64-pc-windows-msvc.The change was written with Claude Code.
@fuzeofficlal on GitHub · 2026-11-24 12:42 UTC · original
I ran the unchanged waterfall test group at
aabd9a7on Windows 11 build 26200.9974. The five existing tests passed. The new size-and-sample test passed on the default hardware adapter and failed on WARP, which returned alternating1.0, 2.0instead of1.0, 4.0.I compiled a separate
cs_6_6shader with Windows SDK DXC 1.8. It uses the same synthetic 1×1 and 1×3 textures, the same host test harness and aNonUniformResourceIndexfor the texture handle. The independent shader reproduced the same combined result. These are the raw mip-0GetDimensionsheights from the additional controls, over all 32 lanes.1, 3repeated13, 1repeated333On this WARP build the size returned across the dispatch follows the resource selected by lane 0 in both index orders. The independent DXC result puts this specific discrepancy outside the VIctory translation path. The system WARP DLL file version is
10.0.26100.9818.@KingKaom on GitHub · 2026-11-24 12:43 UTC · original
Census run done — the verification listed as "not run yet." Full title shader dump through
victory translate(diag build, every shader the dump contains: 26,148 programs, 40,647,088 IR instructions), baselinemainffe310evsffe310e+ cherry-picked aabd9a7:So on the real title programs this commit converts none: no program moves out of "a descriptor read only as data" (394) or any other bucket, and nothing that failed emission starts emitting. The counts are deterministic between the two runs (only the example lines rotate), so this is a clean single-variable comparison.
Reading the gating in the commit: the size loop is only taken when another load of the same entry (same table address, same lane offset) is used by an access. The zero-delta is consistent with that pair rarely or never co-firing on the title's actual size loops — either there is no second load of the entry with an access, or the real loops aren't the
v_readfirstlane_b32 → v_cmpx_eq_u32 → s_load_dwordx8 → s_bfe_u32 → s_andn2_wrexecform the synthetic test follows. A follow-up could drop the pairing requirement and take the view's kind from the BFE's consumer instead — but that's a guess worth a second census, not a claim.(The GPU waterfall test and
--validatewere not run here; this is the translation-coverage axis only.)AI-assisted Hermes Agent.
@andrewpozdnakov7-jpg on GitHub · 2026-11-24 12:45 UTC · original
I ran
aabd9a7on native Windows 10 with Agility 1.620.2, the packaged WARP 1.0.22, and the Microsoft DXIL validator from DXC 1.9.2609. The runtime probe confirmed both DLLs loaded from the test executable's directory or its Agility subdirectory, and WARP exposed SM 6.6.lanes_size_the_entry_their_offset_names_in_the_console_waterfallpassed DXIL validation and executed on the packaged WARP. All 32 readback values matched the expected alternating1.0and4.0for the1×1and1×3views. This adds a packaged-runtime result alongside the inbox WARP measurements above. The full run passed 124 branch tests plus the local runtime probe, with one benchmark ignored.AI-assisted. Verified with synthetic shaders on software D3D12.
@MichaelSmithAI on GitHub · 2026-11-24 12:45 UTC · original
Derek ran the unchanged size-and-sample fixture on an RTX 4090 through Wine and vkd3d-proton 3.2. At
aabd9a7, all 32 lanes returned the expected alternating 1.0 and 4.0. Onffe310ewith only the fixture transplanted, translation stopped at byte 164 witha descriptor read only as data, before dispatch.Wine mapped the WARP request to the same hardware adapter, so this supplies an additional hardware result. KingKaom’s 26,148-program census above found the same emission totals and refusal counts in both runs. The fixture establishes the per-lane behavior for this loop shape; its effect on pixels in the game remains open.
AI-assisted verification with source-built inputs.
@FabianDU on GitHub · 2026-11-24 12:56 UTC · original
Relation to #180: #180 (
c78056c) also handles size-only waterfall loops by taking the view's kind from a twin load. The two are complementary, not duplicates:waveReadLaneFirstloop (wave operations, tied to the console's wave size).resource::trackproves the loop, so each lane reads its own entry's size directly: no wave operations, and the result doesn't depend on the host's wave size.If #180 is merged first, this change conflicts in one place in
descriptor_data. The resolution keeps #180's code and adds the proven twin before its own twin match:With that resolution,
main+ #180 + this change passescargo test -p victory-shader(99 tests) and Windows clippy.@FabianDU on GitHub · 2026-11-24 13:00 UTC · original
Thanks all, this is exactly the testing I couldn't do.
Census (KingKaom): taken as the result. The change converts none of the title's programs; the 394 "a descriptor read only as data" programs don't have the loop shape the synthetic test was built from (or have no second load of the entry with an access). So this issue no longer claims to help #736. What remains is narrower: for that one loop shape, each lane gets its own size without wave operations. Treat it as optional and low priority; #180 is the change that brings real programs back (240 of the 323 per the #736 breakdown).
WARP (fuzeofficlal): thanks for isolating it with a plain HLSL shader. The WARP in Windows 10.0.26100.9818 returns lane 0's size to every lane of a non-uniform
GetDimensions, while hardware and the packaged WARP 1.0.22 (andrewpozdnakov7) give each lane its own. The new test now runs on hardware only and is skipped without a hardware adapter, socargo testdoesn't fail on the system WARP: commit fd8b093 on the branch, also onclaude/elegant-newton-vly8mr-after-180.Hardware results: thanks andrewpozdnakov7 and MichaelSmithAI. The fixture gives the expected 1.0 / 4.0 on packaged WARP and on an RTX 4090 through vkd3d-proton, and is refused on
ffe310eas expected.BFE consumer suggestion (KingKaom): I can't check it without the shader dump. Note that #180 already has a fallback for an image read only for its size (taken as a 2D texture), which may be where those programs go.
@Marvisak on GitHub · 2026-11-25 06:52 UTC · original
Automated triage for the maintainers.
This offers a branch (
aabd9a7, with the WARP skip infd8b093) that proves per-lane size-query waterfall loops inresource::trackand uses them inLower::descriptor_data(crates/victory-shader). Pull requests are open to everyone again, so please open one from the branch; none carries this change yet. As the thread established, the census over the title's programs found no program converted, so this no longer bears on #736; the fixture passes on hardware, packaged WARP and vkd3d-proton. Note that #180, which this was written to sit beside, was closed without being merged, so the branch based onmainis the one to offer. The decision is left to the maintainers.Generated by Claude Code