When creating an uncompressed ImageView on an compressed Image, the
SurfaceFormat is updated to match the ImageView's. The surface
dimensions must also change so that the HW sees the same size image
instead of a 4x larger one.
Fixes the following error which results from running many VulkanCTS
compressed tests in one shot:
ResourceError (vk.queueSubmit(queue, 1, &submitInfo, *m_fence):
VK_ERROR_OUT_OF_DEVICE_MEMORY at
vktPipelineImageSamplingInstance.cpp:921)
Makes all compressed format tests with a height > 1 pass.
.BaseMipLevel = 0.0,
.SurfaceQPitch = get_qpitch(&surface->isl) >> 2,
- .Height = image->extent.height - 1,
- .Width = image->extent.width - 1,
+ .Height = iview->level_0_extent.height - 1,
+ .Width = iview->level_0_extent.width - 1,
.Depth = 0, /* TEMPLATE */
.SurfacePitch = surface->isl.row_pitch - 1,
.RenderTargetViewExtent = 0, /* TEMPLATE */