mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-26 17:50:56 +00:00
Some cleanups
This commit is contained in:
parent
670eede306
commit
d45f0e0946
@ -1246,6 +1246,8 @@ bool vulkan_context_init(gfx_ctx_vulkan_data_t *vk,
|
||||
|
||||
/* Clear commands */
|
||||
VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, CmdClearAttachments);
|
||||
|
||||
/* Drawing commands */
|
||||
VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, CmdDraw);
|
||||
|
||||
VK_GET_INSTANCE_PROC_ADDR(vk,
|
||||
|
@ -179,20 +179,28 @@ typedef struct vulkan_context
|
||||
PFN_vkCreateSampler vkCreateSampler;
|
||||
PFN_vkDestroySampler vkDestroySampler;
|
||||
|
||||
/* Render Passes */
|
||||
PFN_vkCreateRenderPass vkCreateRenderPass;
|
||||
|
||||
/* Clear commands */
|
||||
PFN_vkCmdClearAttachments vkCmdClearAttachments;
|
||||
|
||||
/* Drawing commands */
|
||||
PFN_vkCmdDraw vkCmdDraw;
|
||||
|
||||
/* Fragment operations */
|
||||
PFN_vkCmdSetScissor vkCmdSetScissor;
|
||||
|
||||
/* Fixed-function vertex postprocessing */
|
||||
PFN_vkCmdSetViewport vkCmdSetViewport;
|
||||
|
||||
PFN_vkCreateInstance vkCreateInstance;
|
||||
PFN_vkCreateRenderPass vkCreateRenderPass;
|
||||
PFN_vkGetPhysicalDeviceFormatProperties vkGetPhysicalDeviceFormatProperties;
|
||||
PFN_vkEnumeratePhysicalDevices vkEnumeratePhysicalDevices;
|
||||
PFN_vkGetPhysicalDeviceProperties vkGetPhysicalDeviceProperties;
|
||||
PFN_vkGetPhysicalDeviceMemoryProperties vkGetPhysicalDeviceMemoryProperties;
|
||||
PFN_vkGetPhysicalDeviceQueueFamilyProperties vkGetPhysicalDeviceQueueFamilyProperties;
|
||||
PFN_vkCmdSetScissor vkCmdSetScissor;
|
||||
PFN_vkCmdSetViewport vkCmdSetViewport;
|
||||
|
||||
PFN_vkCmdDraw vkCmdDraw;
|
||||
PFN_vkCreateDevice vkCreateDevice;
|
||||
PFN_vkDestroyDevice vkDestroyDevice;
|
||||
PFN_vkGetPhysicalDeviceSurfaceSupportKHR vkGetPhysicalDeviceSurfaceSupportKHR;
|
||||
|
@ -541,7 +541,9 @@ static void vulkan_deinit_command_buffers(vk_t *vk)
|
||||
}
|
||||
}
|
||||
|
||||
static void vulkan_deinit_pipeline_layout(vk_t *vk)
|
||||
static void vulkan_deinit_pipeline_layout(
|
||||
struct vulkan_context_fp *vkcfp,
|
||||
vk_t *vk)
|
||||
{
|
||||
vkDestroyPipelineLayout(vk->context->device,
|
||||
vk->pipelines.layout, NULL);
|
||||
@ -549,17 +551,22 @@ static void vulkan_deinit_pipeline_layout(vk_t *vk)
|
||||
vk->pipelines.set_layout, NULL);
|
||||
}
|
||||
|
||||
static void vulkan_deinit_pipelines(vk_t *vk)
|
||||
static void vulkan_deinit_pipelines(
|
||||
struct vulkan_context_fp *vkcfp,
|
||||
vk_t *vk)
|
||||
{
|
||||
unsigned i;
|
||||
vulkan_deinit_pipeline_layout(vk);
|
||||
|
||||
vulkan_deinit_pipeline_layout(vkcfp, vk);
|
||||
vkDestroyPipeline(vk->context->device, vk->pipelines.alpha_blend, NULL);
|
||||
vkDestroyPipeline(vk->context->device, vk->pipelines.font, NULL);
|
||||
for (i = 0; i < 4; i++)
|
||||
vkDestroyPipeline(vk->context->device, vk->display.pipelines[i], NULL);
|
||||
}
|
||||
|
||||
static void vulkan_deinit_framebuffers(vk_t *vk)
|
||||
static void vulkan_deinit_framebuffers(
|
||||
struct vulkan_context_fp *vkcfp,
|
||||
vk_t *vk)
|
||||
{
|
||||
unsigned i;
|
||||
for (i = 0; i < vk->num_swapchain_images; i++)
|
||||
@ -718,8 +725,8 @@ static void vulkan_deinit_static_resources(vk_t *vk)
|
||||
|
||||
static void vulkan_deinit_resources(vk_t *vk)
|
||||
{
|
||||
vulkan_deinit_pipelines(vk);
|
||||
vulkan_deinit_framebuffers(vk);
|
||||
vulkan_deinit_pipelines(&vk->context->fp, vk);
|
||||
vulkan_deinit_framebuffers(&vk->context->fp, vk);
|
||||
vulkan_deinit_descriptor_pool(vk);
|
||||
vulkan_deinit_textures(vk);
|
||||
vulkan_deinit_buffers(vk);
|
||||
|
Loading…
Reference in New Issue
Block a user