From e73ac75e3c0ee3068e2366bf69a83c77f3dba268 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mika=20Isoj=C3=A4rvi?= Date: Fri, 27 May 2016 14:05:20 -0700 Subject: [PATCH] Flush changes before invalidate in memory mapping tests Bug: 29006045 Change-Id: I697c69838bc75d0dfc7ac232888d60e1a0d80ded --- .../vulkancts/modules/vulkan/memory/vktMemoryMappingTests.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/external/vulkancts/modules/vulkan/memory/vktMemoryMappingTests.cpp b/external/vulkancts/modules/vulkan/memory/vktMemoryMappingTests.cpp index f9470c2..ce3986b 100644 --- a/external/vulkancts/modules/vulkan/memory/vktMemoryMappingTests.cpp +++ b/external/vulkancts/modules/vulkan/memory/vktMemoryMappingTests.cpp @@ -1028,18 +1028,23 @@ TestConfig subMappedConfig (VkDeviceSize allocationSize, return config; case OP_INVALIDATE: + config.flushMappings = vector(1, MemoryRange(mapping.offset, mapping.size)); config.invalidateMappings = vector(1, MemoryRange(mapping.offset, mapping.size)); return config; case OP_SUB_INVALIDATE: DE_ASSERT(mapping.size / 4 > 0); + config.flushMappings = vector(1, MemoryRange(mapping.offset + mapping.size / 4, mapping.size / 2)); config.invalidateMappings = vector(1, MemoryRange(mapping.offset + mapping.size / 4, mapping.size / 2)); return config; case OP_SUB_INVALIDATE_SEPARATE: DE_ASSERT(mapping.size / 2 > 0); + config.flushMappings.push_back(MemoryRange(mapping.offset + mapping.size / 2, mapping.size - (mapping.size / 2))); + config.flushMappings.push_back(MemoryRange(mapping.offset, mapping.size / 2)); + config.invalidateMappings.push_back(MemoryRange(mapping.offset + mapping.size / 2, mapping.size - (mapping.size / 2))); config.invalidateMappings.push_back(MemoryRange(mapping.offset, mapping.size / 2)); @@ -1048,6 +1053,9 @@ TestConfig subMappedConfig (VkDeviceSize allocationSize, case OP_SUB_INVALIDATE_OVERLAPPING: DE_ASSERT((mapping.size / 3) > 0); + config.flushMappings.push_back(MemoryRange(mapping.offset + mapping.size / 3, mapping.size - (mapping.size / 2))); + config.flushMappings.push_back(MemoryRange(mapping.offset, (2 * mapping.size) / 3)); + config.invalidateMappings.push_back(MemoryRange(mapping.offset + mapping.size / 3, mapping.size - (mapping.size / 2))); config.invalidateMappings.push_back(MemoryRange(mapping.offset, (2 * mapping.size) / 3)); -- 2.7.4