From: Nanley Chery Date: Mon, 4 Jan 2016 22:53:55 +0000 (-0800) Subject: gen8_state: use iview extent to program RENDER_SURFACE_STATE X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8c0c25abdee557c69cf89d8f1d3624a12b551e74;p=mesa.git 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. --- 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 */