vk/meta: Add required multisample state to pipeline
authorChad Versace <chad.versace@intel.com>
Mon, 19 Oct 2015 15:37:03 +0000 (08:37 -0700)
committerChad Versace <chad.versace@intel.com>
Tue, 20 Oct 2015 17:48:09 +0000 (10:48 -0700)
The Vulkan spec (20 Oct 2015, git-aa308cb) requires that
VkGraphicsPipelineCreateInfo::pMultisampleState not be NULL.

src/vulkan/anv_meta.c

index 76b8c4173e685b650a893361a6b10236c42afe70..c280ea0ef42488ecec8b83c425659716d86b348f 100644 (file)
@@ -247,6 +247,12 @@ anv_device_init_meta_clear_state(struct anv_device *device)
             .cullMode = VK_CULL_MODE_NONE,
             .frontFace = VK_FRONT_FACE_CCW
          },
+         .pMultisampleState = &(VkPipelineMultisampleStateCreateInfo) {
+            .sType = VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO,
+            .rasterSamples = 1,
+            .sampleShadingEnable = false,
+            .pSampleMask = (VkSampleMask[]) { UINT32_MAX },
+         },
          .pDepthStencilState = &(VkPipelineDepthStencilStateCreateInfo) {
             .sType = VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO,
             .depthTestEnable = true,
@@ -661,6 +667,12 @@ anv_device_init_meta_blit_state(struct anv_device *device)
          .cullMode = VK_CULL_MODE_NONE,
          .frontFace = VK_FRONT_FACE_CCW
       },
+      .pMultisampleState = &(VkPipelineMultisampleStateCreateInfo) {
+         .sType = VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO,
+         .rasterSamples = 1,
+         .sampleShadingEnable = false,
+         .pSampleMask = (VkSampleMask[]) { UINT32_MAX },
+      },
       .pColorBlendState = &(VkPipelineColorBlendStateCreateInfo) {
          .sType = VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO,
          .attachmentCount = 1,