From 299b36a3a4c1b30905e4bf70a28960b91e86f778 Mon Sep 17 00:00:00 2001 From: Charles Giessen <46324611+charles-lunarg@users.noreply.github.com> Date: Sun, 18 Apr 2021 14:09:12 -0600 Subject: [PATCH] Revert "Fixed Features11/12 break. Tests now pass." This reverts commit 632a42f5cd6cd73c96a54c25bcacd703059482ce. --- src/VkBootstrap.cpp | 6 ++---- src/VkBootstrap.h | 4 ++-- tests/bootstrap_tests.cpp | 3 --- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/VkBootstrap.cpp b/src/VkBootstrap.cpp index b4bafa2..9a81c8b 100644 --- a/src/VkBootstrap.cpp +++ b/src/VkBootstrap.cpp @@ -1259,14 +1259,12 @@ PhysicalDeviceSelector& PhysicalDeviceSelector::set_desired_version(uint32_t maj #if defined(VK_API_VERSION_1_2) // Just calls add_required_features PhysicalDeviceSelector& PhysicalDeviceSelector::set_required_features_11( - VkPhysicalDeviceVulkan11Features& features_11) { - features_11.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES; + VkPhysicalDeviceVulkan11Features const& features_11) { add_required_extension_features(features_11); return *this; } PhysicalDeviceSelector& PhysicalDeviceSelector::set_required_features_12( - VkPhysicalDeviceVulkan12Features& features_12) { - features_12.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES; + VkPhysicalDeviceVulkan12Features const& features_12) { add_required_extension_features(features_12); return *this; } diff --git a/src/VkBootstrap.h b/src/VkBootstrap.h index 4a03925..8111cf9 100644 --- a/src/VkBootstrap.h +++ b/src/VkBootstrap.h @@ -549,10 +549,10 @@ class PhysicalDeviceSelector { #if defined(VK_API_VERSION_1_2) // Require a physical device which supports the features in VkPhysicalDeviceVulkan11Features. // Must have vulkan version 1.2 - This is due to the VkPhysicalDeviceVulkan11Features struct being added in 1.2, not 1.1 - PhysicalDeviceSelector& set_required_features_11(VkPhysicalDeviceVulkan11Features& features_11); + PhysicalDeviceSelector& set_required_features_11(VkPhysicalDeviceVulkan11Features const& features_11); // Require a physical device which supports the features in VkPhysicalDeviceVulkan12Features. // Must have vulkan version 1.2 - PhysicalDeviceSelector& set_required_features_12(VkPhysicalDeviceVulkan12Features& features_12); + PhysicalDeviceSelector& set_required_features_12(VkPhysicalDeviceVulkan12Features const& features_12); #endif // Used when surface creation happens after physical device selection. diff --git a/tests/bootstrap_tests.cpp b/tests/bootstrap_tests.cpp index 6d3afe7..b60ae02 100644 --- a/tests/bootstrap_tests.cpp +++ b/tests/bootstrap_tests.cpp @@ -454,10 +454,8 @@ TEST_CASE("Querying Vulkan 1.1 and 1.2 features", "[VkBootstrap.version]") { // Requires a device that supports multiview and bufferDeviceAddress { VkPhysicalDeviceVulkan11Features features_11{}; - features_11.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES; features_11.multiview = true; VkPhysicalDeviceVulkan12Features features_12{}; - features_11.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES; features_12.bufferDeviceAddress = true; vkb::PhysicalDeviceSelector selector(instance_ret.value()); @@ -474,7 +472,6 @@ TEST_CASE("Querying Vulkan 1.1 and 1.2 features", "[VkBootstrap.version]") { // protectedMemory should NOT be supported { VkPhysicalDeviceVulkan11Features features_11{}; - features_11.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES; features_11.protectedMemory = true; vkb::PhysicalDeviceSelector selector(instance_ret.value());