Skip to content

Shaders: implicit-level samples in compute follow the console's lane quads (#2027, on #1237) - #2999

Open
wwwwwwww3333333 wants to merge 6 commits into
Marvisak:mainfrom
wwwwwwww3333333:fix/compute-lane-quads
Open

wwwwwwww3333333 wants to merge 6 commits into
Marvisak:mainfrom
wwwwwwww3333333:fix/compute-lane-quads

Conversation

@wwwwwwww3333333

@wwwwwwww3333333 wwwwwwww3333333 commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Builds on #1237 by @felicienradio (its commit is kept as is, rebased onto main 63bcca4) and adds what makes it match the console in groups of more than one row. It is for the 735 compute programs of #2027 ("Function uses features incompatible with the shader stage (cs)"), which #1237 was measured to validate without a newer validator (@wildheathen's census on #1237; my changes here do not touch validation, and I have not rerun the census). Among them are the fog/lighting apply pass (CS_ApplyCombinedDeferred, #2045) and the density shadow blur.

The problem the earlier comparisons did not reach. The console takes an implicit level from quads of lanes, and its compute lanes hold threads in x-major order: in an [8, 8, 1] group a quad is four threads of one row. Hosts place two-dimensional groups their own way. On an RX 6750 XT the host put 2x2 tiles of threads in a quad, so main, #1065 and #1237 all took the "y" derivative across rows. The 1D tests on #1237 could not show this, since a one-row group keeps its order everywhere. @ElSeba0811 saw a 2D case pick a different mip on #1237 and fixed it locally the same way (a one-row host group); the test below says which answer is the console's.

What changes (second commit)

Test compute_samples_take_derivatives_from_lane_quads: an [8, 8, 1] group, coordinates from the thread ids, chosen so that each derivative pair has one nonzero vector (the result does not depend on how the sampler combines them). Lane quads give level 1; 2x2 tiles give level 3. Each level of the texture holds its own number. RX 6750 XT (driver 32.0.21045.29003) and WARP, wave32 and wave64:

