gsk/vulkan: Use default blend factors
authorGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Wed, 5 Apr 2023 14:49:26 +0000 (11:49 -0300)
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Sat, 8 Apr 2023 23:13:13 +0000 (20:13 -0300)
Vulkan renders text using VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA and
VK_BLEND_FACTOR_SRC_ALPHA, but that implies per-channel alpha
blending, which currently produces the wrong results when blending
glyphs with the images beneath them.

Use the default pipeline constructors, which implies using the
ONE and ONE_MINUS_SRC_ALPHA.

gsk/vulkan/gskvulkancolortextpipeline.c
gsk/vulkan/gskvulkantextpipeline.c

index 295cf53339fa3fe6500075726d720fd64053ffda..4a4aded9d7b318fd6a73cf76c6766c970181489f 100644 (file)
@@ -81,8 +81,7 @@ gsk_vulkan_color_text_pipeline_new (GdkVulkanContext        *context,
                                     const char              *shader_name,
                                     VkRenderPass             render_pass)
 {
-  return gsk_vulkan_pipeline_new_full (GSK_TYPE_VULKAN_COLOR_TEXT_PIPELINE, context, layout, shader_name, render_pass,
-                                       VK_BLEND_FACTOR_SRC_ALPHA, VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA);
+  return gsk_vulkan_pipeline_new (GSK_TYPE_VULKAN_COLOR_TEXT_PIPELINE, context, layout, shader_name, render_pass);
 }
 
 gsize
index 41e40f13954b1c850fd74709dfb88edb64501aac..e9551f458b9870a444253508df1aec5dc1c77473 100644 (file)
@@ -88,8 +88,7 @@ gsk_vulkan_text_pipeline_new (GdkVulkanContext        *context,
                               const char              *shader_name,
                               VkRenderPass             render_pass)
 {
-  return gsk_vulkan_pipeline_new_full (GSK_TYPE_VULKAN_TEXT_PIPELINE, context, layout, shader_name, render_pass,
-                                       VK_BLEND_FACTOR_SRC_ALPHA, VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA);
+  return gsk_vulkan_pipeline_new (GSK_TYPE_VULKAN_TEXT_PIPELINE, context, layout, shader_name, render_pass);
 }
 
 gsize