diff options
author | Kristian Høgsberg Kristensen <[email protected]> | 2016-02-18 10:21:08 -0800 |
---|---|---|
committer | Kristian Høgsberg Kristensen <[email protected]> | 2016-02-18 10:22:50 -0800 |
commit | 542c38df36613eb1baa4c1c23b971dc7743b8e11 (patch) | |
tree | 1e5430aab214ad8996db8e1eb137d09b098c0e05 /src | |
parent | 05f75a30267249fe1781e87389b5dd6c2339fdfb (diff) |
anv/meta: Initialize blend state for the right attachment
We were always initializing only RT 0. We need to initialize the RT
we're creating the clear pipeline for.
Diffstat (limited to 'src')
-rw-r--r-- | src/vulkan/anv_meta_clear.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/vulkan/anv_meta_clear.c b/src/vulkan/anv_meta_clear.c index 15e24a32a75..739ae09582c 100644 --- a/src/vulkan/anv_meta_clear.c +++ b/src/vulkan/anv_meta_clear.c @@ -280,19 +280,20 @@ create_color_pipeline(struct anv_device *device, .stencilTestEnable = false, }; + VkPipelineColorBlendAttachmentState blend_attachment_state[MAX_RTS] = { 0 }; + blend_attachment_state[frag_output] = (VkPipelineColorBlendAttachmentState) { + .blendEnable = false, + .colorWriteMask = VK_COLOR_COMPONENT_A_BIT | + VK_COLOR_COMPONENT_R_BIT | + VK_COLOR_COMPONENT_G_BIT | + VK_COLOR_COMPONENT_B_BIT, + }; + const VkPipelineColorBlendStateCreateInfo cb_state = { .sType = VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO, .logicOpEnable = false, - .attachmentCount = 1, - .pAttachments = (VkPipelineColorBlendAttachmentState []) { - { - .blendEnable = false, - .colorWriteMask = VK_COLOR_COMPONENT_A_BIT | - VK_COLOR_COMPONENT_R_BIT | - VK_COLOR_COMPONENT_G_BIT | - VK_COLOR_COMPONENT_B_BIT, - }, - }, + .attachmentCount = MAX_RTS, + .pAttachments = blend_attachment_state }; /* Disable repclear because we do not want the compiler to replace the |