Flush changes before invalidate in memory mapping tests
authorMika Isojärvi <misojarvi@google.com>
Fri, 27 May 2016 21:05:20 +0000 (14:05 -0700)
committerMika Isojärvi <misojarvi@google.com>
Fri, 27 May 2016 21:05:59 +0000 (14:05 -0700)
Bug: 29006045
Change-Id: I697c69838bc75d0dfc7ac232888d60e1a0d80ded

external/vulkancts/modules/vulkan/memory/vktMemoryMappingTests.cpp

index f9470c2..ce3986b 100644 (file)
@@ -1028,18 +1028,23 @@ TestConfig subMappedConfig (VkDeviceSize                                allocationSize,
                        return config;
 
                case OP_INVALIDATE:
+                       config.flushMappings = vector<MemoryRange>(1, MemoryRange(mapping.offset, mapping.size));
                        config.invalidateMappings = vector<MemoryRange>(1, MemoryRange(mapping.offset, mapping.size));
                        return config;
 
                case OP_SUB_INVALIDATE:
                        DE_ASSERT(mapping.size / 4 > 0);
 
+                       config.flushMappings = vector<MemoryRange>(1, MemoryRange(mapping.offset + mapping.size / 4, mapping.size / 2));
                        config.invalidateMappings = vector<MemoryRange>(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));