vulkan: Use VkPipeline instead of GskVulkanPipeline
authorBenjamin Otte <otte@redhat.com>
Mon, 26 Jun 2023 21:26:19 +0000 (23:26 +0200)
committerBenjamin Otte <otte@redhat.com>
Sun, 16 Jul 2023 10:12:36 +0000 (12:12 +0200)
This is in preparation for getting rid of GskVulkanPipelines.

gsk/vulkan/gskvulkancolormatrixop.c
gsk/vulkan/gskvulkanoffscreenop.c
gsk/vulkan/gskvulkanop.c
gsk/vulkan/gskvulkanopprivate.h
gsk/vulkan/gskvulkanrenderpass.c
gsk/vulkan/gskvulkanscissorop.c
gsk/vulkan/gskvulkantextureop.c
gsk/vulkan/gskvulkanuploadcairoop.c
gsk/vulkan/gskvulkanuploadop.c

index 87edc24602bd9c8c80259708342aedbd82a0a818..fdf00f3f21e75903b1176a1050e61138be6a036b 100644 (file)
@@ -91,12 +91,12 @@ gsk_vulkan_color_matrix_op_reserve_descriptor_sets (GskVulkanOp     *op,
   self->sampler_descriptor = gsk_vulkan_render_get_sampler_descriptor (render, GSK_VULKAN_SAMPLER_DEFAULT);
 }
 
-static GskVulkanPipeline *
+static VkPipeline
 gsk_vulkan_color_matrix_op_get_pipeline (GskVulkanOp *op)
 {
   GskVulkanColorMatrixOp *self = (GskVulkanColorMatrixOp *) op;
 
-  return self->pipeline;
+  return gsk_vulkan_pipeline_get_pipeline (self->pipeline);
 }
 
 static void
index 2b5c982dd896615b3662e1570adc6aed5ae170a7..8bf4e7181da349a43cccc86bedbcebb49b301874 100644 (file)
@@ -62,7 +62,7 @@ gsk_vulkan_offscreen_op_reserve_descriptor_sets (GskVulkanOp     *op,
   gsk_vulkan_render_pass_reserve_descriptor_sets (self->render_pass, render);
 }
 
