zink: use portability EXT on Apple.
Vulkan behaviour has changed to require VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR and VK_KHR_portability_enumeration to be used on layered Vulkan implementations. These are enbaled on macOS/Apple as MoltenVK is the only implmentation (time of writing) and newer version require this. Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28259>
This commit is contained in:
committed by
Marge Bot
parent
32ac90d8c2
commit
d0015ebbab
@@ -28,6 +28,7 @@ from os import path
|
||||
from xml.etree import ElementTree
|
||||
from zink_extensions import Extension,Layer,ExtensionRegistry,Version
|
||||
import sys
|
||||
import platform
|
||||
|
||||
# constructor: Extension(name, conditions=[], nonstandard=False)
|
||||
# The attributes:
|
||||
@@ -50,6 +51,11 @@ EXTENSIONS = [
|
||||
Extension("VK_KHR_win32_surface"),
|
||||
]
|
||||
|
||||
if platform.system() == "Darwin":
|
||||
EXTENSIONS += [
|
||||
Extension("VK_KHR_portability_enumeration"),
|
||||
]
|
||||
|
||||
# constructor: Layer(name, conditions=[])
|
||||
# - conditions: See documentation of EXTENSIONS.
|
||||
LAYERS = [
|
||||
@@ -246,6 +252,9 @@ zink_create_instance(struct zink_screen *screen, bool display_dev)
|
||||
|
||||
VkInstanceCreateInfo ici = {0};
|
||||
ici.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
|
||||
#ifdef __APPLE__
|
||||
ici.flags = VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR;
|
||||
#endif
|
||||
ici.pApplicationInfo = &ai;
|
||||
ici.ppEnabledExtensionNames = extensions;
|
||||
ici.enabledExtensionCount = num_extensions;
|
||||
|
||||
Reference in New Issue
Block a user