From: Chad Versace Date: Thu, 28 Jan 2016 01:26:18 +0000 (-0800) Subject: anv/skl: Fix crash in 16x multisampling X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9b240a1e3d875c38dce9dbae57de73e03b8690cb;p=mesa.git anv/skl: Fix crash in 16x multisampling We built meta clear and resolve pipelines for only up to 8x samples. There were no 16x pipelines. --- diff --git a/src/vulkan/anv_private.h b/src/vulkan/anv_private.h index e328d3dcd71..6e44e88e10c 100644 --- a/src/vulkan/anv_private.h +++ b/src/vulkan/anv_private.h @@ -75,6 +75,7 @@ extern "C" { #define MAX_PUSH_CONSTANTS_SIZE 128 #define MAX_DYNAMIC_BUFFERS 16 #define MAX_IMAGES 8 +#define MAX_SAMPLES_LOG2 4 /* SKL supports 16 samples */ #define ICD_LOADER_MAGIC 0x01CDC0DE @@ -581,7 +582,7 @@ struct anv_meta_state { struct anv_pipeline *depth_only_pipeline; struct anv_pipeline *stencil_only_pipeline; struct anv_pipeline *depthstencil_pipeline; - } clear[4]; + } clear[1 + MAX_SAMPLES_LOG2]; struct { VkRenderPass render_pass; @@ -603,7 +604,7 @@ struct anv_meta_state { /** * Use pipeline `i` for images with `2^i` samples. */ - VkPipeline pipelines[4]; + VkPipeline pipelines[1 + MAX_SAMPLES_LOG2]; VkRenderPass pass; VkPipelineLayout pipeline_layout;