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
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user