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. |
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. Assisted-by: Codex (GPT-6.2 Astra) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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. |
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
08866f9isf09eca5's two commits squashed into one, with the same tree (git diff f09eca5 08866f9is empty).f09eca5isbf32301rebased from9ab7d76ontodd2ae9a(git range-diff: both commits=).cargo test --workspace -- --test-threads=4on08866f9merged ontomain9e3831e(a clean merge,9cac114): 777 passed, 0 failed, 41 ignored (thexcllibrary: 728 passed, 21 ignored). SKIPPED:gpu_geometry_wave32_prefix_count_over_a_maskandgpu_wave32_program_in_wave64_hardware(no wave64), andheap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows;main's own test).bf32301d87b8, on9ab7d76. SDK DXC 1.7 on the RTX 5070 Ti passed all nine comparison cases on both the full-screen and partial-quad draws. Positive infinity, negative infinity and NaN each selected a wrong texel with the old emitter; the fix preserves the sample coordinate on a stationary axis. The full workspace passed (652 passed, 0 failed, 40 ignored, including the same two native-wave64 skips described below).13d8a1f5e592on9ab7d763197c.cargo build --workspacepassed.cargo test --workspace -- --test-threads=4returned 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).9ab7d763197cwith only the tests added failed four of six draw cases. The two controls passed on base, and all six passed on this head.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.CreateReservedResourcereturnedE_OUTOFMEMORYingpu_sparse_vram_descriptors_buffers_and_xmem. Three sparse windows had zero GPU addresses, then pipeline creation returnedDXGI_ERROR_DEVICE_REMOVED.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.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, one after the other on the machine under Tested (RTX 5070 Ti), release builds, no uncommitted changes:
mainatdd2ae9a(this PR's base), then this PR's head08866f9. 1260 / 1260 frames (100 %), peak commit 27098 / 26962 MB (101 %); no device removal and no crash on either run.main:
PR:
Not tested
AI use
08866f9🤖 Generated with Claude Code