From bae94d9f475ee3f307f7b26501af8f37d453775f Mon Sep 17 00:00:00 2001 From: Charles Giessen Date: Fri, 21 May 2021 13:52:33 -0600 Subject: [PATCH] example: Load vkDestroySurfaceKHR correctly. vkDestroySurfaceKHR needs to be loaded with vkGetInstanceProcAddr, not vkGetDeviceProcAddr. --- tests/common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/common.h b/tests/common.h index fd5d15d..7e64777 100644 --- a/tests/common.h +++ b/tests/common.h @@ -88,6 +88,7 @@ struct VulkanLibrary { void init(VkInstance instance) { vkGetDeviceProcAddr = (PFN_vkGetDeviceProcAddr)vkGetInstanceProcAddr(instance, "vkGetDeviceProcAddr"); + vkDestroySurfaceKHR = (PFN_vkDestroySurfaceKHR)vkGetInstanceProcAddr(instance, "vkDestroySurfaceKHR"); } void init(VkDevice device) { @@ -125,7 +126,6 @@ struct VulkanLibrary { vkDestroyPipeline = (PFN_vkDestroyPipeline)vkGetDeviceProcAddr(device, "vkDestroyPipeline"); vkDestroyPipelineLayout = (PFN_vkDestroyPipelineLayout)vkGetDeviceProcAddr(device, "vkDestroyPipelineLayout"); - vkDestroySurfaceKHR = (PFN_vkDestroySurfaceKHR)vkGetDeviceProcAddr(device, "vkDestroySurfaceKHR"); vkDestroyRenderPass = (PFN_vkDestroyRenderPass)vkGetDeviceProcAddr(device, "vkDestroyRenderPass"); }