From 8aedc03aa2ef2c26b25b57dfd04f0238d89c36da Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Mon, 27 Feb 2023 12:56:05 +0100 Subject: [PATCH] Vulkan: Calculate Correct Host and Device Memory Size. Due to an error in GPU module we fixed the memory size in the Vulkan backend. Last week the error has been fixed in the GPU module so we can remove the temp fixes in the Vulkan backend. Pull Request #105244 --- source/blender/gpu/vulkan/vk_texture.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/source/blender/gpu/vulkan/vk_texture.cc b/source/blender/gpu/vulkan/vk_texture.cc index 281996e797c..7816ea8a8f2 100644 --- a/source/blender/gpu/vulkan/vk_texture.cc +++ b/source/blender/gpu/vulkan/vk_texture.cc @@ -60,9 +60,7 @@ void *VKTexture::read(int mip, eGPUDataFormat format) int extent[3] = {1, 1, 1}; mip_size_get(mip, extent); size_t sample_len = extent[0] * extent[1] * extent[2]; - /* NOTE: to_bytesize returns number of bits. */ - size_t device_memory_size = sample_len * to_component_len(format_) * to_bytesize(format_) / 8; - /* NOTE: to_bytesize returns number of bytes here. */ + size_t device_memory_size = sample_len * to_bytesize(format_); size_t host_memory_size = sample_len * to_bytesize(format_, format); staging_buffer.create(