winevulkan: Implement vkDestroyInstance.
Signed-off-by: Roderick Colenbrander <thunderbird2k@gmail.com> Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
586a18995f
commit
539a757728
|
@ -89,7 +89,7 @@ FUNCTION_OVERRIDES = {
|
||||||
"vkGetInstanceProcAddr": {"dispatch" : False, "driver" : True, "thunk" : False},
|
"vkGetInstanceProcAddr": {"dispatch" : False, "driver" : True, "thunk" : False},
|
||||||
|
|
||||||
# Instance functions
|
# Instance functions
|
||||||
"vkDestroyInstance" : {"dispatch" : True, "driver" : True, "thunk" : True },
|
"vkDestroyInstance" : {"dispatch" : True, "driver" : True, "thunk" : False },
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1032,6 +1032,21 @@ class VkGenerator(object):
|
||||||
f.write("/* For use by vk_icdGetInstanceProcAddr / vkGetInstanceProcAddr */\n")
|
f.write("/* For use by vk_icdGetInstanceProcAddr / vkGetInstanceProcAddr */\n")
|
||||||
f.write("void *wine_vk_get_instance_proc_addr(const char *name) DECLSPEC_HIDDEN;\n\n")
|
f.write("void *wine_vk_get_instance_proc_addr(const char *name) DECLSPEC_HIDDEN;\n\n")
|
||||||
|
|
||||||
|
# Generate prototypes for device and instance functions requiring a custom implementation.
|
||||||
|
f.write("/* Functions for which we have custom implementations outside of the thunks. */\n")
|
||||||
|
for vk_func in self.registry.funcs.values():
|
||||||
|
if not vk_func.is_required():
|
||||||
|
continue
|
||||||
|
|
||||||
|
if vk_func.is_global_func():
|
||||||
|
continue
|
||||||
|
|
||||||
|
if vk_func.needs_thunk():
|
||||||
|
continue
|
||||||
|
|
||||||
|
f.write("{0};\n".format(vk_func.prototype("WINAPI", prefix="wine_", postfix="DECLSPEC_HIDDEN")))
|
||||||
|
f.write("\n")
|
||||||
|
|
||||||
f.write("#endif /* __WINE_VULKAN_THUNKS_H */\n")
|
f.write("#endif /* __WINE_VULKAN_THUNKS_H */\n")
|
||||||
|
|
||||||
def generate_vulkan_h(self, f):
|
def generate_vulkan_h(self, f):
|
||||||
|
|
|
@ -108,6 +108,16 @@ err:
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void WINAPI wine_vkDestroyInstance(VkInstance instance, const VkAllocationCallbacks *allocator)
|
||||||
|
{
|
||||||
|
TRACE("%p, %p\n", instance, allocator);
|
||||||
|
|
||||||
|
if (allocator)
|
||||||
|
FIXME("Support allocation allocators\n");
|
||||||
|
|
||||||
|
wine_vk_instance_free(instance);
|
||||||
|
}
|
||||||
|
|
||||||
static VkResult WINAPI wine_vkEnumerateInstanceExtensionProperties(const char *layer_name,
|
static VkResult WINAPI wine_vkEnumerateInstanceExtensionProperties(const char *layer_name,
|
||||||
uint32_t *count, VkExtensionProperties *properties)
|
uint32_t *count, VkExtensionProperties *properties)
|
||||||
{
|
{
|
||||||
|
|
|
@ -16,11 +16,6 @@ static VkResult WINAPI wine_vkCreateDevice(VkPhysicalDevice physicalDevice, cons
|
||||||
return VK_ERROR_OUT_OF_HOST_MEMORY;
|
return VK_ERROR_OUT_OF_HOST_MEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void WINAPI wine_vkDestroyInstance(VkInstance instance, const VkAllocationCallbacks *pAllocator)
|
|
||||||
{
|
|
||||||
FIXME("stub: %p, %p\n", instance, pAllocator);
|
|
||||||
}
|
|
||||||
|
|
||||||
static VkResult WINAPI wine_vkEnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, const char *pLayerName, uint32_t *pPropertyCount, VkExtensionProperties *pProperties)
|
static VkResult WINAPI wine_vkEnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, const char *pLayerName, uint32_t *pPropertyCount, VkExtensionProperties *pProperties)
|
||||||
{
|
{
|
||||||
FIXME("stub: %p, %p, %p, %p\n", physicalDevice, pLayerName, pPropertyCount, pProperties);
|
FIXME("stub: %p, %p, %p, %p\n", physicalDevice, pLayerName, pPropertyCount, pProperties);
|
||||||
|
|
|
@ -6,4 +6,7 @@
|
||||||
/* For use by vk_icdGetInstanceProcAddr / vkGetInstanceProcAddr */
|
/* For use by vk_icdGetInstanceProcAddr / vkGetInstanceProcAddr */
|
||||||
void *wine_vk_get_instance_proc_addr(const char *name) DECLSPEC_HIDDEN;
|
void *wine_vk_get_instance_proc_addr(const char *name) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
|
/* Functions for which we have custom implementations outside of the thunks. */
|
||||||
|
void WINAPI wine_vkDestroyInstance(VkInstance instance, const VkAllocationCallbacks *pAllocator) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
#endif /* __WINE_VULKAN_THUNKS_H */
|
#endif /* __WINE_VULKAN_THUNKS_H */
|
||||||
|
|
Loading…
Reference in New Issue