From 3abe621c46308337bcb1afd3f4f40be5e669e175 Mon Sep 17 00:00:00 2001 From: Szymon Szczyrbak Date: Tue, 14 Jan 2020 13:40:51 +0100 Subject: [PATCH] Add memory barrier to fragment shader interlock tests. Image or buffer written by GPU are copied to host-visible buffer used to verify test's results. Added a TRANSFER_WRITE/HOST_READ pipeline barrier to make sure that the data accessed by host is up-to-date. Component: Vulkan Affects: dEQP-VK.fragment_shader_interlock.basic.* VK-GL-CTS Issue: 2165 Change-Id: I6d458b2e650a3813e62948d670b8a53e864aed37 (cherry picked from commit 1f1f54995a1a32ad4b7f9f357a39c19d3c1c0a7c) --- .../fragment_shader_interlock/vktFragmentShaderInterlockBasic.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/external/vulkancts/modules/vulkan/fragment_shader_interlock/vktFragmentShaderInterlockBasic.cpp b/external/vulkancts/modules/vulkan/fragment_shader_interlock/vktFragmentShaderInterlockBasic.cpp index dcdbf40..cd215af 100644 --- a/external/vulkancts/modules/vulkan/fragment_shader_interlock/vktFragmentShaderInterlockBasic.cpp +++ b/external/vulkancts/modules/vulkan/fragment_shader_interlock/vktFragmentShaderInterlockBasic.cpp @@ -764,6 +764,11 @@ tcu::TestStatus FSITestInstance::iterate (void) vk.cmdCopyBuffer(*cmdBuffer, **buffer, **copyBuffer, 1, ©Region); } + memBarrier.srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT; + memBarrier.dstAccessMask = VK_ACCESS_HOST_READ_BIT; + vk.cmdPipelineBarrier(*cmdBuffer, VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_HOST_BIT, + 0, 1, &memBarrier, 0, DE_NULL, 0, DE_NULL); + endCommandBuffer(vk, *cmdBuffer); submitCommandsAndWait(vk, device, queue, cmdBuffer.get()); -- 2.7.4