From 8c0c25abdee557c69cf89d8f1d3624a12b551e74 Mon Sep 17 00:00:00 2001 From: Nanley Chery Date: Mon, 4 Jan 2016 14:53:55 -0800 Subject: [PATCH] gen8_state: use iview extent to program RENDER_SURFACE_STATE 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. --- src/vulkan/gen8_state.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vulkan/gen8_state.c b/src/vulkan/gen8_state.c index 5b3691d22d0..3fd3187fbe7 100644 --- a/src/vulkan/gen8_state.c +++ b/src/vulkan/gen8_state.c @@ -206,8 +206,8 @@ genX(fill_image_surface_state)(struct anv_device *device, void *state_map, .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 */ -- 2.30.2