mirror of
https://github.com/charles-lunarg/vk-bootstrap.git
synced 2024-11-26 08:44:36 +00:00
Revert "Cleanup and warning for user provided VkPhysicalDeviceFeatures2."
This reverts commit 91b3949339
.
This commit is contained in:
parent
0b2faf5659
commit
38d150101b
@ -31,7 +31,6 @@
|
|||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <cstdio>
|
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
|
|
||||||
namespace vkb {
|
namespace vkb {
|
||||||
@ -1265,10 +1264,6 @@ PhysicalDeviceSelector& PhysicalDeviceSelector::set_desired_version(uint32_t maj
|
|||||||
criteria.desired_version = VK_MAKE_VERSION(major, minor, 0);
|
criteria.desired_version = VK_MAKE_VERSION(major, minor, 0);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
PhysicalDeviceSelector& PhysicalDeviceSelector::set_required_features(VkPhysicalDeviceFeatures const& features) {
|
|
||||||
criteria.required_features = features;
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
#if defined(VK_API_VERSION_1_2)
|
#if defined(VK_API_VERSION_1_2)
|
||||||
// Just calls add_required_features
|
// Just calls add_required_features
|
||||||
PhysicalDeviceSelector& PhysicalDeviceSelector::set_required_features_11(
|
PhysicalDeviceSelector& PhysicalDeviceSelector::set_required_features_11(
|
||||||
@ -1440,8 +1435,6 @@ detail::Result<Device> DeviceBuilder::build() const {
|
|||||||
final_pnext_chain.push_back(reinterpret_cast<VkBaseOutStructure*>(&features_node));
|
final_pnext_chain.push_back(reinterpret_cast<VkBaseOutStructure*>(&features_node));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
printf("User provided VkPhysicalDeviceFeatures2 instance found in pNext chain. All requirements added via 'add_required_extension_features' will be ignored.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!user_defined_phys_dev_features_2 && !has_phys_dev_features_2) {
|
if(!user_defined_phys_dev_features_2 && !has_phys_dev_features_2) {
|
||||||
@ -1465,6 +1458,10 @@ detail::Result<Device> DeviceBuilder::build() const {
|
|||||||
device_create_info.enabledExtensionCount = static_cast<uint32_t>(extensions.size());
|
device_create_info.enabledExtensionCount = static_cast<uint32_t>(extensions.size());
|
||||||
device_create_info.ppEnabledExtensionNames = extensions.data();
|
device_create_info.ppEnabledExtensionNames = extensions.data();
|
||||||
|
|
||||||
|
if(!final_pnext_chain.empty()) {
|
||||||
|
device_create_info.pNext = final_pnext_chain.front();
|
||||||
|
}
|
||||||
|
|
||||||
Device device;
|
Device device;
|
||||||
|
|
||||||
VkResult res = detail::vulkan_functions().fp_vkCreateDevice(
|
VkResult res = detail::vulkan_functions().fp_vkCreateDevice(
|
||||||
|
@ -459,8 +459,10 @@ class PhysicalDeviceSelector {
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
// Require a physical device which supports the features in VkPhysicalDeviceFeatures.
|
PhysicalDeviceSelector& set_required_features(VkPhysicalDeviceFeatures const& features) {
|
||||||
PhysicalDeviceSelector& set_required_features(VkPhysicalDeviceFeatures const& features);
|
criteria.required_features = features;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
#if defined(VK_API_VERSION_1_2)
|
#if defined(VK_API_VERSION_1_2)
|
||||||
// Require a physical device which supports the features in VkPhysicalDeviceVulkan11Features.
|
// 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
|
// Must have vulkan version 1.2 - This is due to the VkPhysicalDeviceVulkan11Features struct being added in 1.2, not 1.1
|
||||||
|
Loading…
Reference in New Issue
Block a user