From c5244c9ffc929e0c7c484060b6d31d528d0cfe65 Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Tue, 12 Oct 2021 12:10:26 -0400 Subject: [PATCH] hal/dx12: fix cube array views --- wgpu-hal/src/dx12/view.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wgpu-hal/src/dx12/view.rs b/wgpu-hal/src/dx12/view.rs index b792c9c6c..52b3e2f77 100644 --- a/wgpu-hal/src/dx12/view.rs +++ b/wgpu-hal/src/dx12/view.rs @@ -122,7 +122,11 @@ impl ViewDescriptor { MostDetailedMip: self.mip_level_base, MipLevels: self.mip_level_count, First2DArrayFace: self.array_layer_base, - NumCubes: self.array_layer_count / 6, + NumCubes: if self.array_layer_count == !0 { + !0 + } else { + self.array_layer_count / 6 + }, ResourceMinLODClamp: 0.0, } }