V-EZ
V-EZ copied to clipboard
UncompressedImageSubData fails to update the correct Z/depth of a 3d texture [fixed]
Make the following change in Device.cpp to fix this, it is incorrectly ignoring the .z offset when deciding the current offset.
// Each depth layer in a 3D texture is copied separately.
for (auto z = 0U; z < pSubDataInfo->imageExtent.depth; z += maxExtent.depth)
{
// Set current destination image z offset.
curOffset.z = pSubDataInfo->imageOffset.z + z;
Also whilst I'm at it, GetUncompressedImageFormatSize returns the wrong size for VK_FORMAT_R16G16_SFLOAT in VkHelpers.h. It should read:
case VK_FORMAT_R16G16_SFLOAT: return 4;