From 5e14b4fad087ef125922bf5c520c2f243b89014d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Samuel=20Iglesias=20Gons=C3=A1lvez?= Date: Tue, 27 Apr 2021 13:02:55 +0200 Subject: [PATCH] Make sure minImportedHostPointerAlignment in a power of 2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Affected tests: dEQP-VK.memory.external_memory_host.* Components: Vulkan VK-GL-CTS issue: 2901 Change-Id: Iaf0de2eb803410b30edcfd394d427e90e20be2fc Signed-off-by: Samuel Iglesias Gonsálvez --- .../modules/vulkan/memory/vktMemoryExternalMemoryHostTests.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/external/vulkancts/modules/vulkan/memory/vktMemoryExternalMemoryHostTests.cpp b/external/vulkancts/modules/vulkan/memory/vktMemoryExternalMemoryHostTests.cpp index af7757c..b0caba3 100644 --- a/external/vulkancts/modules/vulkan/memory/vktMemoryExternalMemoryHostTests.cpp +++ b/external/vulkancts/modules/vulkan/memory/vktMemoryExternalMemoryHostTests.cpp @@ -219,6 +219,9 @@ VkDeviceSize ExternalMemoryHostBaseTestInstance::getMinImportedHostPointerAlignm if (externalMemoryHostProperties.minImportedHostPointerAlignment > 65536) TCU_FAIL("minImportedHostPointerAlignment is exceeding the supported limit"); + if (!deIntIsPow2((int)externalMemoryHostProperties.minImportedHostPointerAlignment)) + TCU_FAIL("minImportedHostPointerAlignment is not a power of two"); + return externalMemoryHostProperties.minImportedHostPointerAlignment; } -- 2.7.4