winevulkan: Use __wine_unix_call interface for some Vulkan functions.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
37be098954
commit
c3862f2a61
|
@ -377,7 +377,7 @@ void WINAPI vkGetPhysicalDeviceProperties2(VkPhysicalDevice phys_dev,
|
||||||
|
|
||||||
params.physicalDevice = phys_dev;
|
params.physicalDevice = phys_dev;
|
||||||
params.pProperties = properties2;
|
params.pProperties = properties2;
|
||||||
unix_funcs->p_vk_call(unix_vkGetPhysicalDeviceProperties2, ¶ms);
|
vk_unix_call(unix_vkGetPhysicalDeviceProperties2, ¶ms);
|
||||||
fill_luid_property(properties2);
|
fill_luid_property(properties2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -390,7 +390,7 @@ void WINAPI vkGetPhysicalDeviceProperties2KHR(VkPhysicalDevice phys_dev,
|
||||||
|
|
||||||
params.physicalDevice = phys_dev;
|
params.physicalDevice = phys_dev;
|
||||||
params.pProperties = properties2;
|
params.pProperties = properties2;
|
||||||
unix_funcs->p_vk_call(unix_vkGetPhysicalDeviceProperties2KHR, ¶ms);
|
vk_unix_call(unix_vkGetPhysicalDeviceProperties2KHR, ¶ms);
|
||||||
fill_luid_property(properties2);
|
fill_luid_property(properties2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -146,6 +146,16 @@ ALLOWED_X_EXTENSIONS = [
|
||||||
"VK_NVX_image_view_handle",
|
"VK_NVX_image_view_handle",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
# We can't use syscall interface for functions that may call display drivers
|
||||||
|
# until drivers are converted to pure Unix libraries. Also some frequently
|
||||||
|
# called functions use direct calls for performance reasons.
|
||||||
|
DIRECT_CALL_FUNCTIONS = [
|
||||||
|
"vkCreateDevice",
|
||||||
|
"vkEnumerateInstanceVersion",
|
||||||
|
"vkUpdateDescriptorSets",
|
||||||
|
"vkUpdateDescriptorSetWithTemplate",
|
||||||
|
]
|
||||||
|
|
||||||
# Functions part of our winevulkan graphics driver interface.
|
# Functions part of our winevulkan graphics driver interface.
|
||||||
# DRIVER_VERSION should be bumped on any change to driver interface
|
# DRIVER_VERSION should be bumped on any change to driver interface
|
||||||
# in FUNCTION_OVERRIDES
|
# in FUNCTION_OVERRIDES
|
||||||
|
@ -668,6 +678,12 @@ class VkFunction(object):
|
||||||
# The function needs exposed if at-least one extension isn't both UNSUPPORTED and UNEXPOSED
|
# The function needs exposed if at-least one extension isn't both UNSUPPORTED and UNEXPOSED
|
||||||
return self.is_required() and (not self.extensions or not self.extensions.issubset(UNEXPOSED_EXTENSIONS))
|
return self.is_required() and (not self.extensions or not self.extensions.issubset(UNEXPOSED_EXTENSIONS))
|
||||||
|
|
||||||
|
def needs_direct_call(self):
|
||||||
|
# vkCmd* functions are frequently called, use direct calls for performance
|
||||||
|
if self.name.startswith("vkCmd"):
|
||||||
|
return True
|
||||||
|
return self.is_driver_func() or self.name in DIRECT_CALL_FUNCTIONS
|
||||||
|
|
||||||
def pfn(self, prefix="p", call_conv=None, conv=False):
|
def pfn(self, prefix="p", call_conv=None, conv=False):
|
||||||
""" Create function pointer. """
|
""" Create function pointer. """
|
||||||
|
|
||||||
|
@ -754,7 +770,10 @@ class VkFunction(object):
|
||||||
# Call the Unix function.
|
# Call the Unix function.
|
||||||
if self.type != "void" and not self.returns_longlong():
|
if self.type != "void" and not self.returns_longlong():
|
||||||
body += "return "
|
body += "return "
|
||||||
|
if self.needs_direct_call():
|
||||||
body += "unix_funcs->p_vk_call(unix_{0}, ¶ms);\n".format(self.name)
|
body += "unix_funcs->p_vk_call(unix_{0}, ¶ms);\n".format(self.name)
|
||||||
|
else:
|
||||||
|
body += "vk_unix_call(unix_{0}, ¶ms);\n".format(self.name)
|
||||||
if self.returns_longlong():
|
if self.returns_longlong():
|
||||||
body += " return params.result;\n"
|
body += " return params.result;\n"
|
||||||
return body
|
return body
|
||||||
|
|
Loading…
Reference in New Issue