From 4fe1285d0c3454f493d83e9093b5e3707d2c5307 Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Mon, 7 May 2018 16:24:07 -0400 Subject: [PATCH] Fix barrier and invalidation of the fill_buffer readback The old code had a barrier waiting for a different memory region that is being filled, and same goes for the memory invalidation call that follows. It resulted in the range of size=0 being requeste for invalidation, which doesn't include actual bytes filled by cmdFillBuffer that is being tested. Affects: dEQP-VK.api.fill_and_update_buffer.* Change-Id: Id2d68dc65145b42ecb0f966c70d57db81e9acb4a Components: Vulkan --- .../vulkancts/modules/vulkan/api/vktApiFillBufferTests.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/external/vulkancts/modules/vulkan/api/vktApiFillBufferTests.cpp b/external/vulkancts/modules/vulkan/api/vktApiFillBufferTests.cpp index bcaae49a2..6fd48ee9a 100644 --- a/external/vulkancts/modules/vulkan/api/vktApiFillBufferTests.cpp +++ b/external/vulkancts/modules/vulkan/api/vktApiFillBufferTests.cpp @@ -146,8 +146,8 @@ tcu::TestStatus FillBufferTestInstance::iterate (void) VK_QUEUE_FAMILY_IGNORED, // deUint32 srcQueueFamilyIndex; VK_QUEUE_FAMILY_IGNORED, // deUint32 dstQueueFamilyIndex; *m_destination, // VkBuffer buffer; - 0u, // VkDeviceSize offset; - m_params.dstOffset // VkDeviceSize size; + m_params.dstOffset, // VkDeviceSize offset; + m_params.dstSize // VkDeviceSize size; }; beginCommandBuffer(vk, *m_cmdBuffer); @@ -159,7 +159,7 @@ tcu::TestStatus FillBufferTestInstance::iterate (void) // Read buffer data de::MovePtr resultLevel (new tcu::TextureLevel(m_destinationTextureLevel->getAccess().getFormat(), dstLevelWidth, 1)); - invalidateMappedMemoryRange(vk, vkDevice, m_destinationBufferAlloc->getMemory(), m_destinationBufferAlloc->getOffset(), m_params.dstOffset); + invalidateMappedMemoryRange(vk, vkDevice, m_destinationBufferAlloc->getMemory(), m_destinationBufferAlloc->getOffset() + m_params.dstOffset, m_params.dstSize); tcu::copy(*resultLevel, tcu::ConstPixelBufferAccess(resultLevel->getFormat(), resultLevel->getSize(), m_destinationBufferAlloc->getHostPtr())); return checkTestResult(resultLevel->getAccess()); -- 2.34.1