vulkan: Bind descriptor sets early

Simplfies the code and doesn't change anything.
This commit is contained in:
Benjamin Otte 2023-07-08 23:16:01 +02:00
parent a6b2bcbf24
commit d7764cc6b3
3 changed files with 9 additions and 18 deletions

View File

@ -569,20 +569,6 @@ gsk_vulkan_render_get_render_pass (GskVulkanRender *self,
return render_pass;
}
void
gsk_vulkan_render_bind_descriptor_sets (GskVulkanRender *self,
VkCommandBuffer command_buffer)
{
vkCmdBindDescriptorSets (command_buffer,
VK_PIPELINE_BIND_POINT_GRAPHICS,
self->pipeline_layout,
0,
N_DESCRIPTOR_SETS,
self->descriptor_sets,
0,
NULL);
}
gsize
gsk_vulkan_render_get_image_descriptor (GskVulkanRender *self,
GskVulkanImage *image,
@ -778,6 +764,15 @@ gsk_vulkan_render_draw_pass (GskVulkanRender *self,
},
(VkDeviceSize[1]) { 0 });
vkCmdBindDescriptorSets (command_buffer,
VK_PIPELINE_BIND_POINT_GRAPHICS,
self->pipeline_layout,
0,
N_DESCRIPTOR_SETS,
self->descriptor_sets,
0,
NULL);
gsk_vulkan_render_pass_draw (pass, self, self->pipeline_layout, command_buffer);
gsk_vulkan_command_pool_submit_buffer (self->command_pool,

View File

@ -1472,8 +1472,6 @@ gsk_vulkan_render_pass_draw (GskVulkanRenderPass *self,
},
VK_SUBPASS_CONTENTS_INLINE);
gsk_vulkan_render_bind_descriptor_sets (render, command_buffer);
gsk_vulkan_render_pass_draw_rect (self, render, pipeline_layout, command_buffer);
vkCmdEndRenderPass (command_buffer);

View File

@ -48,8 +48,6 @@ guchar * gsk_vulkan_render_get_buffer_memory (GskVulk
gsize size,
gsize alignment,
gsize *out_offset);
void gsk_vulkan_render_bind_descriptor_sets (GskVulkanRender *self,
VkCommandBuffer command_buffer);
void gsk_vulkan_render_draw (GskVulkanRender *self);
void gsk_vulkan_render_draw_pass (GskVulkanRender *self,