mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-13 14:00:09 +00:00
vulkan: Split out a function
Making that function externally usable allows having render passes managed externally. Also remove a nonexisting function from the header.
This commit is contained in:
parent
1d9ad55c54
commit
0946b0b333
@ -649,20 +649,10 @@ gsk_vulkan_render_prepare_descriptor_sets (GskVulkanRender *self)
|
||||
}
|
||||
|
||||
void
|
||||
gsk_vulkan_render_draw (GskVulkanRender *self)
|
||||
gsk_vulkan_render_draw_pass (GskVulkanRender *self,
|
||||
GskVulkanRenderPass *pass,
|
||||
VkFence fence)
|
||||
{
|
||||
GList *l;
|
||||
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
if (GSK_RENDERER_DEBUG_CHECK (self->renderer, SYNC))
|
||||
gsk_profiler_timer_begin (gsk_renderer_get_profiler (self->renderer), self->gpu_time_timer);
|
||||
#endif
|
||||
|
||||
gsk_vulkan_render_prepare_descriptor_sets (self);
|
||||
|
||||
for (l = self->render_passes; l; l = l->next)
|
||||
{
|
||||
GskVulkanRenderPass *pass = l->data;
|
||||
VkCommandBuffer command_buffer;
|
||||
gsize wait_semaphore_count;
|
||||
gsize signal_semaphore_count;
|
||||
@ -682,6 +672,25 @@ gsk_vulkan_render_draw (GskVulkanRender *self)
|
||||
wait_semaphores,
|
||||
signal_semaphore_count,
|
||||
signal_semaphores,
|
||||
fence);
|
||||
}
|
||||
|
||||
void
|
||||
gsk_vulkan_render_draw (GskVulkanRender *self)
|
||||
{
|
||||
GList *l;
|
||||
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
if (GSK_RENDERER_DEBUG_CHECK (self->renderer, SYNC))
|
||||
gsk_profiler_timer_begin (gsk_renderer_get_profiler (self->renderer), self->gpu_time_timer);
|
||||
#endif
|
||||
|
||||
gsk_vulkan_render_prepare_descriptor_sets (self);
|
||||
|
||||
for (l = self->render_passes; l; l = l->next)
|
||||
{
|
||||
gsk_vulkan_render_draw_pass (self,
|
||||
l->data,
|
||||
l->next != NULL ? VK_NULL_HANDLE : self->fence);
|
||||
}
|
||||
|
||||
|
@ -97,8 +97,9 @@ void gsk_vulkan_render_bind_descriptor_sets (GskVulk
|
||||
VkCommandBuffer command_buffer);
|
||||
|
||||
void gsk_vulkan_render_draw (GskVulkanRender *self);
|
||||
|
||||
void gsk_vulkan_render_submit (GskVulkanRender *self);
|
||||
void gsk_vulkan_render_draw_pass (GskVulkanRender *self,
|
||||
GskVulkanRenderPass *pass,
|
||||
VkFence fence);
|
||||
|
||||
GdkTexture * gsk_vulkan_render_download_target (GskVulkanRender *self);
|
||||
VkFramebuffer gsk_vulkan_render_get_framebuffer (GskVulkanRender *self,
|
||||
|
Loading…
Reference in New Issue
Block a user