Fix modifier tests - Add Invalidate memory before host read.
Test cases for extension VK_EXT_image_drm_format_modifier were failing randomly due to image mismatch.
This was due to after performing copyImagetoBuffer buffers are not invalidated before reading from host.
Added the invalidate operation for buffer before reading.
Components: Vulkan
VK-GL-CTS Issue: 3744
Affects:
dEQP-VK.drm_format_modifiers.*
Change-Id: I57b27bf9c0beea0ed822b36ea379b024f9d1690a
diff --git a/external/vulkancts/modules/vulkan/modifiers/vktModifiersTests.cpp b/external/vulkancts/modules/vulkan/modifiers/vktModifiersTests.cpp
index 546bb10..37332cb 100644
--- a/external/vulkancts/modules/vulkan/modifiers/vktModifiersTests.cpp
+++ b/external/vulkancts/modules/vulkan/modifiers/vktModifiersTests.cpp
@@ -699,6 +699,8 @@
tcu::ConstPixelBufferAccess result (referenceTextureFormat, imageSize.x(), imageSize.y(), 1, outputBuffer->getAllocation().getHostPtr());
const tcu::UVec4 threshold (0u);
+ invalidateAlloc(vkd, device, outputBuffer->getAllocation());
+
return tcu::intThresholdCompare(context.getTestContext().getLog(), "Compare", "Result comparison", referenceImage, result, threshold, tcu::COMPARE_LOG_RESULT);
}