Repository navigation
Conversation
|
Tested Independent Windows/D3D12 check on exact head
Not tested Real-title smoke runs, the full workspace suite, and other multisample counts. The extra multisample probe covered Direct DXIL. AI use OpenAI Codex (GPT-6 family, exact variant unavailable) prepared and ran the temporary probe, checked the outputs, and drafted this report. |
|
Diff audit on Remaining before merge:
|
86e9cef to
a4296ca
Compare
A D16 buffer format load packed a UNORM / SNORM channel with f32tof16 of the decoded f32: two roundings, the second toward zero on D3D12. RDNA2 rounds code / (2^w - 1) once to nearest even, so about half of all codes came back one unit in the last place low (16_UNORM 0x0801: 0x2800 for 0x2801). That value's binary expansion repeats the w-bit code, so its first 32 bits, floor((code << 32) / (2^w - 1)), decide the rounding and a tie cannot happen. Both paths; checked against exact rounding for every code at w = 2..16. xcl-dev#2026 (XCL-BT-020's third item). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rest image_load / image_sample / image_gather4 with D16 packed each channel with f32tof16 of the f32 the view returned: rounded twice, the second time toward zero on D3D12. RDNA2 rounds code / (2^w - 1) once to nearest even: 123 of the 256 8_8_8_8_UNORM codes came back one unit in the last place low (code 9: 0x2884 for 0x2885). The channels go through d16_fmt with the T#'s format, as the buffer format loads do. xcl-dev#2026. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
image_load with D16 kept the low half of a 32-bit UINT / SINT texel (70000 loaded as 0x1170). RDNA2 saturates: UINT to 0xFFFF, SINT to -32768..32767 (AnyPS5#22750, gfx1036; XCL-BT-028 in xcl-dev#1489). 8- and 16-bit integer formats never leave that range. Both paths. xcl-dev#2026. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
a4296ca to
7add2e7
Compare
|
A run with vkd3d-proton as the host D3D12 (DXIL → SPIR-V through dxil-spirv, then the NVIDIA Vulkan driver), so the DXIL goes through a different compiler than the native-Windows runs here: this PR's test passes. Tested
Not tested
AI use
|
|
Tested Independent Windows/D3D12 check on clean PR #2042 head
$testExe = 'L:\XclTooling\pr1947-1831ec4-t3-97236edf\target\debug\build\xcl\97fdf2b9ff8e1482\out\xcl-97fdf2b9ff8e1482.exe'
& $testExe gpu::recomp::tests::gpu_image_d16_loads_saturate_32_bit_integers --exact --nocapture --test-threads=1
Each run checked 64 lane results per format. Not tested MSAA and mip image loads, odd-channel high-half preservation, the full workspace suite, retail-title smoke runs, and other GPU adapters. The #2030 and #1977 tests were outside this run. AI use T3 Code / Codex ( |
Stacked on #2030 (itself on #2027): only the last commit (
Recompiler: D16 image loads of 32-bit integer texels saturate to 16 bits) belongs to this PR. It edits the same image D16 packing as #2030. Part of #2026; XCL-BT-028 in #1489.image_loadwithD16=1kept the low 16 bits of a 32-bit UINT / SINT texel, so 70000 loaded as0x1170. RDNA2 saturates instead: UINT to0xFFFF, SINT to-32768..32767(boykopovar/AnyPS5#22750, gfx1036). This is the image counterpart of #1977's buffer change.What is in it
recomp/emit.rs: the image-load D16halfclosure saturates integer channels by class (min(e, 0xFFFF)for UINT, a clamp for SINT) instead of& 0xFFFF.dxil/lower_image.rs:Lw::d16_int, used at the load and MSAA-load D16 sites.recomp/tests.rs:gpu_image_d16_loads_saturate_32_bit_integerscovers R32_UINT and R32_SINT textures with values in range and past both ends.8- and 16-bit integer formats never leave that range, so they're unchanged.
Tested on an RTX 3070 (Ampere, driver 616.56), Windows 11, debug, on
main5ce558f(rebased; #1947 now keys the translated cache on thegpu/dxilsources, so there is noTRANSLATOR_VERSIONbump):32_UINT 0x11170:0x1170, want0xffff). With it, it passes withXCL_DIRECT_DXIL=0and1.gpu_tests (--skip gpu_sparse_vram), with the whole stack (Recompiler: D16 format loads of UNORM / SNORM data round once to nearest #2027, Recompiler: D16 image reads of UNORM / SNORM texels round once to nearest #2030, Recompiler: D16 image loads of 32-bit integer texels saturate to 16 bits #2042): 135 passed withXCL_DIRECT_DXIL=0; with1, 134 passed and 1 failed,gpu_image_get_resinfo_1d_array, which fails the same way onmain5ce558f(Direct DXIL: image_get_resinfo of a 1D array gives the layers in y #2046 fixes it).dxil::andbuffer_formatunits: 138 passed.Regression run
I have no retail title here. Could someone with one post the
xcl-smokeblocks formainand this head?Not tested: AMD, titles.
AI-assisted (Claude Code). Synthetic tests only.
🤖 Generated with Claude Code