-static GskVulkanPipeline *
+static VkPipeline
 gsk_vulkan_offscreen_op_get_pipeline (GskVulkanOp *op)
 {
   return NULL;
index e4fc3018bbb83969e6d08825aca6adc597f2b425..d0e38fad772a2154f66d016d66fc22b1f6825a00 100644 (file)
@@ -49,7 +49,7 @@ gsk_vulkan_op_reserve_descriptor_sets (GskVulkanOp     *op,
   op->op_class->reserve_descriptor_sets (op, render);
 }
 
-GskVulkanPipeline *
+VkPipeline
 gsk_vulkan_op_get_pipeline (GskVulkanOp *op)
 {
   return op->op_class->get_pipeline (op);
index 4673e34d16dfa33f30de63f456408071c6e2ab2c..f99a90a2174d5e4a21197495a367223aeaa18d15 100644 (file)
@@ -34,7 +34,7 @@ struct _GskVulkanOpClass
                                                                          guchar                 *data);
   void                  (* reserve_descriptor_sets)                     (GskVulkanOp            *op,
                                                                          GskVulkanRender        *render);
-  GskVulkanPipeline *   (* get_pipeline)                                (GskVulkanOp            *op);
+  VkPipeline            (* get_pipeline)                                (GskVulkanOp            *op);
   void                  (* command)                                     (GskVulkanOp            *op,
                                                                          GskVulkanRender        *render,
                                                                          VkPipelineLayout        pipeline_layout,
@@ -62,7 +62,7 @@ void                    gsk_vulkan_op_collect_vertex_data               (GskVulk
                                                                          guchar                 *data);
 void                    gsk_vulkan_op_reserve_descriptor_sets           (GskVulkanOp            *op,
                                                                          GskVulkanRender        *render);
-GskVulkanPipeline *     gsk_vulkan_op_get_pipeline                      (GskVulkanOp            *op);
+VkPipeline              gsk_vulkan_op_get_pipeline                      (GskVulkanOp            *op);
 void                    gsk_vulkan_op_command                           (GskVulkanOp            *op,
                                                                          GskVulkanRender        *render,
                                                                          VkPipelineLayout        pipeline_layout,
index 41935505f253a959e1970c6c6d9e90b4da072b19..9ef656eaefef582f4d3f15892e2169fe6ec1d947 100644 (file)
@@ -2141,8 +2141,8 @@ gsk_vulkan_render_pass_draw_rect (GskVulkanRenderPass     *self,
                                   VkPipelineLayout         pipeline_layout,
                                   VkCommandBuffer          command_buffer)
 {
-  GskVulkanPipeline *current_pipeline = NULL;
-  GskVulkanPipeline *op_pipeline;
+  VkPipeline current_pipeline = VK_NULL_HANDLE;
+  VkPipeline op_pipeline;
   GskVulkanOp *op;
   guint i;
   GskVulkanBuffer *vertex_buffer;
@@ -2168,14 +2168,14 @@ gsk_vulkan_render_pass_draw_rect (GskVulkanRenderPass     *self,
           current_pipeline = op_pipeline;
           vkCmdBindPipeline (command_buffer,
                              VK_PIPELINE_BIND_POINT_GRAPHICS,
-                             gsk_vulkan_pipeline_get_pipeline (current_pipeline));
+                             current_pipeline);
         }
 
       gsk_vulkan_op_command (op, render, pipeline_layout, command_buffer);
     }
 }
 
-static GskVulkanPipeline *
+static VkPipeline
 gsk_vulkan_render_op_get_pipeline (GskVulkanOp *op_)
 {
   GskVulkanOpAll *op = (GskVulkanOpAll *) op_;
@@ -2190,11 +2190,11 @@ gsk_vulkan_render_op_get_pipeline (GskVulkanOp *op_)
     case GSK_VULKAN_OP_OUTSET_SHADOW:
     case GSK_VULKAN_OP_CROSS_FADE:
     case GSK_VULKAN_OP_BLEND_MODE:
-      return op->render.pipeline;
+      return gsk_vulkan_pipeline_get_pipeline (op->render.pipeline);
 
     case GSK_VULKAN_OP_TEXT:
     case GSK_VULKAN_OP_COLOR_TEXT:
-      return op->text.pipeline;
+      return gsk_vulkan_pipeline_get_pipeline (op->text.pipeline);
 
     case GSK_VULKAN_OP_PUSH_VERTEX_CONSTANTS:
       return NULL;
index bd9a3c5a6903ca9691af6cfafc1c388b0a52797f..c8f792f7caeec594add3da240df8b4b26806cac1 100644 (file)
@@ -47,7 +47,7 @@ gsk_vulkan_scissor_op_reserve_descriptor_sets (GskVulkanOp     *op,
 {
 }
 
-static GskVulkanPipeline *
+static VkPipeline
 gsk_vulkan_scissor_op_get_pipeline (GskVulkanOp *op)
 {
   return NULL;
index 3f6bcda334b2cd0484e6256f113ea7b5bb62cd29..873f524567e142bb7ae9db21cbc4fa7a5544a3ec 100644 (file)
@@ -88,12 +88,12 @@ gsk_vulkan_texture_op_reserve_descriptor_sets (GskVulkanOp     *op,
   self->sampler_descriptor = gsk_vulkan_render_get_sampler_descriptor (render, self->sampler);
 }
 
-static GskVulkanPipeline *
+static VkPipeline
 gsk_vulkan_texture_op_get_pipeline (GskVulkanOp *op)
 {
   GskVulkanTextureOp *self = (GskVulkanTextureOp *) op;
 
-  return self->pipeline;
+  return gsk_vulkan_pipeline_get_pipeline (self->pipeline);
 }
 
 static void
index c3cbf0e72915914099bcdc6154e8f49c7b852901..962714c289154b90a12ca0ec8d288b888b8a44d9 100644 (file)
@@ -81,7 +81,7 @@ gsk_vulkan_upload_cairo_op_reserve_descriptor_sets (GskVulkanOp     *op,
 {
 }
 
-static GskVulkanPipeline *
+static VkPipeline
 gsk_vulkan_upload_cairo_op_get_pipeline (GskVulkanOp *op)
 {
   return NULL;
index 81e61e347dd700dee069695a1213a49ee05a92b0..52e159ad8736dba5ea00256d73a386a329a27c8c 100644 (file)
@@ -62,7 +62,7 @@ gsk_vulkan_upload_op_reserve_descriptor_sets (GskVulkanOp     *op,
 {
 }
 
-static GskVulkanPipeline *
+static VkPipeline
 gsk_vulkan_upload_op_get_pipeline (GskVulkanOp *op)
 {
   return NULL;