Add pNext as optional last argument to constructors of structs that hold a pNext.

This commit is contained in:
asuessenbach
2022-03-23 17:08:19 +01:00
parent efcb07a591
commit d90c6cbbfc
7 changed files with 3307 additions and 1744 deletions

View File

@@ -308,7 +308,8 @@ namespace vk
vk::ImageLayout::eUndefined,
vk::MemoryPropertyFlagBits::eDeviceLocal,
vk::ImageAspectFlagBits::eDepth )
{}
{
}
};
struct SurfaceData
@@ -356,8 +357,8 @@ namespace vk
swapchainExtent = surfaceCapabilities.currentExtent;
}
vk::SurfaceTransformFlagBitsKHR preTransform = ( surfaceCapabilities.supportedTransforms & vk::SurfaceTransformFlagBitsKHR::eIdentity )
? vk::SurfaceTransformFlagBitsKHR::eIdentity
: surfaceCapabilities.currentTransform;
? vk::SurfaceTransformFlagBitsKHR::eIdentity
: surfaceCapabilities.currentTransform;
vk::CompositeAlphaFlagBitsKHR compositeAlpha =
( surfaceCapabilities.supportedCompositeAlpha & vk::CompositeAlphaFlagBitsKHR::ePreMultiplied ) ? vk::CompositeAlphaFlagBitsKHR::ePreMultiplied
: ( surfaceCapabilities.supportedCompositeAlpha & vk::CompositeAlphaFlagBitsKHR::ePostMultiplied ) ? vk::CompositeAlphaFlagBitsKHR::ePostMultiplied
@@ -591,8 +592,7 @@ namespace vk
float queuePriority = 0.0f;
vk::DeviceQueueCreateInfo deviceQueueCreateInfo( vk::DeviceQueueCreateFlags(), queueFamilyIndex, 1, &queuePriority );
vk::DeviceCreateInfo deviceCreateInfo( vk::DeviceCreateFlags(), deviceQueueCreateInfo, {}, enabledExtensions, physicalDeviceFeatures );
deviceCreateInfo.pNext = pNext;
vk::DeviceCreateInfo deviceCreateInfo( vk::DeviceCreateFlags(), deviceQueueCreateInfo, {}, enabledExtensions, physicalDeviceFeatures, pNext );
return vk::raii::Device( physicalDevice, deviceCreateInfo );
}