From 08a9963734d55ffa9aaed202a86904d7417e6684 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Sun, 26 Aug 2018 20:08:16 +0200 Subject: [PATCH] [dxvk] Fix clear compute shaders for 2D array views The Z component is not part of the image extent. Fixes #598. --- src/dxvk/shaders/dxvk_clear_image2darr_f.comp | 2 +- src/dxvk/shaders/dxvk_clear_image2darr_u.comp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dxvk/shaders/dxvk_clear_image2darr_f.comp b/src/dxvk/shaders/dxvk_clear_image2darr_f.comp index cd2c56a1..4eec19cc 100644 --- a/src/dxvk/shaders/dxvk_clear_image2darr_f.comp +++ b/src/dxvk/shaders/dxvk_clear_image2darr_f.comp @@ -18,7 +18,7 @@ uniform u_info_t { void main() { ivec3 thread_id = ivec3(gl_GlobalInvocationID); - if (all(lessThan(thread_id.xyz, u_info.dst_extent.xyz))) { + if (all(lessThan(thread_id.xy, u_info.dst_extent.xy))) { imageStore(dst, ivec3(u_info.dst_offset.xy + thread_id.xy, thread_id.z), u_info.clear_value); diff --git a/src/dxvk/shaders/dxvk_clear_image2darr_u.comp b/src/dxvk/shaders/dxvk_clear_image2darr_u.comp index 1630e1e0..c8babb78 100644 --- a/src/dxvk/shaders/dxvk_clear_image2darr_u.comp +++ b/src/dxvk/shaders/dxvk_clear_image2darr_u.comp @@ -18,7 +18,7 @@ uniform u_info_t { void main() { ivec3 thread_id = ivec3(gl_GlobalInvocationID); - if (all(lessThan(thread_id.xyz, u_info.dst_extent.xyz))) { + if (all(lessThan(thread_id.xy, u_info.dst_extent.xy))) { imageStore(dst, ivec3(u_info.dst_offset.xy + thread_id.xy, thread_id.z), u_info.clear_value);