Fix dEQP-VK.ssbo tests: initialize the contents of the result atomic counter buffer
authorscygan <slawomir.cygan@intel.com>
Mon, 21 Dec 2015 20:28:04 +0000 (21:28 +0100)
committerscygan <slawomir.cygan@intel.com>
Tue, 22 Dec 2015 12:35:54 +0000 (13:35 +0100)
external/vulkancts/modules/vulkan/ssbo/vktSSBOLayoutCase.cpp

index c4424da..17874b2 100644 (file)
@@ -1857,6 +1857,9 @@ tcu::TestStatus SSBOLayoutCaseInstance::iterate (void)
        vk::Move<vk::VkBuffer> acBuffer (createBuffer(m_context, acBufferSize, vk:: VK_BUFFER_USAGE_STORAGE_BUFFER_BIT));
        de::UniquePtr<vk::Allocation> acBufferAlloc (allocateAndBindMemory(m_context, *acBuffer, vk::MemoryRequirement::HostVisible));
 
+       deMemset(acBufferAlloc->getHostPtr(), 0, acBufferSize);
+       flushMappedMemoryRange(vk, device, acBufferAlloc->getMemory(), acBufferAlloc->getOffset(), acBufferSize);
+
        vk::DescriptorSetLayoutBuilder setLayoutBuilder;
        vk::DescriptorPoolBuilder poolBuilder;