Don't exhaust 32-bit host visible address space
authorNoah Fredriks <Noah.Fredriks@amd.com>
Wed, 11 Jul 2018 21:47:02 +0000 (17:47 -0400)
committerNoah Fredriks <Noah.Fredriks@amd.com>
Fri, 5 Oct 2018 19:37:21 +0000 (15:37 -0400)
If VkPhysicalDeviceGroupProperties::subsetAllocation is VK_FALSE, then
then devices in the device group will each consume memory. Adjust the
limit to account for this.

Affects: dEQP-VK.memory.allocation.basic.*

Components: Vulkan

VK-GL-CTS Issue: 1405

Change-Id: I0074c49855435dc3403b64ce85a180397c4ed955

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

index 794bcfd..e8c94dc 100644 (file)
@@ -284,7 +284,7 @@ tcu::TestStatus AllocateFreeTestInstance::iterate (void)
                        // For 32-bit binaries we cap the total host visible allocations to 1.5GB to
                        // avoid exhausting CPU virtual address space and throwing a false negative result.
                        if ((memoryType.propertyFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) &&
-                               allocationSize * m_config.memoryAllocationCount >= 1610612736)
+                               allocationSize * m_config.memoryAllocationCount * (m_subsetAllocationAllowed ? 1 : m_numPhysDevices) >= 1610612736)
 
                                log << TestLog::Message << "    Skipping: Not enough CPU virtual address space for all host visible allocations." << TestLog::EndMessage;
                        else