tree level read validator
main 63bcca4 3 refused (the #2027 message)
main + #1065 3 accepted
main + #1237 3 accepted
this PR 1.0 on every lane, hardware and WARP, wave32 and wave64 accepted

(The first three rows are wave32 on the hardware adapter, from a first version of the test whose u also stepped along x, which read 3 on every tree; they are the 2x2-tile answer either way.)

Suites (Windows 11, Rust 1.98.1 MSVC): victory-shader 303 passed (main alone: 302; the difference is the new test). cargo clippy -p victory-shader --all-targets -- -D warnings: clean.

Not measured: how the lit world looks with it. That needs a run in the title.

Unit tests only, no game files.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LwHmoV6jP696CZH3DVW7V1

claude and others added 2 commits November 26, 2026 05:56
…the quad

A console compute program may sample with an implicit level of detail
(image_sample, image_sample_b): the hardware takes the coordinates'
coarse derivatives across each quad of lanes. As DXIL `sample` and
`sampleBias`, these programs failed validation with "Function uses
features incompatible with the shader stage (cs) of the entry function".
The gradients are now read from the quad (lane 1 less lane 0, lane 2
less lane 0, through waveReadLaneAt) and passed to `sampleGrad`; a bias
scales them by 2^bias. Pixel and mesh shaders are unchanged.

`victory translate --validate` over the title's shaders on Windows
(dxil.dll 10.0.26100), on top of Marvisak#439: compute programs validated go
from 1,658 to 2,193 of 2,193 emitted; no other count changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SDn5GupcrERtCYPyoztdtG
…quads

The console takes an image_sample's implicit level from quads of lanes,
and its compute lanes hold threads in x-major order: in a group of more
than one row, a quad is four threads of one row. A host places
two-dimensional groups its own way. On an RX 6750 XT an [8, 8, 1] group
put 2x2 tiles of threads in a quad, so the quad gradients of Marvisak#1237 (and
the host's own derivatives, and main) took the y step across rows.

A compute program with such a sample in a group of more than one row,
and no other cross-lane code (which already relabels threads to console
lanes), now runs as one host row of as many threads; the thread ids are
taken back from the flat id. Every host keeps the order of a one-row
group, and the console's wave size is not required, so 32-lane hosts
run these too.

The bias of a sample with 16-bit addresses is the low half's f16, as on
the sampleBias path (Marvisak#1237 read the register as f32:
image_addresses_of_16_bits_and_clamps failed with it).

Test compute_samples_take_derivatives_from_lane_quads: an [8, 8, 1]
group whose lane quads give level 1 and whose 2x2 tiles give level 3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LwHmoV6jP696CZH3DVW7V1
@wwwwwwww3333333 wwwwwwww3333333 changed the title Fix/compute lane quads Shaders: implicit-level samples in compute follow the console's lane quads (#2027, on #1237) Nov 26, 2026

@kotekompotek kotekompotek left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — verified the mechanism end to end. implicit_level excludes only _l/_lz/_d/_cd (bias/_cl stay implicit). The row flattening to [xyz,1,1] forces x-major lane quads on every host, with thread_id reconstructing console (x,y,z) from flattenedThreadIdInGroup via URem/UDiv — decomposition is exact. quad_gradients uses lane base|1 and base|2 deltas (hardware coarse-derivative semantics), bias scales by 2^bias through exp2, and the sampleGrad arg order (offsets, ddx3, ddy3, undef clamp) matches DXIL op 63. The test discriminates the two orderings: lane quads give level 1, 2x2 tiles give 3.

@steven-seagull27

Copy link
Copy Markdown

The compute LOD change matched all 16,416 expected samples per adapter on an RTX 5080 and Microsoft WARP at 1d7472f. I also found a one-line correction for the PR's test fixture.

The original quad_program reads its UVs with buffer_load_dwordx2 ... offen. DXC disassembly identifies that SRV as a ByteAddressBuffer and shows a two-component rawBufferLoad. The test currently binds it as Stride::Structured(8). Changing the UV view to Stride::Raw makes the descriptor match the shader. With that one change, the original coordinates and sampler returned level 1 for 64/64 lanes in each guest wave mode on both adapters. Test fixture, line 1114

For the wider test I dispatched 2 × 3 × 2 groups and used the guest XYZ local and group IDs to address the UV and output buffers. Each consecutive four guest lanes shared a prescribed footprint of 2, 4, 8 or 16 texels. Each mip had a distinct constant color, with point filtering and clamp-to-edge. I ran plain image_sample, image_sample_b with alternating FP16 biases of +1 and −1, and explicit mip zero. The SDK validator accepted all shader variants.

Selected case, per guest wave mode Wrong samples at 653b119 (#1237 rebased) Wrong at 1d7472f
Plain sample, local size 6 × 4 × 4 910 / 1,152 0 / 1,152
Plain sample, 8 × 2 × 4 644 / 768 0 / 768
FP16 bias, 8 × 1 × 1 96 / 96 0 / 96
Explicit mip zero, all four local sizes 0 / 2,736 0 / 2,736

Both adapters returned the same counts for guest wave32 and wave64. Across all cases, including 3 × 5 × 4, the predecessor missed 7,844 of 16,416 values on each adapter. These are synthetic texture readbacks. I haven't measured a game frame with this change.

@fuzeofficlal fuzeofficlal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review on 1d7472f7 (static source inspection; no runtime GPU/DXIL validation executed):

  • P2 — Regression on compute shaders with constant sample offsets (crates/victory-shader/src/emit/lower.rs:8880-8920):
    • let quad_grads = matches!(op, 60 | 61) && self.s.threads.is_some() && self.s.mesh.is_none() && kind != 5; intercepts non-cube compute image_sample_o (op == 60) and image_sample_b_o (op == 61) before the existing 60 => offset decoder, and immediately returns Err("a sample offset outside a pixel shader") whenever offset_word is set.
    • Previously, compute image_sample_o with valid immediate offsets (-8..=7) reached the offset decoder in 60 =>. Since DXIL sampleGrad (op 63) already accepts the same os immediate offset arguments right below (args.extend(&os)), decoding and validating offset_word before selecting sampleGrad vs sample fixes the regression cleanly. Adding a compute image_sample_o offset test case would lock this in.

@zed6000

zed6000 commented Nov 26, 2026

Copy link
Copy Markdown

The census you hadn't rerun. Measured offline on the title's shaders (the method in #1247), head 1d7472f merged onto main 63bcca4 (a clean merge), RX 7900 XTX (RDNA3), dxil.dll 1.8.2502:

  • +748, 0 lost (24,850 → 25,598 validate). The 748 are all compute programs that fail on main with the validator's Entry function performs some operation that is incompatible with the shader stage. Program by program, they're exactly the same 748 programs Shaders: use validator 1.8 for compute derivatives #1065 (cbd152c) gains on the same base. So on this title the two are interchangeable in count; the difference is the 2D quad order this PR adds.
  • compute_samples_take_derivatives_from_lane_quads passes on RDNA3: Wave32 and Wave64, hardware and built-in WARP, every lane at level 1.0.
  • cargo test -p victory-shader --lib --locked: 303 passed, 0 failed, 3 ignored. cargo clippy -p victory-shader --all-targets --locked -- -D warnings is clean.

Offline counts and unit tests only; no program names or data.

…w on Marvisak#2999)

image_sample_o in compute was refused on the quad path (fuzeofficlal). The offset word is now decoded once, before the sample, sampleBias and sampleGrad paths, and the quad path passes it to sampleGrad. The lane-quad test binds its coordinates as a raw view, as the program reads them (steven-seagull27), and runs image_sample_o in wave32 and wave64.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Claude-Session: https://claude.ai/code/session_01LwHmoV6jP696CZH3DVW7V1
@wwwwwwww3333333

Copy link
Copy Markdown
Contributor Author

Both fixed in 7b5a3fc. @fuzeofficlal: the offset word is now decoded once, before the sample, sampleBias and sampleGrad paths, so image_sample_o in compute takes the quad path with its offset instead of being refused. @steven-seagull27: the test binds the coordinates as Stride::Raw, as the program reads them, and also runs image_sample_o. On an RX 6750 XT and WARP, wave32 and wave64, every lane reads level 1 in all eight cases; victory-shader 303 passed twice, clippy clean. Thanks to both of you, and to @zed6000 for the census.

@steven-seagull27

Copy link
Copy Markdown

@wwwwwwww3333333 I retested 7b5a3fc. On RTX 5080, Windows WARP and WARP 1.0.22, all 640/640 tagged offset samples per adapter returned the expected mip and texel. Each texel identifies its mip, X and Y, so an ignored or incorrectly signed offset changes the readback even if the sampler chooses the correct mip.

At mip 1, lane 0 read (8,6) with offset (0,0), (9,6) with (+1,0), and (6,7) with (-2,+1). The five offsets ran across all 64 threads for both guest wave sizes. On 1d7472f the same offset shaders were refused before dispatch. The updated stock raw-view test and the earlier 16,416-lane multidimensional LOD matrix also passed on each adapter.

AI-assisted with Codex. Synthetic tagged textures.

Marvisak commented Nov 26, 2026 •

Copy link
Copy Markdown
Owner

Automated triage for the maintainers.

Thanks, the size issue is fixed. In 86f801c the lane-quad code (implicit_level, row_thread_id, quad_gradients, sample_offsets) moves to crates/victory-shader/src/emit/lower/quads.rs with no change in logic. lower.rs is back under the 512 KiB limit, and CI is green.

Merge candidate. A compute program that samples with an implicit level runs its multi-row groups as one host row. The thread ids are rebuilt from the flat id, so quads are four lanes of one row, as on the console. The thread backs this with GPU readbacks on RTX 5080, WARP and two AMD cards, covering the texel-offset path, and with a census of +748 validating programs and none lost.

For the maintainers:

CI: passing.

Recommending a look, not approving.


Generated by Claude Code

lower.rs was 525,457 bytes on this branch, over the repository's 512 KiB
file limit (policy::tests::repository_passes_policy). implicit_level,
the one-row thread ids, quad_gradients (which now takes the bias scale)
and the decoding of a sample's offset word move to a submodule, as
lower/bvh.rs does; lower.rs is 522,621 bytes. No change in behaviour.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LwHmoV6jP696CZH3DVW7V1
@wwwwwwww3333333

Copy link
Copy Markdown
Contributor Author

CI fix in 86f801c: the lane-quad code (implicit_level, the one-row thread ids, quad_gradients, the offset-word decoding) moves to emit/lower/quads.rs, as lower/bvh.rs does. lower.rs is now 522,621 bytes. No change in behaviour: victory-shader passed 303 of 303 twice on an RX 6750 XT, Clippy is clean, and the xtask policy tests pass. CI is green.

@Dukestar69 Dukestar69 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally merged onto origin/main (63bcca4) on Windows 11 x64 (NVIDIA GeForce RTX 5090 + WARP + dxil.dll):

  • cargo test -p victory-shader compute_samples_take_derivatives_from_lane_quads -- --test-threads=1 (RTX 5090 & WARP): 1 passed, 0 failed on both.
  • cargo clippy -p victory-shader --all-targets -- -D warnings: clean.
  • cargo xtask policy: 192 files ok.

Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).

@fuzeofficlal fuzeofficlal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

86f801cf moves the quad helpers cleanly into emit/lower/quads.rs (bringing emit/lower.rs down to 522,621 bytes), fixes the compute image_sample_o regression by decoding offset_word ahead of the 60 | 61 if quad_grads branch, and binds the coordinate SRV as Stride::Raw.

A few issues still need attention:

  1. image_sample_b_o is unreachable despite matching implicit_level: quads::implicit_level matches image_sample_b_o (triggering group reshaping), and lines 8837-8854 already handle offset_word alongside op == 61, yet emit/lower.rs lines 8664-8677 only dispatch image_sample_b (image_sample_b_o hits Err(name)), and lines 8748-8749 only skip the bias address word for exact name == "image_sample_b". Please either wire up and test image_sample_b_o or explicitly scope it out.
  2. Partial / divergent quad edge cases: quad_gradients reads quad lanes base, base | 1, and base | 2 via waveReadLaneAt.i32 without checking source-lane activity. Please add test coverage for a partial tail quad or divergent control flow.
  3. In-tree offset verification & formatting: Because each mip in compute_samples_take_derivatives_from_lane_quads has a uniform color, the in-tree test only checks mip selection rather than texel offset forwarding; a tagged-texel assertion would pin that down in CI. Also rustfmt --edition 2024 --check reports line-wrapping diffs in quads.rs and synthetic_tests.rs.

Verified locally on Windows 11 x64 (RTX 5090 + WARP + dxil.dll, 86f801cf):

  • cargo run --locked -p xtask -- policy: passed (192 files ok)
  • cargo clippy -p victory-shader --all-targets --locked -- -D warnings (default and --all-features): clean
  • emit::lower::tests: 33 passed, 0 failed
  • compute_samples_take_derivatives_from_lane_quads and image_addresses_of_16_bits_and_clamps (RTX 5090 and VICTORY_WARP=1): 1 passed, 0 failed each

…d test

- image_sample_b_o takes the same path as image_sample_b (offset, bias,
  then coordinates).
- An implicit-level sample in a group whose size is not a multiple of 4
  is refused: the last quad would read lanes that are not threads.
  Quads that diverge before the sample are undefined, as on hardware.
- The lane-quad test tags each texel with its x, so it checks the level
  and the texel read; it covers image_sample_b_o with a bias of 1.
- rustfmt on quads.rs and the test.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LwHmoV6jP696CZH3DVW7V1
@wwwwwwww3333333

Copy link
Copy Markdown
Contributor Author

Thanks @fuzeofficlal. All three are addressed in 9833d58.

  1. image_sample_b_o is wired up: it takes the image_sample_b path, with the words in the order offset, bias, u, v. The test covers it with a bias of 1.
  2. Groups that are not whole quads: an implicit-level sample in a group whose size is not a multiple of 4 is now refused ("an implicit-level sample in a group of partial quads"), since the last quad would read lanes that are not threads. Lanes of a quad that diverge before the sample are not handled: the derivatives are undefined there on the hardware too, so I documented it in the code and added no test for it.
  3. Each texel of the test texture now carries its x (red = level + x / 10000), so the test checks the texel read as well as the level. Plain reads texel 8, the offset form 9, and the biased form with an offset reads level 2 at coordinate 5.25. rustfmt on quads.rs and synthetic_tests.rs is clean for what this PR touches; the one remaining diff, at synthetic_tests.rs:744, is older code I left alone.

Tests (RX 6750 XT and WARP, Windows 11, Rust 1.98.1 MSVC): the lane-quad test passes in wave32 and wave64 for all three forms, twice in a row. victory-shader 303 passed, 0 failed, 3 ignored. clippy -D warnings clean, cargo xtask policy 192 files ok, lower.rs 523,244 bytes.

Not covered: quads that diverge before a sample, and any title.

@steven-seagull27

Copy link
Copy Markdown

@wwwwwwww3333333 Confirmed 9833d58 on an RTX 5080 and Windows inbox WARP. With image_sample_b_o, both returned 1,920/1,920 correct mip and texel tags in each of two fresh runs. That is 960/960 for guest Wave32 and 960/960 for Wave64 on each adapter. I used point sampling, LOD biases −1, 0, +1, and five signed XY offsets across all 64 threads of an 8×8 group.

The tag encodes mip, X and Y independently. Holding lane 0's offset at (-2,+1) gave these exact readbacks on both adapters.

Bias Mip Texel (X,Y) Readback
−1 0 (14,13) 846
0 1 (6,7) 10454
+1 2 (2,4) 20258

At bias +1, changing just the offset to (0,0) read mip 2 at (4,3) (20196). The unchanged PR test also passed all three instruction forms on both guest wave sizes and adapters. For a [3,1,1] group, translation refused all three forms on Wave32 and Wave64 with the expected partial-quad diagnostic, before dispatch.

AI-assisted synthetic test. Divergence within a quad and title behavior remain untested here.

@fuzeofficlal fuzeofficlal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified 9833d580 on RTX 5090 and WARP: image_sample_b_o is now wired into the sampleGrad path, partial-quad thread groups are rejected (product % 4 != 0), emit/lower.rs stays under the policy cap at 523,244 bytes, and compute_samples_take_derivatives_from_lane_quads passes all three forms (Plain, Offset, BiasOffset) in Wave32 and Wave64 on both hardware and WARP with tagged texel checks.

One remaining blocker prevents merging:

  • Multi-row groups that also set console_lanes (emit/lower.rs:620-626, 2936-2976): if !console_lanes skips flattening [X, Y, Z] to [X*Y*Z, 1, 1], leaving the 2D/3D group intact and falling back to thread_id's align_down(waveReadLaneFirst(flattenedThreadIdInGroup), wave) + lane_index. On hosts that assign 2D groups in 2×2 tiles rather than x-major order (e.g., [6, 8, 1] at Wave32), two waves can start at flat IDs 0 and 28, both rounding down to 0 and producing duplicate guest thread IDs and corrupted quad gradients.

Two smaller notes:

  • Divergent branches within a quad call waveReadLaneAt.i32 unconditionally on base, base | 1, and base | 2 (quads.rs:45-70), where inactive lanes yield undefined values (potentially propagating into sampleGrad derivatives); keeping that boundary explicit and/or adding divergent-quad coverage is worth considering.
  • quads::implicit_level (quads.rs:8-15) matches image_get_lod, image_sample_c, image_sample_cl, and cube (kind == 5) ops even though compute quad_grads only lowers non-cube op 60/61.

Please make multi-row implicit-level compute groups with console_lanes independent of host tile ordering and add a multi-wave test covering that combination.

Verified locally on Windows 11 x64 (RTX 5090 + WARP + dxil.dll, 9833d580):

  • cargo run --locked -p xtask -- policy (192 files ok) and cargo clippy --workspace --all-targets -- -D warnings (default and --all-features): clean.
  • emit::lower::tests (33 passed), compute_samples_take_derivatives_from_lane_quads (Wave32 & Wave64, all 3 forms), image_addresses_of_16_bits_and_clamps, and emit::tests (17/17): all passed on both RTX 5090 and WARP.

crashbashash added a commit to crashbashash/VIctory-proton that referenced this pull request Nov 26, 2026
Reverts f21df5c. Upstream Marvisak#2999 (wwwwwwww3333333, on Marvisak#1237) carries the
same bias fix and also lays the lanes of a group with more than one row
out as the console's quads (four threads of one row), which Marvisak#1237 got
wrong for groups such as [8, 8, 1]. Its commits follow.
crashbashash pushed a commit to crashbashash/VIctory-proton that referenced this pull request Nov 26, 2026
…w on Marvisak#2999)

image_sample_o in compute was refused on the quad path (fuzeofficlal). The offset word is now decoded once, before the sample, sampleBias and sampleGrad paths, and the quad path passes it to sampleGrad. The lane-quad test binds its coordinates as a raw view, as the program reads them (steven-seagull27), and runs image_sample_o in wave32 and wave64.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Claude-Session: https://claude.ai/code/session_01LwHmoV6jP696CZH3DVW7V1
(cherry picked from commit 7b5a3fc)
crashbashash added a commit to crashbashash/VIctory-proton that referenced this pull request Nov 26, 2026
…IDIA device removals

The table row for upstream Marvisak#2999 (lane quads and the f16 bias of compute samples); the NVIDIA note names Marvisak#2118, with which lhnizdo saw no reset on an RTX 2080.
@steven-seagull27

Copy link
Copy Markdown

@fuzeofficlal I reproduced the multi-row failure from your review on 9833d580, on both the RTX 5080 (621.40) and app-local WARP 1.0.22. The guest shader combines image_sample with v_readlane_b32 and stores a pair at every guest thread ID: the tagged mip/texel it sampled and the flat ID it read from wave lane 0. Review

Guest group Wave32 destinations left unwritten on the PR head, each adapter Correct pairs with the patch, each adapter
6 × 8 × 1 16 / 48 48 / 48
6 × 16 × 1 32 / 96 96 / 96
8 × 8 × 1 control 0 / 64 64 / 64

A native HLSL probe on both adapters read first flat IDs 0 and 28 for the two 6 × 8 waves. Both round down to base 0. Sixteen IDs get assigned twice and IDs 32–47 are missing. The native 48 × 1 control read 0 and 32. An independent CPU model enumerating 2 × 2 tiles gives the same collisions.

The fix uses one host row for implicit-level sampling even when another instruction requires console lanes. It retains the wave lane index and reconstructs x/y/z with the original guest dimensions. Across the three shapes the RTX matched 208/208 Wave32 pairs. WARP 1.0.22 matched 208/208 at each of Wave32 and Wave64. Windows inbox WARP skipped both fixed widths. The regression also checks the emitted group dimensions without a working GPU. These measurements cover the converged sampling path. Commit and regression

git fetch https://github.com/steven-seagull27/VIctory.git codex/pr2999-multirow-guest-ids
git cherry-pick eec90086e8cd9d350addb5d00d12c633c525ea63
cargo test --locked -p victory-shader --lib multirow_samples_and_console_wave_reads_keep_each_guest_thread -- --nocapture

The original quad sampling test, strict all-feature shader Clippy, and asset policy passed. AI-assisted with Codex. Synthetic inputs on native Windows.

@wwwwwwww3333333

Copy link
Copy Markdown
Contributor Author

Thanks @fuzeofficlal for the review and @steven-seagull27 for the reproduction and the fix. I took steven's commit (eec9008, now 3f6b205 on this branch, author kept) as it is: a multi-row group that also needs console lanes is flattened to one host row for implicit-level sampling too, and the thread ids are rebuilt from the guest dimensions.

On an RX 6750 XT (RDNA2, driver 32.0.21045.29003, Windows 11, Rust 1.98.1), with the commit on top of 9833d58:

  • multirow_samples_and_console_wave_reads_keep_each_guest_thread passes on the hardware adapter (the built-in WARP skipped its Wave32 and Wave64 cases as unsupported);
  • compute_samples_take_derivatives_from_lane_quads passes;
  • victory-shader: 304 passed, 0 failed, 3 ignored;
  • clippy -D warnings clean, cargo xtask policy 193 files ok, lower.rs 523,400 bytes.

Not addressed in this push: quads that diverge before a sample (still undefined, as on the hardware), and the cube and image_get_lod cases where implicit_level matches more than compute lowers (I haven't added coverage for them).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants