Add function pointers for vkCreatePipelineCache and vkCreatePipelineLayout

This commit is contained in:
twinaphex 2016-02-29 16:37:15 +01:00
parent 778b50fc28
commit 6dce80ea07
3 changed files with 6 additions and 2 deletions

View File

@ -1056,6 +1056,8 @@ bool vulkan_context_init(gfx_ctx_vulkan_data_t *vk,
VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, CmdBindPipeline); VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, CmdBindPipeline);
VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, CreateRenderPass); VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, CreateRenderPass);
VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, CreateFramebuffer); VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, CreateFramebuffer);
VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, CreatePipelineLayout);
VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, CreatePipelineCache);
if (vk->context.fp.vkEnumeratePhysicalDevices(vk->context.instance, if (vk->context.fp.vkEnumeratePhysicalDevices(vk->context.instance,
&gpu_count, NULL) != VK_SUCCESS) &gpu_count, NULL) != VK_SUCCESS)

View File

@ -141,6 +141,8 @@ typedef struct vulkan_context
PFN_vkGetDeviceQueue vkGetDeviceQueue; PFN_vkGetDeviceQueue vkGetDeviceQueue;
PFN_vkCreateInstance vkCreateInstance; PFN_vkCreateInstance vkCreateInstance;
PFN_vkCreateRenderPass vkCreateRenderPass; PFN_vkCreateRenderPass vkCreateRenderPass;
PFN_vkCreatePipelineLayout vkCreatePipelineLayout;
PFN_vkCreatePipelineCache vkCreatePipelineCache;
PFN_vkEnumeratePhysicalDevices vkEnumeratePhysicalDevices; PFN_vkEnumeratePhysicalDevices vkEnumeratePhysicalDevices;
PFN_vkGetPhysicalDeviceProperties vkGetPhysicalDeviceProperties; PFN_vkGetPhysicalDeviceProperties vkGetPhysicalDeviceProperties;
PFN_vkGetPhysicalDeviceMemoryProperties vkGetPhysicalDeviceMemoryProperties; PFN_vkGetPhysicalDeviceMemoryProperties vkGetPhysicalDeviceMemoryProperties;

View File

@ -185,7 +185,7 @@ static void vulkan_init_pipeline_layout(vk_t *vk)
layout_info.setLayoutCount = 1; layout_info.setLayoutCount = 1;
layout_info.pSetLayouts = &vk->pipelines.set_layout; layout_info.pSetLayouts = &vk->pipelines.set_layout;
vkCreatePipelineLayout(vk->context->device, vk->context->fp.vkCreatePipelineLayout(vk->context->device,
&layout_info, NULL, &vk->pipelines.layout); &layout_info, NULL, &vk->pipelines.layout);
} }
@ -650,7 +650,7 @@ static void vulkan_init_static_resources(vk_t *vk)
VkPipelineCacheCreateInfo cache = { VkPipelineCacheCreateInfo cache = {
VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO }; VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO };
vkCreatePipelineCache(vk->context->device, vk->context->fp.vkCreatePipelineCache(vk->context->device,
&cache, NULL, &vk->pipelines.cache); &cache, NULL, &vk->pipelines.cache);
pool_info.queueFamilyIndex = vk->context->graphics_queue_index; pool_info.queueFamilyIndex = vk->context->graphics_queue_index;