mirror of
https://github.com/charles-lunarg/vk-bootstrap.git
synced 2024-11-22 07:24:34 +00:00
example: Load vkDestroySurfaceKHR correctly.
vkDestroySurfaceKHR needs to be loaded with vkGetInstanceProcAddr, not vkGetDeviceProcAddr.
This commit is contained in:
parent
ab60522c9b
commit
bae94d9f47
@ -88,6 +88,7 @@ struct VulkanLibrary {
|
|||||||
|
|
||||||
void init(VkInstance instance) {
|
void init(VkInstance instance) {
|
||||||
vkGetDeviceProcAddr = (PFN_vkGetDeviceProcAddr)vkGetInstanceProcAddr(instance, "vkGetDeviceProcAddr");
|
vkGetDeviceProcAddr = (PFN_vkGetDeviceProcAddr)vkGetInstanceProcAddr(instance, "vkGetDeviceProcAddr");
|
||||||
|
vkDestroySurfaceKHR = (PFN_vkDestroySurfaceKHR)vkGetInstanceProcAddr(instance, "vkDestroySurfaceKHR");
|
||||||
}
|
}
|
||||||
|
|
||||||
void init(VkDevice device) {
|
void init(VkDevice device) {
|
||||||
@ -125,7 +126,6 @@ struct VulkanLibrary {
|
|||||||
vkDestroyPipeline = (PFN_vkDestroyPipeline)vkGetDeviceProcAddr(device, "vkDestroyPipeline");
|
vkDestroyPipeline = (PFN_vkDestroyPipeline)vkGetDeviceProcAddr(device, "vkDestroyPipeline");
|
||||||
vkDestroyPipelineLayout =
|
vkDestroyPipelineLayout =
|
||||||
(PFN_vkDestroyPipelineLayout)vkGetDeviceProcAddr(device, "vkDestroyPipelineLayout");
|
(PFN_vkDestroyPipelineLayout)vkGetDeviceProcAddr(device, "vkDestroyPipelineLayout");
|
||||||
vkDestroySurfaceKHR = (PFN_vkDestroySurfaceKHR)vkGetDeviceProcAddr(device, "vkDestroySurfaceKHR");
|
|
||||||
vkDestroyRenderPass = (PFN_vkDestroyRenderPass)vkGetDeviceProcAddr(device, "vkDestroyRenderPass");
|
vkDestroyRenderPass = (PFN_vkDestroyRenderPass)vkGetDeviceProcAddr(device, "vkDestroyRenderPass");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user