Browse Source

Vk: add an XFAIL for pool allocation failure on NV as well.

Not a problem, important is that it succeeds when it should succeed.
pull/419/merge
Vladimír Vondruš 2 years ago
parent
commit
25640c4f99
  1. 14
      src/Magnum/Vk/Test/DescriptorPoolVkTest.cpp

14
src/Magnum/Vk/Test/DescriptorPoolVkTest.cpp

@ -174,10 +174,12 @@ void DescriptorPoolVkTest::allocate() {
void DescriptorPoolVkTest::allocateFail() { void DescriptorPoolVkTest::allocateFail() {
DescriptorSetLayout layout{device(), DescriptorSetLayoutCreateInfo{ 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} {DescriptorType::UniformBuffer, 1}
}}}; }}};
@ -188,6 +190,8 @@ void DescriptorPoolVkTest::allocateFail() {
{ {
CORRADE_EXPECT_FAIL_IF(device().properties().name().contains("llvmpipe"), CORRADE_EXPECT_FAIL_IF(device().properties().name().contains("llvmpipe"),
"Mesa llvmpipe never fails an allocation."); "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_VERIFY(!pool.tryAllocate(layout));
} }
CORRADE_COMPARE(out.str(), ""); CORRADE_COMPARE(out.str(), "");
@ -200,6 +204,8 @@ void DescriptorPoolVkTest::allocateFail() {
pool.allocate(layout); pool.allocate(layout);
CORRADE_EXPECT_FAIL_IF(device().properties().name().contains("llvmpipe"), CORRADE_EXPECT_FAIL_IF(device().properties().name().contains("llvmpipe"),
"Mesa llvmpipe never fails an allocation."); "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"); 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"), CORRADE_EXPECT_FAIL_IF(device().properties().name().contains("llvmpipe"),
"Mesa llvmpipe never fails an allocation."); "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_VERIFY(!pool.tryAllocate(layout, 80));
} }
CORRADE_COMPARE(out.str(), ""); CORRADE_COMPARE(out.str(), "");
@ -299,6 +307,8 @@ void DescriptorPoolVkTest::allocateVariableCountFail() {
{ {
CORRADE_EXPECT_FAIL_IF(device().properties().name().contains("llvmpipe"), CORRADE_EXPECT_FAIL_IF(device().properties().name().contains("llvmpipe"),
"Mesa llvmpipe never fails an allocation."); "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"); CORRADE_COMPARE(out.str(), "Vk::DescriptorPool::allocate(): allocation failed with Vk::Result::ErrorOutOfPoolMemory\n");
} }
} }

Loading…
Cancel
Save