Vulkan: Fix sample count when uploading layered textures
When uploading layered textures it was assumed that the data uploaded had the data for all layers and ignored the given extent.
This commit is contained in:
@@ -353,7 +353,7 @@ void VKTexture::update_sub(
|
||||
/* Vulkan images cannot be directly mapped to host memory and requires a staging buffer. */
|
||||
VKContext &context = *VKContext::get();
|
||||
int layers = vk_layer_count(1);
|
||||
size_t sample_len = size_t(extent.x) * extent.y * extent.z * layers;
|
||||
size_t sample_len = size_t(extent.x) * extent.y * extent.z;
|
||||
size_t device_memory_size = sample_len * to_bytesize(device_format_);
|
||||
|
||||
if (is_compressed) {
|
||||
|
||||
Reference in New Issue
Block a user