From 9b240a1e3d875c38dce9dbae57de73e03b8690cb Mon Sep 17 00:00:00 2001 From: Chad Versace Date: Wed, 27 Jan 2016 17:26:18 -0800 Subject: [PATCH] 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. --- src/vulkan/anv_private.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; -- 2.30.2