From 25640c4f9979fa308c74dba93c8aadee889609ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 6 Oct 2024 17:44:22 +0200 Subject: [PATCH] Vk: add an XFAIL for pool allocation failure on NV as well. Not a problem, important is that it succeeds when it should succeed. --- src/Magnum/Vk/Test/DescriptorPoolVkTest.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/Magnum/Vk/Test/DescriptorPoolVkTest.cpp b/src/Magnum/Vk/Test/DescriptorPoolVkTest.cpp index ae9a636c7..75d17ae9c 100644 --- a/src/Magnum/Vk/Test/DescriptorPoolVkTest.cpp +++ b/src/Magnum/Vk/Test/DescriptorPoolVkTest.cpp @@ -174,10 +174,12 @@ void DescriptorPoolVkTest::allocate() { void DescriptorPoolVkTest::allocateFail() { DescriptorSetLayout layout{device(), DescriptorSetLayoutCreateInfo{ - {{0, DescriptorType::UniformBuffer, 2}}, + {{0, DescriptorType::UniformBuffer, 64}}, }}; - DescriptorPool pool{device(), DescriptorPoolCreateInfo{1, { + /* Make the pool contain two layouts so in case of the XFAILs below they + both either fit or both don't fit */ + DescriptorPool pool{device(), DescriptorPoolCreateInfo{2, { {DescriptorType::UniformBuffer, 1} }}}; @@ -188,6 +190,8 @@ void DescriptorPoolVkTest::allocateFail() { { CORRADE_EXPECT_FAIL_IF(device().properties().name().contains("llvmpipe"), "Mesa llvmpipe never fails an allocation."); + CORRADE_EXPECT_FAIL_IF(device().properties().name().contains("NVIDIA"), + "NVidia never fails an allocation."); CORRADE_VERIFY(!pool.tryAllocate(layout)); } CORRADE_COMPARE(out.str(), ""); @@ -200,6 +204,8 @@ void DescriptorPoolVkTest::allocateFail() { pool.allocate(layout); CORRADE_EXPECT_FAIL_IF(device().properties().name().contains("llvmpipe"), "Mesa llvmpipe never fails an allocation."); + CORRADE_EXPECT_FAIL_IF(device().properties().name().contains("NVIDIA"), + "NVidia never fails an allocation."); CORRADE_COMPARE(out.str(), "Vk::DescriptorPool::allocate(): allocation failed with Vk::Result::ErrorOutOfPoolMemory\n"); } } @@ -286,6 +292,8 @@ void DescriptorPoolVkTest::allocateVariableCountFail() { { CORRADE_EXPECT_FAIL_IF(device().properties().name().contains("llvmpipe"), "Mesa llvmpipe never fails an allocation."); + CORRADE_EXPECT_FAIL_IF(device().properties().name().contains("NVIDIA"), + "NVidia never fails an allocation."); CORRADE_VERIFY(!pool.tryAllocate(layout, 80)); } CORRADE_COMPARE(out.str(), ""); @@ -299,6 +307,8 @@ void DescriptorPoolVkTest::allocateVariableCountFail() { { CORRADE_EXPECT_FAIL_IF(device().properties().name().contains("llvmpipe"), "Mesa llvmpipe never fails an allocation."); + CORRADE_EXPECT_FAIL_IF(device().properties().name().contains("NVIDIA"), + "NVidia never fails an allocation."); CORRADE_COMPARE(out.str(), "Vk::DescriptorPool::allocate(): allocation failed with Vk::Result::ErrorOutOfPoolMemory\n"); } }