vulkan_device: Use designated initializers for features
This commit is contained in:
parent
79afdeaf08
commit
1a987054c5
1 changed files with 59 additions and 60 deletions
|
@ -191,22 +191,17 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR
|
||||||
const vk::InstanceDispatch& dld_)
|
const vk::InstanceDispatch& dld_)
|
||||||
: instance{instance_}, dld{dld_}, physical{physical_}, properties{physical.GetProperties()},
|
: instance{instance_}, dld{dld_}, physical{physical_}, properties{physical.GetProperties()},
|
||||||
format_properties{GetFormatProperties(physical)} {
|
format_properties{GetFormatProperties(physical)} {
|
||||||
CheckSuitability();
|
CheckSuitability(surface != nullptr);
|
||||||
SetupFamilies(surface);
|
SetupFamilies(surface);
|
||||||
SetupFeatures();
|
SetupFeatures();
|
||||||
|
|
||||||
const auto queue_cis = GetDeviceQueueCreateInfos();
|
const auto queue_cis = GetDeviceQueueCreateInfos();
|
||||||
const std::vector extensions = LoadExtensions();
|
const std::vector extensions = LoadExtensions(surface != nullptr);
|
||||||
|
|
||||||
VkPhysicalDeviceFeatures2 features2{
|
VkPhysicalDeviceFeatures2 features2{
|
||||||
.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2,
|
.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2,
|
||||||
.pNext = nullptr,
|
.pNext = nullptr,
|
||||||
.features{},
|
.features{
|
||||||
};
|
|
||||||
const void* first_next = &features2;
|
|
||||||
void** next = &features2.pNext;
|
|
||||||
|
|
||||||
features2.features = {
|
|
||||||
.robustBufferAccess = false,
|
.robustBufferAccess = false,
|
||||||
.fullDrawIndexUint32 = false,
|
.fullDrawIndexUint32 = false,
|
||||||
.imageCubeArray = true,
|
.imageCubeArray = true,
|
||||||
|
@ -262,7 +257,11 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR
|
||||||
.sparseResidencyAliased = false,
|
.sparseResidencyAliased = false,
|
||||||
.variableMultisampleRate = false,
|
.variableMultisampleRate = false,
|
||||||
.inheritedQueries = false,
|
.inheritedQueries = false,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
const void* first_next = &features2;
|
||||||
|
void** next = &features2.pNext;
|
||||||
|
|
||||||
VkPhysicalDeviceTimelineSemaphoreFeaturesKHR timeline_semaphore{
|
VkPhysicalDeviceTimelineSemaphoreFeaturesKHR timeline_semaphore{
|
||||||
.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES_KHR,
|
.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES_KHR,
|
||||||
.pNext = nullptr,
|
.pNext = nullptr,
|
||||||
|
|
Loading…
Reference in a new issue