From 7d022ca0144753a6ef8bb4160f19a73cae42fa73 Mon Sep 17 00:00:00 2001 From: Graeme Leese Date: Wed, 19 Sep 2018 18:05:09 +0100 Subject: [PATCH] Fix api.smoke.* tests for validation The memory flushing in these tests wasn't using the standard pattern and appears to have been using a potentially incorrect offset of 0. Change it to use the standard pattern. Components: Vulkan Affects: dEQP-VK.api.smoke.* VK-GL-CTS issue: 1361 Change-Id: Iefa0841489f8dc910ba03b40e2f7370e889a06c6 --- .../modules/vulkan/api/vktApiSmokeTests.cpp | 32 +++---------------- 1 file changed, 4 insertions(+), 28 deletions(-) diff --git a/external/vulkancts/modules/vulkan/api/vktApiSmokeTests.cpp b/external/vulkancts/modules/vulkan/api/vktApiSmokeTests.cpp index e690496f3..aaee2b1c8 100644 --- a/external/vulkancts/modules/vulkan/api/vktApiSmokeTests.cpp +++ b/external/vulkancts/modules/vulkan/api/vktApiSmokeTests.cpp @@ -606,20 +606,8 @@ tcu::TestStatus renderTriangleTest (Context& context) endCommandBuffer(vk, *cmdBuf); // Upload vertex data - { - const VkMappedMemoryRange range = - { - VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE, // sType - DE_NULL, // pNext - vertexBufferMemory->getMemory(), // memory - 0, // offset - (VkDeviceSize)sizeof(vertices), // size - }; - void* vertexBufPtr = vertexBufferMemory->getHostPtr(); - - deMemcpy(vertexBufPtr, &vertices[0], sizeof(vertices)); - VK_CHECK(vk.flushMappedMemoryRanges(vkDevice, 1u, &range)); - } + deMemcpy(vertexBufferMemory->getHostPtr(), &vertices[0], sizeof(vertices)); + flushAlloc(vk, vkDevice, *vertexBufferMemory); // Submit & wait for completion submitCommandsAndWait(vk, vkDevice, queue, cmdBuf.get()); @@ -989,20 +977,8 @@ tcu::TestStatus renderTriangleUnusedResolveAttachmentTest (Context& context) endCommandBuffer(vk, *cmdBuf); // Upload vertex data - { - const VkMappedMemoryRange range = - { - VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE, // sType - DE_NULL, // pNext - vertexBufferMemory->getMemory(), // memory - 0, // offset - (VkDeviceSize)sizeof(vertices), // size - }; - void* vertexBufPtr = vertexBufferMemory->getHostPtr(); - - deMemcpy(vertexBufPtr, &vertices[0], sizeof(vertices)); - VK_CHECK(vk.flushMappedMemoryRanges(vkDevice, 1u, &range)); - } + deMemcpy(vertexBufferMemory->getHostPtr(), &vertices[0], sizeof(vertices)); + flushAlloc(vk, vkDevice, *vertexBufferMemory); // Submit & wait for completion submitCommandsAndWait(vk, vkDevice, queue, cmdBuf.get()); -- 2.34.1