(Vulkan) Add more Vulkan function pointers

This commit is contained in:
twinaphex 2016-02-29 23:28:12 +01:00
parent 860b7fde62
commit 9a10ef5591
2 changed files with 9 additions and 3 deletions

View File

@ -783,7 +783,7 @@ struct vk_buffer vulkan_create_buffer(
info.sharingMode = VK_SHARING_MODE_EXCLUSIVE;
VKFUNC(vkCreateBuffer)(context->device, &info, NULL, &buffer.buffer);
vkGetBufferMemoryRequirements(context->device, buffer.buffer, &mem_reqs);
VKFUNC(vkGetBufferMemoryRequirements)(context->device, buffer.buffer, &mem_reqs);
alloc.allocationSize = mem_reqs.size;
alloc.memoryTypeIndex = vulkan_find_memory_type(
@ -792,7 +792,7 @@ struct vk_buffer vulkan_create_buffer(
VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT |
VK_MEMORY_PROPERTY_HOST_COHERENT_BIT);
VKFUNC(vkAllocateMemory)(context->device, &alloc, NULL, &buffer.memory);
vkBindBufferMemory(context->device, buffer.buffer, buffer.memory, 0);
VKFUNC(vkBindBufferMemory)(context->device, buffer.buffer, buffer.memory, 0);
buffer.size = alloc.allocationSize;
@ -1154,9 +1154,13 @@ bool vulkan_context_init(gfx_ctx_vulkan_data_t *vk,
/* Images */
VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, CreateImage);
VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, DestroyImage);
VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, BindImageMemory);
VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, GetImageSubresourceLayout);
/* Images (Resource Memory Association) */
VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, GetBufferMemoryRequirements);
VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, BindBufferMemory);
VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, BindImageMemory);
/* Image Views */
VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, CreateImageView);
VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, DestroyImageView);

View File

@ -170,6 +170,8 @@ typedef struct vulkan_context
PFN_vkGetImageSubresourceLayout vkGetImageSubresourceLayout;
/* Images (Resource Memory Association) */
PFN_vkGetBufferMemoryRequirements vkGetBufferMemoryRequirements;
PFN_vkBindBufferMemory vkBindBufferMemory;
PFN_vkBindImageMemory vkBindImageMemory;
/* Image Views */