mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-19 09:23:01 +00:00
Go through funcptr for vkAllocateCommandBuffers
This commit is contained in:
parent
83dc7db6c7
commit
1b85ee442f
@ -434,7 +434,7 @@ struct vk_texture vulkan_create_texture(vk_t *vk,
|
|||||||
cmd_info.commandPool = vk->staging_pool;
|
cmd_info.commandPool = vk->staging_pool;
|
||||||
cmd_info.level = VK_COMMAND_BUFFER_LEVEL_PRIMARY;
|
cmd_info.level = VK_COMMAND_BUFFER_LEVEL_PRIMARY;
|
||||||
cmd_info.commandBufferCount = 1;
|
cmd_info.commandBufferCount = 1;
|
||||||
vkAllocateCommandBuffers(vk->context->device, &cmd_info, &staging);
|
VKFUNC(vkAllocateCommandBuffers)(vk->context->device, &cmd_info, &staging);
|
||||||
|
|
||||||
begin_info.flags = VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT;
|
begin_info.flags = VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT;
|
||||||
|
|
||||||
@ -1164,6 +1164,7 @@ bool vulkan_context_init(gfx_ctx_vulkan_data_t *vk,
|
|||||||
|
|
||||||
/* Render Passes */
|
/* Render Passes */
|
||||||
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, DestroyRenderPass);
|
||||||
|
|
||||||
|
|
||||||
/* Fragment operations */
|
/* Fragment operations */
|
||||||
|
@ -208,6 +208,7 @@ typedef struct vulkan_context
|
|||||||
|
|
||||||
/* Render Passes */
|
/* Render Passes */
|
||||||
PFN_vkCreateRenderPass vkCreateRenderPass;
|
PFN_vkCreateRenderPass vkCreateRenderPass;
|
||||||
|
PFN_vkDestroyRenderPass vkDestroyRenderPass;
|
||||||
|
|
||||||
/* Render Pass commands */
|
/* Render Pass commands */
|
||||||
PFN_vkCmdBeginRenderPass vkCmdBeginRenderPass;
|
PFN_vkCmdBeginRenderPass vkCmdBeginRenderPass;
|
||||||
|
@ -585,7 +585,7 @@ static void vulkan_deinit_framebuffers(
|
|||||||
vk->swapchain[i].backbuffer.view, NULL);
|
vk->swapchain[i].backbuffer.view, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
vkDestroyRenderPass(vk->context->device, vk->render_pass, NULL);
|
VKFUNC(vkDestroyRenderPass)(vk->context->device, vk->render_pass, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool vulkan_init_default_filter_chain(vk_t *vk)
|
static bool vulkan_init_default_filter_chain(vk_t *vk)
|
||||||
@ -603,7 +603,8 @@ static bool vulkan_init_default_filter_chain(vk_t *vk)
|
|||||||
info.swapchain.render_pass = vk->render_pass;
|
info.swapchain.render_pass = vk->render_pass;
|
||||||
info.swapchain.num_indices = vk->context->num_swapchain_images;
|
info.swapchain.num_indices = vk->context->num_swapchain_images;
|
||||||
|
|
||||||
vk->filter_chain = vulkan_filter_chain_create_default(&info,
|
vk->filter_chain = vulkan_filter_chain_create_default(
|
||||||
|
&info,
|
||||||
vk->video.smooth ?
|
vk->video.smooth ?
|
||||||
VULKAN_FILTER_CHAIN_LINEAR : VULKAN_FILTER_CHAIN_NEAREST);
|
VULKAN_FILTER_CHAIN_LINEAR : VULKAN_FILTER_CHAIN_NEAREST);
|
||||||
|
|
||||||
@ -633,7 +634,8 @@ static bool vulkan_init_filter_chain_preset(vk_t *vk, const char *shader_path)
|
|||||||
info.swapchain.render_pass = vk->render_pass;
|
info.swapchain.render_pass = vk->render_pass;
|
||||||
info.swapchain.num_indices = vk->context->num_swapchain_images;
|
info.swapchain.num_indices = vk->context->num_swapchain_images;
|
||||||
|
|
||||||
vk->filter_chain = vulkan_filter_chain_create_from_preset(&info, shader_path,
|
vk->filter_chain = vulkan_filter_chain_create_from_preset(
|
||||||
|
&info, shader_path,
|
||||||
vk->video.smooth ?
|
vk->video.smooth ?
|
||||||
VULKAN_FILTER_CHAIN_LINEAR : VULKAN_FILTER_CHAIN_NEAREST);
|
VULKAN_FILTER_CHAIN_LINEAR : VULKAN_FILTER_CHAIN_NEAREST);
|
||||||
|
|
||||||
@ -722,7 +724,8 @@ static void vulkan_deinit_static_resources(
|
|||||||
vk->context->device,
|
vk->context->device,
|
||||||
&vk->display.blank_texture);
|
&vk->display.blank_texture);
|
||||||
|
|
||||||
VKFUNC(vkDestroyCommandPool)(vk->context->device, vk->staging_pool, NULL);
|
VKFUNC(vkDestroyCommandPool)(vk->context->device,
|
||||||
|
vk->staging_pool, NULL);
|
||||||
free(vk->hw.cmd);
|
free(vk->hw.cmd);
|
||||||
free(vk->hw.wait_dst_stages);
|
free(vk->hw.wait_dst_stages);
|
||||||
|
|
||||||
@ -923,7 +926,8 @@ static void vulkan_init_readback(vk_t *vk)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *vulkan_init(const video_info_t *video, const input_driver_t **input,
|
static void *vulkan_init(const video_info_t *video,
|
||||||
|
const input_driver_t **input,
|
||||||
void **input_data)
|
void **input_data)
|
||||||
{
|
{
|
||||||
gfx_ctx_mode_t mode;
|
gfx_ctx_mode_t mode;
|
||||||
@ -1581,7 +1585,7 @@ static bool vulkan_frame(void *data, const void *frame,
|
|||||||
}
|
}
|
||||||
|
|
||||||
quad.sampler = vk->samplers.linear;
|
quad.sampler = vk->samplers.linear;
|
||||||
quad.mvp = &vk->mvp_no_rot;
|
quad.mvp = &vk->mvp_no_rot;
|
||||||
quad.color.r = 1.0f;
|
quad.color.r = 1.0f;
|
||||||
quad.color.g = 1.0f;
|
quad.color.g = 1.0f;
|
||||||
quad.color.b = 1.0f;
|
quad.color.b = 1.0f;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user