Recompiler: pixel comparison samples apply their LOD bias #349

Open
github-bot wants to merge 1 commit from github-bot/gh-349 into main AGit
Owner

@⁠Kalmarv on GitHub · 2026-11-24 00:07 UTC · original
Kalmarv:fix/ps-compare-bias → main · +116 −0 · 2 files · 1 commits · open

Pixel-shader image_sample_c_b* now applies the instruction’s LOD bias to depth comparisons. With point mip filtering, +1 selects the coarser mip and −1 the finer mip. This overlaps #247 in emit.rs and builds directly on main.

What is in it

  • crates/xcl/src/gpu/recomp/emit.rs — Scales ddx(coord) and ddy(coord) by exp2(bias). At ps_6_6, QuadReadAcrossX and QuadReadAcrossY on SV_Position identify the pixel in the quad. An unrolled four-iteration loop uses QuadReadLaneAt for the coordinate and both derivatives, then issues one native SampleCmp per iteration. Each pixel selects its own result.
  • crates/xcl/src/gpu/recomp/tests.rs — six 16×16 raster draws check positive, negative and per-pixel bias, the zero-offset form, zero bias and a minimum-LOD clamp against two opposite depth checkerboards with point mip filtering.

Tested

  • Head 7d1c008 is fe3011d's two commits squashed into one, with the same tree (git diff fe3011d 7d1c008 is empty). cargo test --workspace -- --test-threads=4 on 7d1c008 merged onto main 9e3831e (a clean merge, 389c343): 777 passed, 0 failed, 41 ignored (the xcl library: 728 passed, 21 ignored). SKIPPED: gpu_geometry_wave32_prefix_count_over_a_mask and gpu_wave32_program_in_wave64_hardware (no wave64), and heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows; main's own test).
  • Rebased head fe3011d1b16d on 18c105af8692. The bias and flat integer selector raster tests both passed (2 passed, 0 failed). cargo build --workspace passed. cargo test --workspace -- --test-threads=4 returned 690 passed, 0 failed, 41 ignored. GPU tests reporting SKIPPED within the pass count: gpu_geometry_wave32_prefix_count_over_a_mask (no wave64), gpu_wave32_program_in_wave64_hardware (no wave64).
  • Previous head cccc2c3890ef on an RTX 5070 Ti (610.74), SDK DXC 1.7, ps_6_6: the targeted raster test passed. The full workspace returned 652 passed, 0 failed, 40 ignored; two native-wave64 tests reported SKIPPED within the pass count. All six bias cases passed on the full-screen triangle and the partial quads along the diagonal.
  • Ryzen 9 9950X, RTX 5070 Ti (610.74), Windows 11 25H2 build 26200.9711, Rust 1.99.0 (MSVC x64), debug, SDK DXC 1.7.2308.16.
  • Head d25aea141589 on 9ab7d763197c. cargo build --workspace passed. cargo test --workspace -- --test-threads=4 returned 652 passed, 0 failed, 40 ignored. GPU tests reporting SKIPPED (included in Cargo’s pass count): gpu_geometry_wave32_prefix_count_over_a_mask (no wave64), gpu_wave32_program_in_wave64_hardware (no wave64).
  • Base 9ab7d763197c with only the tests added failed four of six draw cases. The two controls passed on base, and all six passed on this head.
  • Integration with the companion fix and #247 at a60db9f3e5f2: two checks passed. Both offset forms read the expected texel at mip 1 with a nonzero offset. SDK DXC compiled 20 opcode and view combinations.
  • Serial debug-layer suite on clean main: 593 passed, 18 failed, 20 ignored. On both main and the gradient run (594 passed, 18 failed, 20 ignored), CreateReservedResource returned E_OUTOFMEMORY in gpu_sparse_vram_descriptors_buffers_and_xmem. Three sparse windows had zero GPU addresses, then pipeline creation returned DXGI_ERROR_DEVICE_REMOVED.
  • Independent run by @⁠throny (https://github.com/ivall/xcl/pull/349#issuecomment-7118932697): RTX 4080 (NVIDIA 610.88), i9-12900K, Windows 11 26300, Rust 1.100.0, debug, d25aea1 merged onto main 7ebf1b8. The new test passes, and with emit.rs from main fails in four of its six cases. Their whole suite stopped in the #344 hang in 4 of 4 runs; with #443 merged too: 679 passed, 0 failed, 41 ignored.
  • Earlier smoke runs by @⁠CuteBooty, RTX 3070 (NVIDIA 617.14), release, on main 9ab7d76 and the head tested in that report: 918 and 913 frames, no crash or device removal (https://github.com/ivall/xcl/pull/349#issuecomment-7119194735).

Regression run

Our own runs, one after the other on the machine under Tested (RTX 5070 Ti), release builds, no uncommitted changes: main at 18c105a (this PR's base), then this PR's head 7d1c008. 1276 / 1246 frames (102 %), peak commit 26598 / 27160 MB (98 %); no device removal and no crash on either run.

main:

xcl-smoke v1
commit: 18c105af86929d6ae26c44096c85b66f1644e743
gpu: NVIDIA GeForce RTX 5070 Ti
title: ea3b5e4d
seconds: 60
exit: 0x0
frames shown: 1246 (PresentX 1246)
presents per 2 s (last 3): 18 15 7
device removals: 0
crashes: 0
peak commit: 27160 MB

PR:

xcl-smoke v1
commit: 7d1c008da9127bde6076023cd3856a92dbb04c40
gpu: NVIDIA GeForce RTX 5070 Ti
title: ea3b5e4d
seconds: 60
exit: 0x0
frames shown: 1276 (PresentX 1276)
presents per 2 s (last 3): 23 37 20
device removals: 0
crashes: 0
peak commit: 26598 MB

Not tested

  • AMD. The pixel-shader quad operations emitted by this change have never been compiled by an AMD driver in our testing.
  • Whether the title's frames reach these sample forms: the smoke run is a regression check only.
  • Cube and array sampling on hardware, and the throughput cost of issuing four comparison samples.

AI use

  • Codex (GPT-6.2 Astra): code, tests, the rebase onto 18c105a and its runs, and this description
  • Claude Code (Claude Opus 5.5): the smoke runs under Regression run, the squash into one commit and the suite run on 7d1c008

🤖 Generated with Claude Code

**@⁠Kalmarv** on GitHub · 2026-11-24 00:07 UTC · [original](https://github.com/xcl-dev/xcl/pull/349) `Kalmarv:fix/ps-compare-bias` → `main` · +116 −0 · 2 files · 1 commits · open Pixel-shader `image_sample_c_b*` now applies the instruction’s LOD bias to depth comparisons. With point mip filtering, +1 selects the coarser mip and −1 the finer mip. This overlaps #247 in `emit.rs` and builds directly on main. **What is in it** - `crates/xcl/src/gpu/recomp/emit.rs` — Scales `ddx(coord)` and `ddy(coord)` by `exp2(bias)`. At `ps_6_6`, `QuadReadAcrossX` and `QuadReadAcrossY` on `SV_Position` identify the pixel in the quad. An unrolled four-iteration loop uses `QuadReadLaneAt` for the coordinate and both derivatives, then issues one native `SampleCmp` per iteration. Each pixel selects its own result. - `crates/xcl/src/gpu/recomp/tests.rs` — six 16×16 raster draws check positive, negative and per-pixel bias, the zero-offset form, zero bias and a minimum-LOD clamp against two opposite depth checkerboards with point mip filtering. **Tested** - Head `7d1c008` is `fe3011d`'s two commits squashed into one, with the same tree (`git diff fe3011d 7d1c008` is empty). `cargo test --workspace -- --test-threads=4` on `7d1c008` merged onto `main` `9e3831e` (a clean merge, `389c343`): 777 passed, 0 failed, 41 ignored (the `xcl` library: 728 passed, 21 ignored). SKIPPED: `gpu_geometry_wave32_prefix_count_over_a_mask` and `gpu_wave32_program_in_wave64_hardware` (no wave64), and `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows; `main`'s own test). - Rebased head `fe3011d1b16d` on `18c105af8692`. The bias and flat integer selector raster tests both passed (2 passed, 0 failed). `cargo build --workspace` passed. `cargo test --workspace -- --test-threads=4` returned 690 passed, 0 failed, 41 ignored. GPU tests reporting SKIPPED within the pass count: `gpu_geometry_wave32_prefix_count_over_a_mask` (no wave64), `gpu_wave32_program_in_wave64_hardware` (no wave64). - Previous head `cccc2c3890ef` on an RTX 5070 Ti (610.74), SDK DXC 1.7, `ps_6_6`: the targeted raster test passed. The full workspace returned 652 passed, 0 failed, 40 ignored; two native-wave64 tests reported SKIPPED within the pass count. All six bias cases passed on the full-screen triangle and the partial quads along the diagonal. - Ryzen 9 9950X, RTX 5070 Ti (610.74), Windows 11 25H2 build 26200.9711, Rust 1.99.0 (MSVC x64), debug, SDK DXC 1.7.2308.16. - Head `d25aea141589` on `9ab7d763197c`. `cargo build --workspace` passed. `cargo test --workspace -- --test-threads=4` returned 652 passed, 0 failed, 40 ignored. GPU tests reporting SKIPPED (included in Cargo’s pass count): `gpu_geometry_wave32_prefix_count_over_a_mask` (no wave64), `gpu_wave32_program_in_wave64_hardware` (no wave64). - Base `9ab7d763197c` with only the tests added failed four of six draw cases. The two controls passed on base, and all six passed on this head. - Integration with the companion fix and #247 at `a60db9f3e5f2`: two checks passed. Both offset forms read the expected texel at mip 1 with a nonzero offset. SDK DXC compiled 20 opcode and view combinations. - Serial debug-layer suite on clean main: 593 passed, 18 failed, 20 ignored. On both main and the gradient run (594 passed, 18 failed, 20 ignored), `CreateReservedResource` returned `E_OUTOFMEMORY` in `gpu_sparse_vram_descriptors_buffers_and_xmem`. Three sparse windows had zero GPU addresses, then pipeline creation returned `DXGI_ERROR_DEVICE_REMOVED`. - Independent run by @⁠throny (https://github.com/ivall/xcl/pull/349#issuecomment-7118932697): RTX 4080 (NVIDIA 610.88), i9-12900K, Windows 11 26300, Rust 1.100.0, debug, `d25aea1` merged onto `main` `7ebf1b8`. The new test passes, and with `emit.rs` from `main` fails in four of its six cases. Their whole suite stopped in the #344 hang in 4 of 4 runs; with #443 merged too: 679 passed, 0 failed, 41 ignored. - Earlier smoke runs by @⁠CuteBooty, RTX 3070 (NVIDIA 617.14), release, on `main` `9ab7d76` and the head tested in that report: 918 and 913 frames, no crash or device removal (https://github.com/ivall/xcl/pull/349#issuecomment-7119194735). **Regression run** Our own runs, one after the other on the machine under **Tested** (RTX 5070 Ti), release builds, no uncommitted changes: `main` at `18c105a` (this PR's base), then this PR's head `7d1c008`. 1276 / 1246 frames (102 %), peak commit 26598 / 27160 MB (98 %); no device removal and no crash on either run. main: ``` xcl-smoke v1 commit: 18c105af86929d6ae26c44096c85b66f1644e743 gpu: NVIDIA GeForce RTX 5070 Ti title: ea3b5e4d seconds: 60 exit: 0x0 frames shown: 1246 (PresentX 1246) presents per 2 s (last 3): 18 15 7 device removals: 0 crashes: 0 peak commit: 27160 MB ``` PR: ``` xcl-smoke v1 commit: 7d1c008da9127bde6076023cd3856a92dbb04c40 gpu: NVIDIA GeForce RTX 5070 Ti title: ea3b5e4d seconds: 60 exit: 0x0 frames shown: 1276 (PresentX 1276) presents per 2 s (last 3): 23 37 20 device removals: 0 crashes: 0 peak commit: 26598 MB ``` **Not tested** - AMD. The pixel-shader quad operations emitted by this change have never been compiled by an AMD driver in our testing. - Whether the title's frames reach these sample forms: the smoke run is a regression check only. - Cube and array sampling on hardware, and the throughput cost of issuing four comparison samples. **AI use** - Codex (GPT-6.2 Astra): code, tests, the rebase onto `18c105a` and its runs, and this description - Claude Code (Claude Opus 5.5): the smoke runs under **Regression run**, the squash into one commit and the suite run on `7d1c008` 🤖 Generated with [Claude Code](https://claude.com/claude-code)
SM 6.6 has no comparison sample that takes a bias, so a pixel shader's
image_sample_c_b* selected its mip from the unbiased screen derivatives.
The derivatives are now scaled by 2^bias, and SampleCmp runs once for each
pixel of the quad (QuadReadLaneAt) with that pixel's footprint; each pixel
keeps its own result. A lane's own coordinate is used unchanged on an axis
it does not move along, so a non-finite derivative cannot turn it into NaN.
The test draws a full-screen triangle and one whose edge leaves partial
quads.

Assisted-by: Codex (GPT-6.2 Astra)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:20:55 +00:00
Author
Owner

@⁠ghost on GitHub · 2026-11-24 00:19 UTC · original

AMD run, since Not tested says no AMD driver has compiled these quad operations yet: d25aea1 merged onto main a6f5f7a (clean merge): pass on RDNA4, and the new test fails without the emit.rs change.

Tested

  • AMD Radeon RX 9060 XT (RDNA4, wave64 + mesh shaders), driver 32.0.32029.2010; Ryzen 7 5800X3D; Windows 11 Pro 26200; Rust 1.100.0; DXC 1.9.2602.17 (SDK 10.0.26100); debug build.
  • .\scripts\test.ps1: 677 passed, 0 failed, 41 ignored; no SKIPPED GPU tests.
  • XCL_REQUIRE_GPU=wave64,mesh cargo test -p xcl --lib gpu_ps_compare_mip: gpu_ps_compare_mip_bias passes.
  • Negative control: the merged tree with only emit.rs back on main. The test fails with IMAGE_SAMPLE_C_B, scale 0.125, slope 0: pixel (0,0): 0 instead of 1 from mip 1, plus the _C_B_CL, _C_B_O and slope 0.5 cases.
  • With #350 also merged (the shared sample_cmp_grad is identical, so git merges it cleanly): both compare-mip tests pass.

Not tested

  • A retail title (smoke.ps1); cube and array sampling on hardware; NVIDIA.

AI use

  • Claude Code (Claude Opus 5.5) ran the commands and wrote this report from the logs; I checked it before posting.
**@⁠ghost** on GitHub · 2026-11-24 00:19 UTC · [original](https://github.com/xcl-dev/xcl/pull/349#issuecomment-7117950680) AMD run, since **Not tested** says no AMD driver has compiled these quad operations yet: `d25aea1` merged onto `main` `a6f5f7a` (clean merge): **pass** on RDNA4, and the new test fails without the `emit.rs` change. **Tested** - AMD Radeon RX 9060 XT (RDNA4, wave64 + mesh shaders), driver 32.0.32029.2010; Ryzen 7 5800X3D; Windows 11 Pro 26200; Rust 1.100.0; DXC 1.9.2602.17 (SDK 10.0.26100); debug build. - `.\scripts\test.ps1`: 677 passed, 0 failed, 41 ignored; no `SKIPPED` GPU tests. - `XCL_REQUIRE_GPU=wave64,mesh cargo test -p xcl --lib gpu_ps_compare_mip`: `gpu_ps_compare_mip_bias` passes. - Negative control: the merged tree with only `emit.rs` back on `main`. The test fails with `IMAGE_SAMPLE_C_B, scale 0.125, slope 0: pixel (0,0): 0 instead of 1 from mip 1`, plus the `_C_B_CL`, `_C_B_O` and slope 0.5 cases. - With #350 also merged (the shared `sample_cmp_grad` is identical, so git merges it cleanly): both compare-mip tests pass. **Not tested** - A retail title (`smoke.ps1`); cube and array sampling on hardware; NVIDIA. **AI use** - Claude Code (Claude Opus 5.5) ran the commands and wrote this report from the logs; I checked it before posting.
Author
Owner

@⁠Kalmarv on GitHub · 2026-11-24 00:22 UTC · original

Thanks for testing on the RX 9060 XT and checking the negative control where reverting just the emitter change brought back all four mip-selection failures.

🤖 GPT-6.2 Astra

**@⁠Kalmarv** on GitHub · 2026-11-24 00:22 UTC · [original](https://github.com/xcl-dev/xcl/pull/349#issuecomment-7118001205) Thanks for testing on the RX 9060 XT and checking the negative control where reverting just the emitter change brought back all four mip-selection failures. 🤖 GPT-6.2 Astra
Author
Owner

@⁠throny on GitHub · 2026-11-24 01:16 UTC · original

NVIDIA RTX 40 run of d25aea1 on main 7ebf1b8 (clean merge): the new test passes and fails without the emit.rs change. The whole suite did not finish on this tree here, for a reason that is not this PR (below).

Tested

  • Windows 11 Pro 10.0.26300, NVIDIA GeForce RTX 4080 (driver 610.88, 32-lane waves), Intel i9-12900K, 64 GB; Rust 1.100.0 stable-x86_64-pc-windows-msvc, debug; DXC 1.9.2602.17 (Windows SDK 10.0.26100.0); no XCL_SAMPLE_*
  • cargo test --workspace -- --test-threads=4 on main + this PR: stopped in the lib tests in 4 of 4 runs (bases a6f5f7a, 2997c9a twice, 7ebf1b8), in the #344 deadlock (gpu_uma_import_check_at_init and three other GPU tests running for over 60 seconds; the same stop happens here on trees without this PR, stacks in my report on #443). gpu_ps_compare_mip_bias had passed before the stop each time.
  • The same tree with #443 (16fc79d) merged in as well: 679 passed, 0 failed, 41 ignored, gpu_ps_compare_mip_bias ok (one run).
  • SKIPPED on this adapter: gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware (no wave64)
  • Negative control: the merged tree with emit.rs from main: gpu_ps_compare_mip_bias fails in four of its six cases (IMAGE_SAMPLE_C_B +1, _C_B_CL −1, _C_B_O +1 and the per-pixel slope case); the two controls pass.
  • With #350 (13d8a1f): the two branches merge without a conflict although both add sample_cmp_grad and check_ps_depth_mip (one copy of each results), and cargo test -p xcl --lib gpu_ps_compare_mip on main + #350 + #349 passes both tests.

Reviewed (read the whole diff)

  • In iteration q every pixel of the quad computes coord[q] + (its position − q's position) · gradient[q], so the implicit derivatives SampleCmp sees are pixel q's scaled ones, and each pixel keeps the result of its own iteration (delta 0, its own coordinate). xi.xcl_pos is always a member of XclIn.

Not tested

  • No regression run (scripts/smoke.ps1) on a title, no shader-pack run (XCL_SAMPLE_RPF), wave64 hardware, cube and array forms (the test draws 2D only).

AI use

  • Claude Code (Claude Fable 5.2) ran the builds, the tests and the controls, read the diff and wrote this report. The runs above are real, on the hardware named.
**@⁠throny** on GitHub · 2026-11-24 01:16 UTC · [original](https://github.com/xcl-dev/xcl/pull/349#issuecomment-7118932697) NVIDIA RTX 40 run of `d25aea1` on `main` `7ebf1b8` (clean merge): the new test **passes** and fails without the `emit.rs` change. The whole suite did not finish on this tree here, for a reason that is not this PR (below). **Tested** - Windows 11 Pro 10.0.26300, NVIDIA GeForce RTX 4080 (driver 610.88, 32-lane waves), Intel i9-12900K, 64 GB; Rust 1.100.0 `stable-x86_64-pc-windows-msvc`, debug; DXC 1.9.2602.17 (Windows SDK 10.0.26100.0); no `XCL_SAMPLE_*` - `cargo test --workspace -- --test-threads=4` on `main` + this PR: stopped in the lib tests in 4 of 4 runs (bases `a6f5f7a`, `2997c9a` twice, `7ebf1b8`), in the #344 deadlock (`gpu_uma_import_check_at_init` and three other GPU tests running for over 60 seconds; the same stop happens here on trees without this PR, stacks in my report on #443). `gpu_ps_compare_mip_bias` had passed before the stop each time. - The same tree with #443 (`16fc79d`) merged in as well: 679 passed, 0 failed, 41 ignored, `gpu_ps_compare_mip_bias` ok (one run). - `SKIPPED` on this adapter: `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware` (no wave64) - Negative control: the merged tree with `emit.rs` from `main`: `gpu_ps_compare_mip_bias` fails in four of its six cases (`IMAGE_SAMPLE_C_B` +1, `_C_B_CL` −1, `_C_B_O` +1 and the per-pixel slope case); the two controls pass. - With #350 (`13d8a1f`): the two branches merge without a conflict although both add `sample_cmp_grad` and `check_ps_depth_mip` (one copy of each results), and `cargo test -p xcl --lib gpu_ps_compare_mip` on `main` + #350 + #349 passes both tests. **Reviewed** (read the whole diff) - In iteration `q` every pixel of the quad computes `coord[q] + (its position − q's position) · gradient[q]`, so the implicit derivatives `SampleCmp` sees are pixel `q`'s scaled ones, and each pixel keeps the result of its own iteration (delta 0, its own coordinate). `xi.xcl_pos` is always a member of `XclIn`. **Not tested** - No regression run (`scripts/smoke.ps1`) on a title, no shader-pack run (`XCL_SAMPLE_RPF`), wave64 hardware, cube and array forms (the test draws 2D only). **AI use** - Claude Code (Claude Fable 5.2) ran the builds, the tests and the controls, read the diff and wrote this report. The runs above are real, on the hardware named.
Author
Owner

@⁠QemmHD on GitHub · 2026-11-24 01:18 UTC · original

Review: scaling ddx/ddy by exp2(bias) adds the bias to log2 of the footprint, and the quad construction reproduces those derivatives exactly. Two points (same as on #350):

  1. emit.rs:2191-2196: offsets for comparison samples still use level 0u, so _c_b_o / _c_b_cl_o with a non-zero offset move by mip-0 texels while the bias selects mip ≥ 1. The test's _O rows use offset 0; a note on the #247 dependency, or a non-zero-offset row after #247, would cover it.
  2. The full-screen triangle never creates a partial quad, so helper lanes (which QuadReadLaneAt and SampleCmp depend on here) aren't exercised; an edge through quads would cover that.

AI-assisted review (Claude Code, Claude Opus 5.5).
Discord: bigpeppa.

**@⁠QemmHD** on GitHub · 2026-11-24 01:18 UTC · [original](https://github.com/xcl-dev/xcl/pull/349#issuecomment-7118967922) Review: scaling `ddx/ddy` by `exp2(bias)` adds the bias to log2 of the footprint, and the quad construction reproduces those derivatives exactly. Two points (same as on #350): 1. `emit.rs:2191-2196`: offsets for comparison samples still use level `0u`, so `_c_b_o` / `_c_b_cl_o` with a non-zero offset move by mip-0 texels while the bias selects mip ≥ 1. The test's `_O` rows use offset 0; a note on the #247 dependency, or a non-zero-offset row after #247, would cover it. 2. The full-screen triangle never creates a partial quad, so helper lanes (which `QuadReadLaneAt` and `SampleCmp` depend on here) aren't exercised; an edge through quads would cover that. AI-assisted review (Claude Code, Claude Opus 5.5). Discord: bigpeppa.
Author
Owner

@⁠CuteBooty on GitHub · 2026-11-24 01:32 UTC · original

Regression run on a retail title for d25aea1, which the description lists as pending: pass (no device removal, no crash, frames and peak commit level with main).

Tested

  • RTX 3070 8 GB (32-lane waves), NVIDIA 617.14; Ryzen 5 3600, 32 GB; Windows 11 Pro 26200; rustc 1.100.0 MSVC; release build.
  • scripts\smoke.ps1 -Game <folder> -Seconds 60 on the PR's head as it is and on main 9ab7d76, the commit it is based on, each built from a clean checkout of its commit.
  • Each build ran twice back to back and the blocks are the second runs. The first runs: 912 frames (main) and 911 frames (PR), also with no device removal or crash. The main block is one run, shared with my reports on #348 and #350.
  • Video memory at 60 s, from XCL's memory: line: 6311 MB local / 4619 MB non-local (main), 6311 MB local / 4619 MB non-local (PR).

main:

xcl-smoke v1
commit: 9ab7d763197c7f420bff10cd9bf1310f07e2a9aa
gpu: NVIDIA GeForce RTX 3070
title: game
seconds: 60
exit: 0x0
frames shown: 918 (PresentX 918)
presents per 2 s (last 3): 40 41 40
device removals: 0
crashes: 0
peak commit: 14793 MB

PR:

xcl-smoke v1
commit: d25aea1415895c250f82ec3b36023761c146a3ad
gpu: NVIDIA GeForce RTX 3070
title: game
seconds: 60
exit: 0x0
frames shown: 913 (PresentX 914)
presents per 2 s (last 3): 41 40 40
device removals: 0
crashes: 0
peak commit: 14796 MB

Not tested

  • The test suite on this head (others have posted it), anything past the first 60 s, and whether a shader the title draws with in these 60 s has a comparison sample with a bias (the case this changes).

AI use: Claude Code with Claude Fable 5.2 made the runs with me present and wrote this comment.

**@⁠CuteBooty** on GitHub · 2026-11-24 01:32 UTC · [original](https://github.com/xcl-dev/xcl/pull/349#issuecomment-7119194735) Regression run on a retail title for `d25aea1`, which the description lists as pending: **pass** (no device removal, no crash, frames and peak commit level with `main`). **Tested** - RTX 3070 8 GB (32-lane waves), NVIDIA 617.14; Ryzen 5 3600, 32 GB; Windows 11 Pro 26200; rustc 1.100.0 MSVC; release build. - `scripts\smoke.ps1 -Game <folder> -Seconds 60` on the PR's head as it is and on `main` `9ab7d76`, the commit it is based on, each built from a clean checkout of its commit. - Each build ran twice back to back and the blocks are the second runs. The first runs: 912 frames (`main`) and 911 frames (PR), also with no device removal or crash. The `main` block is one run, shared with my reports on #348 and #350. - Video memory at 60 s, from XCL's `memory:` line: 6311 MB local / 4619 MB non-local (`main`), 6311 MB local / 4619 MB non-local (PR). main: ``` xcl-smoke v1 commit: 9ab7d763197c7f420bff10cd9bf1310f07e2a9aa gpu: NVIDIA GeForce RTX 3070 title: game seconds: 60 exit: 0x0 frames shown: 918 (PresentX 918) presents per 2 s (last 3): 40 41 40 device removals: 0 crashes: 0 peak commit: 14793 MB ``` PR: ``` xcl-smoke v1 commit: d25aea1415895c250f82ec3b36023761c146a3ad gpu: NVIDIA GeForce RTX 3070 title: game seconds: 60 exit: 0x0 frames shown: 913 (PresentX 914) presents per 2 s (last 3): 41 40 40 device removals: 0 crashes: 0 peak commit: 14796 MB ``` **Not tested** - The test suite on this head (others have posted it), anything past the first 60 s, and whether a shader the title draws with in these 60 s has a comparison sample with a bias (the case this changes). **AI use:** Claude Code with Claude Fable 5.2 made the runs with me present and wrote this comment.
Author
Owner

@⁠Kalmarv on GitHub · 2026-11-24 02:26 UTC · original

Thanks for checking the mip calculation and the triangle coverage.

The standalone head uses mip-0 texel units for both offset forms, and its two offset rows pass zero. I added that dependency to the PR body draft. With #247 at a60db9f, a synthetic IMAGE_SAMPLE_C_B_O draw with a +1 X offset read the expected neighbor at mip 1.

The full-screen triangle left the helper-lane case uncovered. The test now keeps that draw and adds a diagonal that leaves one or three covered pixels in each edge quad. The bias fixture now enters whole-quad mode (S_WQM_B64 EXEC, EXEC) before computing texture coordinates so helper pixels supply the screen derivatives. It checks the depth comparison for all 96 covered pixels and the clear value for the other 160.

Tested

PR head cccc2c3890ef on an RTX 5070 Ti (610.74), SDK DXC 1.7, ps_6_6: the targeted raster test passed. The full workspace returned 652 passed, 0 failed, 40 ignored; two native-wave64 tests reported SKIPPED within the pass count.

Not tested

AMD on this follow-up. Our title smoke pair on this head is in the description; the title doesn't show whether it reaches these sampling forms.

🤖 GPT-6.2 Astra

**@⁠Kalmarv** on GitHub · 2026-11-24 02:26 UTC · [original](https://github.com/xcl-dev/xcl/pull/349#issuecomment-7120140291) Thanks for checking the mip calculation and the triangle coverage. The standalone head uses mip-0 texel units for both offset forms, and its two offset rows pass zero. I added that dependency to the PR body draft. With #247 at `a60db9f`, a synthetic `IMAGE_SAMPLE_C_B_O` draw with a +1 X offset read the expected neighbor at mip 1. The full-screen triangle left the helper-lane case uncovered. The test now keeps that draw and adds a diagonal that leaves one or three covered pixels in each edge quad. The bias fixture now enters whole-quad mode (`S_WQM_B64 EXEC, EXEC`) before computing texture coordinates so helper pixels supply the screen derivatives. It checks the depth comparison for all 96 covered pixels and the clear value for the other 160. **Tested** PR head `cccc2c3890ef` on an RTX 5070 Ti (610.74), SDK DXC 1.7, `ps_6_6`: the targeted raster test passed. The full workspace returned 652 passed, 0 failed, 40 ignored; two native-wave64 tests reported SKIPPED within the pass count. **Not tested** AMD on this follow-up. Our title smoke pair on this head is in the description; the title doesn't show whether it reaches these sampling forms. 🤖 GPT-6.2 Astra
Author
Owner

@⁠thehollowedone on GitHub · 2026-11-24 07:42 UTC · original

Independent native D3D12 check of fe3011d on RTX 3080 Ti / 621.35, Windows 11 build 26300, DXC 1.8.2502.11 and Rust 1.99.1 MSVC, release.

All six bias cases matched the expected pixel values on both the full-screen and partial-quad triangles. The flat integer selector control passed too. The offset variants in this fixture use zero offsets. Two stock tests passed, with zero failures, ignores or skips.

Commands used XCL_ADAPTER=3080 Ti and cargo test --locked --offline --release -p xcl --lib <filter> -- --test-threads=1 --nocapture, with gpu_ps_compare_mip_bias and gpu_ps_p0_reads_flat_integer_selectors.

AI use: Codex (GPT-6, exact variant unavailable) ran the tests and drafted this report.

**@⁠thehollowedone** on GitHub · 2026-11-24 07:42 UTC · [original](https://github.com/xcl-dev/xcl/pull/349#issuecomment-7125277485) Independent native D3D12 check of [`fe3011d`](https://github.com/ivall/xcl/commit/fe3011d1b16d206391c8c859801d86519f4d3c2d) on RTX 3080 Ti / 621.35, Windows 11 build 26300, DXC 1.8.2502.11 and Rust 1.99.1 MSVC, release. All six bias cases matched the expected pixel values on both the full-screen and partial-quad triangles. The flat integer selector control passed too. The offset variants in this fixture use zero offsets. Two stock tests passed, with zero failures, ignores or skips. Commands used `XCL_ADAPTER=3080 Ti` and `cargo test --locked --offline --release -p xcl --lib <filter> -- --test-threads=1 --nocapture`, with `gpu_ps_compare_mip_bias` and `gpu_ps_p0_reads_flat_integer_selectors`. AI use: Codex (GPT-6, exact variant unavailable) ran the tests and drafted this report.
Author
Owner

@⁠Kalmarv on GitHub · 2026-11-24 17:50 UTC · original

Squashed into one commit (7d1c008, the same tree as before) as CONTRIBUTING asks; the smoke pair for it is queued.

A note for the merge order with #247: this PR makes the PS SampleCmp take the bias, and #247 moves a comparison offset by the mip that sample reads. With both in a tree, one line in #247's offset code has to take the bias too, or gpu_image_sample_c_b_d_offset_moves_by_the_mip_read fails (sample_c_b_o, PS: pixel (0,0) = 0). We have that line ready and tested (62f93a3; with it the test passes, and main + all eleven of our open PRs + both follow-ups pass the whole suite, 815 passed, 0 failed). Whichever of the two lands second, we push it there.

AI use: Claude Code (Claude Opus 5.5)

**@⁠Kalmarv** on GitHub · 2026-11-24 17:50 UTC · [original](https://github.com/xcl-dev/xcl/pull/349#issuecomment-7139784893) Squashed into one commit (`7d1c008`, the same tree as before) as CONTRIBUTING asks; the smoke pair for it is queued. A note for the merge order with #247: this PR makes the PS `SampleCmp` take the bias, and #247 moves a comparison offset by the mip that sample reads. With both in a tree, one line in #247's offset code has to take the bias too, or `gpu_image_sample_c_b_d_offset_moves_by_the_mip_read` fails (`sample_c_b_o, PS: pixel (0,0) = 0`). We have that line ready and tested (`62f93a3`; with it the test passes, and main + all eleven of our open PRs + both follow-ups pass the whole suite, 815 passed, 0 failed). Whichever of the two lands second, we push it there. **AI use:** Claude Code (Claude Opus 5.5)
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 14:29 UTC · original

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-25 14:29 UTC · [original](https://github.com/xcl-dev/xcl/pull/349#issuecomment-7165349357) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/349/head:github-bot/gh-349'
git switch 'github-bot/gh-349'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-349'
git switch 'github-bot/gh-349'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-349'
git switch 'github-bot/gh-349'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-349'
git switch 'main'
git merge --squash 'github-bot/gh-349'
git switch 'main'
git merge --ff-only 'github-bot/gh-349'
git switch 'main'
git merge 'github-bot/gh-349'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.