Less error prone way of calculating bytes per layer
This commit is contained in:
parent
6da2fbb353
commit
e2f4828f42
@ -536,7 +536,7 @@ VkDeviceSize MVKImage::getBytesPerRow(uint8_t planeIndex, uint32_t mipLevel) {
|
||||
|
||||
VkDeviceSize MVKImage::getBytesPerLayer(uint8_t planeIndex, uint32_t mipLevel) {
|
||||
VkExtent3D extent = getExtent3D(planeIndex, mipLevel);
|
||||
size_t bytesPerRow = mvkAlignByteCount(getPixelFormats()->getBytesPerRow(_vkFormat, extent.width), _rowByteAlignment);
|
||||
size_t bytesPerRow = getBytesPerRow(planeIndex, mipLevel);
|
||||
return getPixelFormats()->getBytesPerLayer(_vkFormat, bytesPerRow, extent.height);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user