mirror of
https://github.com/libretro/RetroArch
synced 2025-04-09 21:45:45 +00:00
(Vulkan) Add more Vulkan function pointers
This commit is contained in:
parent
860b7fde62
commit
9a10ef5591
@ -783,7 +783,7 @@ struct vk_buffer vulkan_create_buffer(
|
|||||||
info.sharingMode = VK_SHARING_MODE_EXCLUSIVE;
|
info.sharingMode = VK_SHARING_MODE_EXCLUSIVE;
|
||||||
VKFUNC(vkCreateBuffer)(context->device, &info, NULL, &buffer.buffer);
|
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.allocationSize = mem_reqs.size;
|
||||||
alloc.memoryTypeIndex = vulkan_find_memory_type(
|
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_VISIBLE_BIT |
|
||||||
VK_MEMORY_PROPERTY_HOST_COHERENT_BIT);
|
VK_MEMORY_PROPERTY_HOST_COHERENT_BIT);
|
||||||
VKFUNC(vkAllocateMemory)(context->device, &alloc, NULL, &buffer.memory);
|
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;
|
buffer.size = alloc.allocationSize;
|
||||||
|
|
||||||
@ -1154,9 +1154,13 @@ bool vulkan_context_init(gfx_ctx_vulkan_data_t *vk,
|
|||||||
/* Images */
|
/* Images */
|
||||||
VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, CreateImage);
|
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, DestroyImage);
|
||||||
VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, BindImageMemory);
|
|
||||||
VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, GetImageSubresourceLayout);
|
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 */
|
/* Image Views */
|
||||||
VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, CreateImageView);
|
VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, CreateImageView);
|
||||||
VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, DestroyImageView);
|
VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, DestroyImageView);
|
||||||
|
@ -170,6 +170,8 @@ typedef struct vulkan_context
|
|||||||
PFN_vkGetImageSubresourceLayout vkGetImageSubresourceLayout;
|
PFN_vkGetImageSubresourceLayout vkGetImageSubresourceLayout;
|
||||||
|
|
||||||
/* Images (Resource Memory Association) */
|
/* Images (Resource Memory Association) */
|
||||||
|
PFN_vkGetBufferMemoryRequirements vkGetBufferMemoryRequirements;
|
||||||
|
PFN_vkBindBufferMemory vkBindBufferMemory;
|
||||||
PFN_vkBindImageMemory vkBindImageMemory;
|
PFN_vkBindImageMemory vkBindImageMemory;
|
||||||
|
|
||||||
/* Image Views */
|
/* Image Views */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user