Merge vk-gl-cts/vulkan-cts-1.2.6 into vk-gl-cts/vulkan-cts-1.2.7
[platform/upstream/VK-GL-CTS.git] / external / vulkancts / modules / vulkan / api / vktApiFeatureInfo.cpp
index 644d565..43eadfc 100644 (file)
@@ -4596,12 +4596,18 @@ tcu::TestStatus deviceMemoryProperties2 (Context& context)
                TCU_FAIL("Mismatch between memoryTypeCount reported by vkGetPhysicalDeviceMemoryProperties and vkGetPhysicalDeviceMemoryProperties2");
        if (coreProperties.memoryHeapCount != extProperties.memoryProperties.memoryHeapCount)
                TCU_FAIL("Mismatch between memoryHeapCount reported by vkGetPhysicalDeviceMemoryProperties and vkGetPhysicalDeviceMemoryProperties2");
-       for (deUint32 i = 0; i < coreProperties.memoryTypeCount; i++)
-               if (deMemCmp(&coreProperties.memoryTypes[i], &extProperties.memoryProperties.memoryTypes[i], sizeof(VkMemoryType)) != 0)
+       for (deUint32 i = 0; i < coreProperties.memoryTypeCount; i++) {
+               const VkMemoryType *coreType = &coreProperties.memoryTypes[i];
+               const VkMemoryType *extType = &extProperties.memoryProperties.memoryTypes[i];
+               if (coreType->propertyFlags != extType->propertyFlags || coreType->heapIndex != extType->heapIndex)
                        TCU_FAIL("Mismatch between memoryTypes reported by vkGetPhysicalDeviceMemoryProperties and vkGetPhysicalDeviceMemoryProperties2");
-       for (deUint32 i = 0; i < coreProperties.memoryHeapCount; i++)
-               if (deMemCmp(&coreProperties.memoryHeaps[i], &extProperties.memoryProperties.memoryHeaps[i], sizeof(VkMemoryHeap)) != 0)
+       }
+       for (deUint32 i = 0; i < coreProperties.memoryHeapCount; i++) {
+               const VkMemoryHeap *coreHeap = &coreProperties.memoryHeaps[i];
+               const VkMemoryHeap *extHeap = &extProperties.memoryProperties.memoryHeaps[i];
+               if (coreHeap->size != extHeap->size || coreHeap->flags != extHeap->flags)
                        TCU_FAIL("Mismatch between memoryHeaps reported by vkGetPhysicalDeviceMemoryProperties and vkGetPhysicalDeviceMemoryProperties2");
+       }
 
        log << TestLog::Message << extProperties << TestLog::EndMessage;