Start going through VKFUNC

This commit is contained in:
twinaphex 2016-02-29 16:47:21 +01:00
parent 6c9e8041c6
commit 3677144d18
2 changed files with 7 additions and 2 deletions

View File

@ -101,6 +101,9 @@ void vulkan_copy_staging_to_dynamic(vk_t *vk, VkCommandBuffer cmd,
struct vk_texture *staging)
{
VkImageCopy region;
struct vulkan_context_fp *vkcfp =
vk->context ? (struct vulkan_context_fp*)&vk->context->fp : NULL;
retro_assert(dynamic->type == VULKAN_TEXTURE_DYNAMIC);
retro_assert(staging->type == VULKAN_TEXTURE_STAGING);
@ -126,7 +129,7 @@ void vulkan_copy_staging_to_dynamic(vk_t *vk, VkCommandBuffer cmd,
region.srcSubresource.layerCount = 1;
region.dstSubresource = region.srcSubresource;
vk->context->fp.vkCmdCopyImage(vk->cmd,
VKFUNC(vkCmdCopyImage)(vk->cmd,
staging->image, VK_IMAGE_LAYOUT_GENERAL,
dynamic->image, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
1, &region);

View File

@ -127,9 +127,11 @@ enum vulkan_wsi_type
VULKAN_WSI_XLIB
};
#define VKFUNC(sym) (vkcfp->sym)
typedef struct vulkan_context
{
struct
struct vulkan_context_fp
{
PFN_vkDestroyFence vkDestroyFence;
PFN_vkCreateFence vkCreateFence;