Repository navigation
Conversation
|
AMD run, since Not tested says no AMD driver has compiled these quad operations yet: Tested
Not tested
AI use
|
|
NVIDIA RTX 40 run of Tested
Reviewed (read the whole diff)
Not tested
AI use
|
|
Review: the quad construction is exact (the coordinate is affine across the quad and each lane's own coordinate is unchanged), and staying on
AI-assisted review (Claude Code, Claude Opus 5.5). |
|
Regression run on a retail title for Tested
main: PR: Not tested
AI use: Claude Code with Claude Fable 5.2 made the runs with me present and wrote this comment. |
|
Thanks for checking the mip calculation and the triangle coverage. The standalone head uses mip-0 texel units for the explicit-gradient offset forms, and both offset rows pass zero. I added that dependency to the PR body draft. With #247 at 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. It checks the depth comparison for all 96 covered pixels and the clear value for the other 160. With the tests carried onto Tested PR head 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 |
bf32301 to
f09eca5
Compare
|
Independent native D3D12 check of Both DXC 1.8.2502.11 and 1.6.2112.16 passed all nine explicit-gradient cases on both triangle coverage patterns, including NaN, positive infinity and negative infinity with the mip fixed. The flat integer selector control also passed on both compilers. Four test runs passed, with zero failures, ignores or skips. The offset variants use zero offsets. I used AI use: Codex (GPT-6, exact variant unavailable) ran the tests and drafted this report. |
f09eca5 to
08866f9
Compare
|
Squashed into one commit ( A note for the merge order with #247: this PR makes the PS AI use: Claude Code (Claude Opus 5.5) |
|
Tested Independent native Windows run for PR #350 at clean detached
& 'L:/XclTooling/Invoke-ArcTest.ps1' -Test {
& 'L:/XclTooling/verify-pr1523-1362129-t3-cf2e05e7/target/debug/build/xcl/00e28da3621caf64/out/xcl-00e28da3621caf64.exe' --exact gpu::recomp::tests::gpu_ps_compare_mip_gradients --nocapture --test-threads=1
}1 passed, 0 failed, 0 ignored, 0 GPU skips, 671 filtered out, 2.76 s. The fixture and mutex wrapper both exited 0. Executable SHA-256 matched before the wait, under the mutex, and after the fixture exited. All nine stock HLSL/DXC cases passed on both triangle geometries. The fixture checks exact red-channel comparison results on the 16×16 readback, including the gradient that selects adjacent mips across pixel columns, the non-finite gradient controls, and the clear value for uncovered pixels. The offset forms use zero offsets. Not tested Nonzero offsets, cube and array textures, direct DXIL lowering, the PR base, other adapters, the workspace suite, and title smoke runs. AI use T3 Code / Codex (gpt-6.2-sol) verified the checkout, ran the checked-in fixture, and wrote this report. |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Texture-compare sampling with mip gradients returns wrong texels at mip transitions on the GPU — a real sampling regression. Needs a fix before merge. — Devin |
|
Thanks @DavidM1911. It fails the same way here on an RTX 5070 Ti, with AI use: drafted with Claude Code (Claude Opus 5.5); the test run is my own. |
SM 6.6 has no comparison sample that takes gradients, so a pixel shader's image_sample_c_d* and image_sample_c_cd* selected their mip from the screen derivatives. SampleCmp now runs once for each pixel of the quad (QuadReadLaneAt) with a footprint built from that pixel's supplied gradients, array layers kept whole and cube-face gradients projected back to directions; each pixel keeps its own result. A lane's own coordinate is used unchanged on an axis it does not move along, so an infinite or NaN gradient cannot turn it into NaN. The sample runs in every lane of the quad, as an implicit-LOD one does: a helper lane outside EXEC must take part in the quad reads and derivatives. Assisted-by: Codex (GPT-6.2 Astra) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
08866f9 to
9249b7a
Compare
|
@DavidM1911 fixed and pushed ( What went wrong: this PR predates 5195e27, which puts pixel-shader samples without implicit derivatives inside an EXEC check. The emulated compare-with-gradients reads all four lanes of the quad and relies on SampleCmp's quad derivatives. The partial quad's helper lane, pixel (11,1) of the 12×16 triangle, is outside EXEC, so it skipped the sample and left its neighbours' LOD undefined. The PR's own head still passed on its old base; only the merge failed. The fix runs that sample in every lane of the quad, the way implicit-LOD samples already run, and writes the result only for lanes in EXEC. On the RTX 5070 Ti: AI use: investigated and fixed with Claude Code (Claude Opus 5.5). |
|
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
Thanks! — Devin |
|
@DavidM1911 thanks for the re-run. We ran the same here:
Since this PR's test is the one that fails every time at 32 threads, I'll make it take the same lock the Were your 3 among these? If not, could you paste their names and the panic messages? #1978 was closed by #2002, which is on AI use: Claude Code (Claude Opus 5.5) ran these tests and drafted this reply. |
|
Follow-up on the lock: it doesn't help, so it isn't pushed. With
So the out-of-memory doesn't come from this test running beside the AI use: Claude Code (Claude Opus 5.5) made the change, ran these tests and wrote this comment. |
|
RTX 3070 8 GB run of
NVIDIA 616.56, 32 logical CPUs, Windows 11 26100, Rust 1.100.0, debug, DXC 1.8.2502.11. Not tested: merged with current Update (08:26Z): with the same local labelled build, 6 more runs of AI use: Claude Code (Claude Opus 5.5) ran the builds, tests and controls and wrote this from the logs. |
Pixel-shader
image_sample_c_d*andimage_sample_c_cd*now use the instruction’s gradients for depth comparisons. Main selected the mip from screen derivatives even when the instruction requested a finer or coarser footprint. This overlaps #247 inemit.rsand builds directly on main.What is in it
crates/xcl/src/gpu/recomp/emit.rs— Uses the instruction’s X and Y gradients, keeping array layers discrete and projecting cube-face coordinates back to a direction. Atps_6_6,QuadReadAcrossXandQuadReadAcrossYonSV_Positionidentify the pixel in the quad. An unrolled four-iteration loop usesQuadReadLaneAtfor the coordinate and both derivatives, then issues one nativeSampleCmpper iteration. Each pixel selects its own result.crates/xcl/src/gpu/recomp/tests.rs— six 16×16 raster draws check coarser, finer and per-pixel gradients, the coarse-derivative zero-offset form, matching gradients and a minimum-LOD clamp against two opposite depth checkerboards with point mip filtering.Tested
9249b7a, onmain06c9f55, with DXC 1.9.2609:cargo test --workspace -- --test-threads=4(debug): 1266 passed, 0 failed, 46 ignored, with 25 SKIPPED notices from 15 tests (no native wave64, three refused per-lane cases, no heap windows). In release,gpu_ps_compare_mip_gradients1 passed,gpu_ps_7 passed andsample22 passed, 0 failed each. On this base the change needed one fix:main's5195e27runs an image sample without an implicit LOD only in the lanes EXEC keeps, but a comparison with gradients reads every pixel of the quad (QuadReadLaneAt). This head runs it in all four lanes, as an implicit-LOD sample is run, with a lane outside EXEC given descriptor index 0 and a zero result.13d8a1fmerged ontomain7ebf1b8.cargo test --workspace -- --test-threads=4: 678 passed, 0 failed, 41 ignored. Withemit.rsfrommainthe new test fails in four of its six cases. With Recompiler: pixel comparison samples apply their LOD bias #349 merged too, both tests pass.9249b7amerged with currentmain, thank you:cargo test -p xcl --lib(the library only, not the workspace). Run in parallel, 3 tests failed; the comment does not name them. Rerun with--test-threads=1: 1304 passed, 0 failed, 27 ignored (Recompiler: comparison samples use their supplied pixel gradients #350 (comment)). They count the parallel failures as the flakes of Test suite: parallel cargo test intermittently dies with 0xc0000005 (hle::d3d12x queue_tests × list_x race) #1978. That issue was closed by Tests: avoid poisoning SYNC_GRAPH with an unmapped fake fence in queue_tests (#1978) #2002, which thismaincontains.main9ab7d76and this head: 918 and 909 frames, no crash or device removal (Recompiler: comparison samples use their supplied pixel gradients #350 (comment)).Regression run
Our own runs with
scripts/smoke.ps1, 120 s each, one after the other on the machine under Tested (RTX 5070 Ti), release builds from clean trees, on the direct route:XCL_DIRECT_DXIL=1, each run with its own XCL cache that starts from the same list of used pipelines (the driver's own cache untouched).mainat08db802(a newermainthan this PR's base06c9f55, which it contains), then this PR's head9249b7a. Themainrun is shared: one run serves this PR and #2098 and #245. All of these ran as one queue job, after one uncounted warm-up run ofmain(the title ran from a second exe path, whose driver cache starts cold). The job was queued to run beside a CPU-bound pipeline precompile on the same machine, but that precompile ended during the warm-up, so none of the runs above had it beside them.main:
PR:
PR vs
main: 1311 / 1313 frames (100 %), peak commit 29495 / 29957 MB (98 %); device removals 0 and crashes 0 on the PR run, 0 and 0 onmain.Not tested
AI use
08866f9🤖 Generated with Claude Code