From: Matthew Netsch Date: Mon, 6 Jun 2022 15:54:27 +0000 (-0700) Subject: Fix modifier tests - Add Invalidate memory before host read. X-Git-Tag: upstream/1.3.5~144^2~10^2~2^2^2~8^2~1^2~1^2^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cae29ed2822b11a3901449f9ae4c23b8f68ab283;p=platform%2Fupstream%2FVK-GL-CTS.git 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 @@ bool exportImportMemoryExplicitModifiersCase (Context& context, const VkFormat f 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); }