From f884dc52d76f8e12c1f332dde4cf3b99c5b90ef4 Mon Sep 17 00:00:00 2001 From: upipibi Date: Tue, 24 Nov 2026 19:58:37 -0600 Subject: [PATCH] Direct DXIL: image_get_resinfo of a 1D array gives the layers in y The direct translator took a 1D array (DIM 4) through the catch-all arm, which put the layer count in z and 1 in y. RDNA gives it in y, as the HLSL path does since #1266 (cafda82), so gpu_image_get_resinfo_1d_array failed with XCL_DIRECT_DXIL=1 ([4, 1, 1] for [4, 3, 1]). Co-Authored-By: Claude Opus 5.5 --- crates/xcl/src/gpu/dxil/lower_image.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/xcl/src/gpu/dxil/lower_image.rs b/crates/xcl/src/gpu/dxil/lower_image.rs index 07c5aba4a..7fc4e194a 100644 --- a/crates/xcl/src/gpu/dxil/lower_image.rs +++ b/crates/xcl/src/gpu/dxil/lower_image.rs @@ -778,6 +778,8 @@ impl Lw { (e(lw, 0), e(lw, 1), lw.mul(n, k), e(lw, 3)) } 2 | 5 => (e(lw, 0), e(lw, 1), e(lw, 2), e(lw, 3)), + // a 1D array: RDNA gives its layers in y (and z), as the HLSL path does + 4 => (e(lw, 0), e(lw, 1), e(lw, 1), e(lw, 3)), _ => (e(lw, 0), one, e(lw, 1), e(lw, 3)), }; for (k, v) in [w, hh, dd, n].into_iter().enumerate() {