From 320a33842b080fdf1a9c13a44e19dad109e09541 Mon Sep 17 00:00:00 2001 From: Stephen Seo Date: Fri, 29 Mar 2024 11:09:57 +0900 Subject: [PATCH] Vulkan compute: resize max/min out buffers Change max/min out buffers to have same size as max/min in buffers. --- src/blue_noise.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/blue_noise.cpp b/src/blue_noise.cpp index 618a24d..9944e33 100644 --- a/src/blue_noise.cpp +++ b/src/blue_noise.cpp @@ -1706,8 +1706,7 @@ image::Bl dither::blue_noise(int width, int height, int threads, if (!internal::vulkan_create_buffer( device, phys_device, - ((width * height + 1) / 2) * - sizeof(dither::internal::FloatAndIndex), + width * height * sizeof(dither::internal::FloatAndIndex), VK_BUFFER_USAGE_STORAGE_BUFFER_BIT | VK_BUFFER_USAGE_TRANSFER_SRC_BIT, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, min_out_buf, @@ -1728,8 +1727,7 @@ image::Bl dither::blue_noise(int width, int height, int threads, if (!internal::vulkan_create_buffer( device, phys_device, - ((width * height + 1) / 2) * - sizeof(dither::internal::FloatAndIndex), + width * height * sizeof(dither::internal::FloatAndIndex), VK_BUFFER_USAGE_STORAGE_BUFFER_BIT | VK_BUFFER_USAGE_TRANSFER_SRC_BIT, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, max_out_buf,