mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-16 03:42:47 +01:00
vulkan_common: further initialization tweaks
This commit is contained in:
parent
bcf59ff3a7
commit
7e7a23363a
2 changed files with 9 additions and 1 deletions
|
@ -86,6 +86,8 @@ constexpr std::array REQUIRED_EXTENSIONS{
|
||||||
};
|
};
|
||||||
|
|
||||||
constexpr std::array REQUIRED_EXTENSIONS_BEFORE_1_2{
|
constexpr std::array REQUIRED_EXTENSIONS_BEFORE_1_2{
|
||||||
|
VK_KHR_TIMELINE_SEMAPHORE_EXTENSION_NAME,
|
||||||
|
VK_EXT_HOST_QUERY_RESET_EXTENSION_NAME,
|
||||||
VK_KHR_8BIT_STORAGE_EXTENSION_NAME,
|
VK_KHR_8BIT_STORAGE_EXTENSION_NAME,
|
||||||
VK_KHR_SHADER_FLOAT_CONTROLS_EXTENSION_NAME,
|
VK_KHR_SHADER_FLOAT_CONTROLS_EXTENSION_NAME,
|
||||||
VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_EXTENSION_NAME,
|
VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_EXTENSION_NAME,
|
||||||
|
|
|
@ -454,6 +454,12 @@ VkResult Free(VkDevice device, VkCommandPool handle, Span<VkCommandBuffer> buffe
|
||||||
|
|
||||||
Instance Instance::Create(u32 version, Span<const char*> layers, Span<const char*> extensions,
|
Instance Instance::Create(u32 version, Span<const char*> layers, Span<const char*> extensions,
|
||||||
InstanceDispatch& dispatch) {
|
InstanceDispatch& dispatch) {
|
||||||
|
#ifdef __APPLE__
|
||||||
|
constexpr VkFlags ci_flags{VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR};
|
||||||
|
#else
|
||||||
|
constexpr VkFlags ci_flags{};
|
||||||
|
#endif
|
||||||
|
|
||||||
const VkApplicationInfo application_info{
|
const VkApplicationInfo application_info{
|
||||||
.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO,
|
.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO,
|
||||||
.pNext = nullptr,
|
.pNext = nullptr,
|
||||||
|
@ -466,7 +472,7 @@ Instance Instance::Create(u32 version, Span<const char*> layers, Span<const char
|
||||||
const VkInstanceCreateInfo ci{
|
const VkInstanceCreateInfo ci{
|
||||||
.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO,
|
.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO,
|
||||||
.pNext = nullptr,
|
.pNext = nullptr,
|
||||||
.flags = 0,
|
.flags = ci_flags,
|
||||||
.pApplicationInfo = &application_info,
|
.pApplicationInfo = &application_info,
|
||||||
.enabledLayerCount = layers.size(),
|
.enabledLayerCount = layers.size(),
|
||||||
.ppEnabledLayerNames = layers.data(),
|
.ppEnabledLayerNames = layers.data(),
|
||||||
|
|
Loading…
Reference in a new issue