Skip to content

Commit

Permalink
Add negative test for are_extension_feature_present
Browse files Browse the repository at this point in the history
Didn't handle the case where some fields were supported but others weren't.
  • Loading branch information
charles-lunarg committed Jun 13, 2024
1 parent 71a29a4 commit 2d6f7de
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/bootstrap_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,12 @@ TEST_CASE("Querying Required Extension Features in 1.1", "[VkBootstrap.version]"
astc_features.decodeModeSharedExponent = true;
REQUIRE(!phys_dev_ret.value().are_extension_features_present(astc_features));

VkPhysicalDeviceDescriptorIndexingFeaturesEXT unsupported_descriptor_indexing_features{};
unsupported_descriptor_indexing_features.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES_EXT;
unsupported_descriptor_indexing_features.runtimeDescriptorArray = true;
unsupported_descriptor_indexing_features.descriptorBindingUniformTexelBufferUpdateAfterBind = true;
REQUIRE(!phys_dev_ret.value().are_extension_features_present(unsupported_descriptor_indexing_features));

vkb::DeviceBuilder device_builder(phys_dev_ret.value());
auto device_ret = device_builder.build();
REQUIRE(device_ret.has_value());
Expand Down

0 comments on commit 2d6f7de

Please sign in to comment.