Fix uninitialized blendConstants in ColorBlendState
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Thu, 10 Nov 2022 10:01:27 +0000 (12:01 +0200)
committerMatthew Netsch <quic_mnetsch@quicinc.com>
Thu, 1 Dec 2022 23:41:55 +0000 (23:41 +0000)
Components: Vulkan

VK-GL-CTS issue: 4094

Affects:
dEQP-VK.draw.*
dEQP-VK.dynamic_state.*
dEQP-VK.pipeline.*
dEQP-VK.query_pool.*

Change-Id: Ia39d960e0809420b9755c4242510c657fcf7838b

external/vulkancts/modules/vulkan/draw/vktDrawCreateInfoUtil.cpp

index 187f900..bb40d5f 100644 (file)
@@ -900,6 +900,7 @@ PipelineCreateInfo::ColorBlendState::ColorBlendState (const std::vector<vk::VkPi
        logicOp                                 = _logicOp;
        attachmentCount                 = static_cast<deUint32>(m_attachments.size());
        pAttachments                    = &m_attachments[0];
+       deMemset(blendConstants, 0, sizeof(blendConstants));
 }
 
 PipelineCreateInfo::ColorBlendState::ColorBlendState (deUint32                                                                                 _attachmentCount,
@@ -915,6 +916,7 @@ PipelineCreateInfo::ColorBlendState::ColorBlendState (deUint32                                                                                      _attach
        logicOp                                 = _logicOp;
        attachmentCount                 = static_cast<deUint32>(m_attachments.size());
        pAttachments                    = &m_attachments[0];
+       deMemset(blendConstants, 0, sizeof(blendConstants));
 }
 
 PipelineCreateInfo::ColorBlendState::ColorBlendState (const vk::VkPipelineColorBlendStateCreateInfo& createInfo)
@@ -927,6 +929,7 @@ PipelineCreateInfo::ColorBlendState::ColorBlendState (const vk::VkPipelineColorB
        logicOp                                 = createInfo.logicOp;
        attachmentCount                 = static_cast<deUint32>(m_attachments.size());
        pAttachments                    = &m_attachments[0];
+       deMemset(blendConstants, 0, sizeof(blendConstants));
 }
 
 PipelineCreateInfo::ColorBlendState::ColorBlendState (const ColorBlendState& createInfo, std::vector<float> _blendConstants)