mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
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:
parent
1812f5cb92
commit
8aedc03aa2
1 changed files with 1 additions and 3 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue