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. |
draw_views created a direct command queue and a fence for every draw. The new gpu_ps_compare_mip_gradients test makes 18 draws, and in a full lib run at the default thread count CreateCommandQueue then failed with E_OUTOFMEMORY (0x8007000E) in it and in other GPU tests on 8 GB cards, while VRAM stayed under a third full (upipibi's report on xcl-dev#350). draw_views already holds the runner's GPU lock, whose device has a direct queue and fence that dispatches and mesh draws use. Its draws now submit there too. draw_on_multi, called with other devices, still creates its own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@upipibi thank you, your diagnosis was right.
AI use: Claude Code (Claude Opus 5.5) wrote the change, ran the tests and wrote this. |
|
@Kalmarv re your 11:50Z comment: repeated the old/new comparison on the 8 GB card where 9249b7a failed. RTX 3070 8 GB (Ampere), driver 616.56, Windows 11, 32 threads (default). 9249b7a: 0x8007000E in 3 of 3. gpu_ps_compare_mip_gradients every run and gpu_ps_p0_reads_flat_integer_selectors once (both via the runner's draw), plus vram d32s8_targets_take_their_own_size_of_video_memory twice at its own CreateCommandQueue. 1185, 1185, 1186 passed. The only other failure, coherent_buffer_sanitizes_console_flags_and_state (VirtualFree assert, 2 of 3 old runs, none new), is the #1487 flake fixed by #1590, which is on main but not in this branch's base 06c9f55. AI-assisted (Claude Code, Claude Opus 5.5). |
|
NVIDIA and AMD full-suite run, to go with the reports above by upipibi, since none of them covers AMD. Tested exact head Tested
Not tested
AI use
|
|
Independent test report under Wine/Proton (not native Windows) for head Tested
The same 11 failures happen on both runs under Wine ( The PR run's extra failure is
The crash happens on Not tested
AI use
|
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.crates/xcl/src/gpu/recomp/runner.rs(second commit,3d8246e): the test runner's graphics draws (draw_views) submit on the runner's own queue and fence, which they already hold the lock for, instead of creating a direct queue and fence per draw. The new test makes 18 draws, and at the default test thread countCreateCommandQueuefailed withE_OUTOFMEMORY(0x8007000E) in it and in other GPU tests.draw_on_multi, called with other devices, keeps its own queue.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.3d8246e, with DXC 1.9.2609:cargo test --workspace --no-fail-fast -- --test-threads=4(debug): 1266 passed, 0 failed, 46 ignored, with 25 SKIPPED notices (21 no native wave64, three refused per-lane cases, no heap windows).cargo test -p xcl --lib, the two heads alternating, 3 runs each: on9249b7aevery run failed with 0x8007000E (1, 2 and 3 failures;gpu_ps_compare_mip_gradientsin all three,d32s8_targets_take_their_own_size_of_video_memorytwice,gpu_ps_p0_reads_flat_integer_selectorsonce). On3d8246e, 0x8007000E never appeared: 1197 passed, 0 failed, 26 ignored twice, and once 1196 passed with 1 failure incoherent_buffer_sanitizes_console_flags_and_stateat its finalVirtualFree. That test doesn't draw, and Tests: free an imported heap's memory once its held Release has gone #910 and Tests: stop leaking imported heap resource references #1520 are about it.9249b7aat 32 threads failed with 0x8007000E fromCreateCommandQueuein the draw path, against 0 of 5 onmain, with VRAM peaking at 2.3 of 8 GB. They also confirmed the fix itself at one thread, with negative controls that revert the EXEC change or all ofemit.rs.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
scripts/smoke.ps1(60 s), the same retail title, one after the other in one job on the machine under Tested (RTX 5070 Ti), release builds from clean trees, default route.mainb49be18(a newermainthat contains this PR's base06c9f55), then this PR's head3d8246e.PR vs
main: 1494 / 1478 frames (101 %), peak commit 14776 / 17502 MB (84 %); device removals 0 and crashes 0 on both runs. The pair for the previous head9249b7a(120 s,XCL_DIRECT_DXIL=1, againstmain08db802) had 1311 / 1313 frames and 29495 / 29957 MB.Not tested
AI use
08866f9and3d8246e, and the runner change in3d8246e🤖 Generated with Claude Code