Add render pass command function pointers

This commit is contained in:
twinaphex 2016-02-29 21:43:04 +01:00
parent 7f5d0f2763
commit 4771c45ed3
3 changed files with 13 additions and 4 deletions

View File

@ -1154,6 +1154,7 @@ bool vulkan_context_init(gfx_ctx_vulkan_data_t *vk,
/* Render Passes */
VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, CreateRenderPass);
/* Fragment operations */
VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, CmdSetScissor);
@ -1249,8 +1250,9 @@ bool vulkan_context_init(gfx_ctx_vulkan_data_t *vk,
NULL, &vk->context.device) != VK_SUCCESS)
return false;
VKFUNC(vkGetDeviceQueue)(vk->context.device,
vk->context.graphics_queue_index, 0, &vk->context.queue);
/* Render Pass commands */
VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, CmdBeginRenderPass);
VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, CmdEndRenderPass);
/* Samplers */
VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, CreateSampler);
@ -1283,6 +1285,9 @@ bool vulkan_context_init(gfx_ctx_vulkan_data_t *vk,
VK_GET_DEVICE_PROC_ADDR(vk,
vk->context.device, QueuePresentKHR);
VKFUNC(vkGetDeviceQueue)(vk->context.device,
vk->context.graphics_queue_index, 0, &vk->context.queue);
switch (type)
{
case VULKAN_WSI_WAYLAND:

View File

@ -193,6 +193,10 @@ typedef struct vulkan_context
/* Render Passes */
PFN_vkCreateRenderPass vkCreateRenderPass;
/* Render Pass commands */
PFN_vkCmdBeginRenderPass vkCmdBeginRenderPass;
PFN_vkCmdEndRenderPass vkCmdEndRenderPass;
/* Clear commands */
PFN_vkCmdClearAttachments vkCmdClearAttachments;

View File

@ -1549,7 +1549,7 @@ static bool vulkan_frame(void *data, const void *frame,
VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT);
/* Begin render pass and set up viewport */
vkCmdBeginRenderPass(vk->cmd, &rp_info, VK_SUBPASS_CONTENTS_INLINE);
VKFUNC(vkCmdBeginRenderPass)(vk->cmd, &rp_info, VK_SUBPASS_CONTENTS_INLINE);
vulkan_filter_chain_build_viewport_pass(vk->filter_chain, vk->cmd,
&vk->vk_vp, vk->mvp.data);
@ -1600,7 +1600,7 @@ static bool vulkan_frame(void *data, const void *frame,
#endif
/* End the render pass. We're done rendering to backbuffer now. */
vkCmdEndRenderPass(vk->cmd);
VKFUNC(vkCmdEndRenderPass)(vk->cmd);
if (vk->readback.pending || vk->readback.streamed)
{