[gtk+] vulkan: Add push constants to fragment shader



commit 6a60e335cd4e313b025d6294869e1c950700521b
Author: Benjamin Otte <otte redhat com>
Date:   Tue Jan 17 05:20:07 2017 +0100

    vulkan: Add push constants to fragment shader
    
    That way we don't need to move the clip rounded rect manually through
    the vertex shader into the fragment shader but can just look at the push
    constants.
    
    Simplifies shaders a lot.

 gsk/gskvulkanpushconstants.c                       |   56 ++++++++------------
 gsk/gskvulkanpushconstantsprivate.h                |   15 +-----
 gsk/gskvulkanrenderpass.c                          |    6 +-
 gsk/resources/vulkan/blend-clip-rounded.frag.glsl  |    6 +-
 gsk/resources/vulkan/blend-clip-rounded.frag.spv   |  Bin 5180 -> 5464 bytes
 gsk/resources/vulkan/blend-clip-rounded.vert.glsl  |    4 --
 gsk/resources/vulkan/blend-clip-rounded.vert.spv   |  Bin 4940 -> 4684 bytes
 gsk/resources/vulkan/border-clip-rounded.frag.glsl |    6 +--
 gsk/resources/vulkan/border-clip-rounded.frag.spv  |  Bin 9832 -> 10080 bytes
 gsk/resources/vulkan/border-clip-rounded.vert.glsl |    6 --
 gsk/resources/vulkan/border-clip-rounded.vert.spv  |  Bin 9312 -> 8952 bytes
 gsk/resources/vulkan/color-clip-rounded.frag.glsl  |    8 ++--
 gsk/resources/vulkan/color-clip-rounded.frag.spv   |  Bin 5228 -> 5552 bytes
 gsk/resources/vulkan/color-clip-rounded.vert.glsl  |    4 --
 gsk/resources/vulkan/color-clip-rounded.vert.spv   |  Bin 2176 -> 1888 bytes
 .../vulkan/color-matrix-clip-rounded.frag.glsl     |   10 ++--
 .../vulkan/color-matrix-clip-rounded.frag.spv      |  Bin 6588 -> 6872 bytes
 .../vulkan/color-matrix-clip-rounded.vert.glsl     |    8 +--
 .../vulkan/color-matrix-clip-rounded.vert.spv      |  Bin 5292 -> 5036 bytes
 gsk/resources/vulkan/linear-clip-rounded.frag.glsl |    8 ++--
 gsk/resources/vulkan/linear-clip-rounded.frag.spv  |  Bin 6748 -> 7032 bytes
 gsk/resources/vulkan/linear-clip-rounded.vert.glsl |    6 +--
 gsk/resources/vulkan/linear-clip-rounded.vert.spv  |  Bin 6208 -> 5952 bytes
 23 files changed, 47 insertions(+), 96 deletions(-)
---
diff --git a/gsk/gskvulkanpushconstants.c b/gsk/gskvulkanpushconstants.c
index 34574c2..769f3db 100644
--- a/gsk/gskvulkanpushconstants.c
+++ b/gsk/gskvulkanpushconstants.c
@@ -4,6 +4,16 @@
 
 #include "gskroundedrectprivate.h"
 
+typedef struct _GskVulkanPushConstantsWire GskVulkanPushConstantsWire;
+
+struct _GskVulkanPushConstantsWire
+{
+  struct {
+    float mvp[16];
+    float clip[12];
+  } common;
+};
+
 void
 gsk_vulkan_push_constants_init (GskVulkanPushConstants  *constants,
                                 const graphene_matrix_t *mvp,
@@ -62,14 +72,14 @@ static void
 gsk_vulkan_push_constants_wire_init (GskVulkanPushConstantsWire   *wire,
                                      const GskVulkanPushConstants *self)
 {
-  graphene_matrix_to_float (&self->mvp, wire->vertex.mvp);
-  gsk_rounded_rect_to_float (&self->clip.rect, wire->vertex.clip);
+  graphene_matrix_to_float (&self->mvp, wire->common.mvp);
+  gsk_rounded_rect_to_float (&self->clip.rect, wire->common.clip);
 }
 
 void
-gsk_vulkan_push_constants_push_vertex (const GskVulkanPushConstants *self,
-                                       VkCommandBuffer               command_buffer,
-                                       VkPipelineLayout              pipeline_layout)
+gsk_vulkan_push_constants_push (const GskVulkanPushConstants *self,
+                                VkCommandBuffer               command_buffer,
+                                VkPipelineLayout              pipeline_layout)
 {
   GskVulkanPushConstantsWire wire;
 
@@ -77,26 +87,11 @@ gsk_vulkan_push_constants_push_vertex (const GskVulkanPushConstants *self,
 
   vkCmdPushConstants (command_buffer,
                       pipeline_layout,
-                      VK_SHADER_STAGE_VERTEX_BIT,
-                      G_STRUCT_OFFSET (GskVulkanPushConstantsWire, vertex),
-                      sizeof (wire.vertex),
-                      &wire.vertex);
-}
-
-#if 0
-void
-gsk_vulkan_push_constants_push_fragment (GskVulkanPushConstants *self,
-                                         VkCommandBuffer         command_buffer,
-                                         VkPipelineLayout        pipeline_layout)
-{
-  vkCmdPushConstants (command_buffer,
-                      pipeline_layout,
-                      VK_SHADER_STAGE_FRAGMENT_BIT,
-                      G_STRUCT_OFFSET (GskVulkanPushConstants, fragment),
-                      sizeof (self->fragment),
-                      &self->fragment);
+                      VK_SHADER_STAGE_VERTEX_BIT | VK_SHADER_STAGE_FRAGMENT_BIT,
+                      G_STRUCT_OFFSET (GskVulkanPushConstantsWire, common),
+                      sizeof (wire.common),
+                      &wire.common);
 }
-#endif
 
 uint32_t
 gst_vulkan_push_constants_get_range_count (void)
@@ -109,16 +104,9 @@ gst_vulkan_push_constants_get_ranges (void)
 {
   static const VkPushConstantRange ranges[1] = {
       {
-          .stageFlags = VK_SHADER_STAGE_VERTEX_BIT,
-          .offset = G_STRUCT_OFFSET (GskVulkanPushConstantsWire, vertex),
-          .size = sizeof (((GskVulkanPushConstantsWire *) 0)->vertex)
-#if 0
-      },
-      {
-          .stageFlags = VK_SHADER_STAGE_FRAGMENT_BIT,
-          .offset = G_STRUCT_OFFSET (GskVulkanPushConstants, fragment),
-          .size = sizeof (((GskVulkanPushConstants *) 0)->fragment)
-#endif
+          .stageFlags = VK_SHADER_STAGE_VERTEX_BIT | VK_SHADER_STAGE_FRAGMENT_BIT,
+          .offset = G_STRUCT_OFFSET (GskVulkanPushConstantsWire, common),
+          .size = sizeof (((GskVulkanPushConstantsWire *) 0)->common)
       }
   };
 
diff --git a/gsk/gskvulkanpushconstantsprivate.h b/gsk/gskvulkanpushconstantsprivate.h
index 4642d52..f1652c9 100644
--- a/gsk/gskvulkanpushconstantsprivate.h
+++ b/gsk/gskvulkanpushconstantsprivate.h
@@ -8,7 +8,6 @@
 G_BEGIN_DECLS
 
 typedef struct _GskVulkanPushConstants GskVulkanPushConstants;
-typedef struct _GskVulkanPushConstantsWire GskVulkanPushConstantsWire;
 
 struct _GskVulkanPushConstants
 {
@@ -16,18 +15,6 @@ struct _GskVulkanPushConstants
   GskVulkanClip clip;
 };
 
-struct _GskVulkanPushConstantsWire
-{
-  struct {
-    float mvp[16];
-    float clip[12];
-  } vertex;
-#if 0
-  struct {
-  } fragment;
-#endif
-};
-
 const VkPushConstantRange *
                         gst_vulkan_push_constants_get_ranges            (void) G_GNUC_PURE;
 uint32_t                gst_vulkan_push_constants_get_range_count       (void) G_GNUC_PURE;
@@ -49,7 +36,7 @@ gboolean                gsk_vulkan_push_constants_intersect_rounded     (GskVulk
                                                                          const GskVulkanPushConstants   *src,
                                                                          const GskRoundedRect           
*rect);
 
-void                    gsk_vulkan_push_constants_push_vertex           (const GskVulkanPushConstants   
*self,
+void                    gsk_vulkan_push_constants_push                  (const GskVulkanPushConstants   
*self,
                                                                          VkCommandBuffer                 
command_buffer,
                                                                          VkPipelineLayout                
pipeline_layout);
 
diff --git a/gsk/gskvulkanrenderpass.c b/gsk/gskvulkanrenderpass.c
index c92375e..619a117 100644
--- a/gsk/gskvulkanrenderpass.c
+++ b/gsk/gskvulkanrenderpass.c
@@ -886,9 +886,9 @@ gsk_vulkan_render_pass_draw (GskVulkanRenderPass     *self,
           break;
 
         case GSK_VULKAN_OP_PUSH_VERTEX_CONSTANTS:
-          gsk_vulkan_push_constants_push_vertex (&op->constants.constants,
-                                                 command_buffer, 
-                                                 gsk_vulkan_pipeline_layout_get_pipeline_layout (layout));
+          gsk_vulkan_push_constants_push (&op->constants.constants,
+                                          command_buffer, 
+                                          gsk_vulkan_pipeline_layout_get_pipeline_layout (layout));
           break;
 
         default:
diff --git a/gsk/resources/vulkan/blend-clip-rounded.frag.glsl 
b/gsk/resources/vulkan/blend-clip-rounded.frag.glsl
index fb1c148..23ef1c8 100644
--- a/gsk/resources/vulkan/blend-clip-rounded.frag.glsl
+++ b/gsk/resources/vulkan/blend-clip-rounded.frag.glsl
@@ -1,5 +1,7 @@
 #version 420 core
 
+#include "constants.glsl"
+
 struct RoundedRect {
   vec4 bounds;
   vec4 corners;
@@ -7,8 +9,6 @@ struct RoundedRect {
 
 layout(location = 0) in vec2 inPos;
 layout(location = 1) in vec2 inTexCoord;
-layout(location = 2) in flat vec4 inClipBounds;
-layout(location = 3) in flat vec4 inClipWidths;
 
 layout(set = 0, binding = 0) uniform sampler2D inTexture;
 
@@ -51,7 +51,7 @@ float clip(vec2 pos, RoundedRect r) {
 
 void main()
 {
-  RoundedRect r = RoundedRect(vec4(inClipBounds.xy, inClipBounds.xy + inClipBounds.zw), inClipWidths);
+  RoundedRect r = RoundedRect(vec4(push.clip_bounds.xy, push.clip_bounds.xy + push.clip_bounds.zw), 
push.clip_widths);
 
   color = texture (inTexture, inTexCoord) * clip (inPos, r);
 }
diff --git a/gsk/resources/vulkan/blend-clip-rounded.frag.spv 
b/gsk/resources/vulkan/blend-clip-rounded.frag.spv
index aa407c2..adaa02b 100644
Binary files a/gsk/resources/vulkan/blend-clip-rounded.frag.spv and 
b/gsk/resources/vulkan/blend-clip-rounded.frag.spv differ
diff --git a/gsk/resources/vulkan/blend-clip-rounded.vert.glsl 
b/gsk/resources/vulkan/blend-clip-rounded.vert.glsl
index 221cbbe..0a5f31d 100644
--- a/gsk/resources/vulkan/blend-clip-rounded.vert.glsl
+++ b/gsk/resources/vulkan/blend-clip-rounded.vert.glsl
@@ -7,8 +7,6 @@ layout(location = 1) in vec4 inTexRect;
 
 layout(location = 0) out vec2 outPos;
 layout(location = 1) out vec2 outTexCoord;
-layout(location = 2) out flat vec4 outClipBounds;
-layout(location = 3) out flat vec4 outClipWidths;
 
 out gl_PerVertex {
   vec4 gl_Position;
@@ -37,8 +35,6 @@ void main() {
   gl_Position = push.mvp * vec4 (pos, 0.0, 1.0);
 
   outPos = pos;
-  outClipBounds = push.clip_bounds;
-  outClipWidths = push.clip_widths;
 
   vec4 texrect = vec4((rect.xy - inRect.xy) / inRect.zw,
                       rect.zw / inRect.zw);
diff --git a/gsk/resources/vulkan/blend-clip-rounded.vert.spv 
b/gsk/resources/vulkan/blend-clip-rounded.vert.spv
index 2a2d7ce..bc82237 100644
Binary files a/gsk/resources/vulkan/blend-clip-rounded.vert.spv and 
b/gsk/resources/vulkan/blend-clip-rounded.vert.spv differ
diff --git a/gsk/resources/vulkan/border-clip-rounded.frag.glsl 
b/gsk/resources/vulkan/border-clip-rounded.frag.glsl
index bf4ad65..d31718a 100644
--- a/gsk/resources/vulkan/border-clip-rounded.frag.glsl
+++ b/gsk/resources/vulkan/border-clip-rounded.frag.glsl
@@ -1,5 +1,6 @@
 #version 420 core
 
+#include "constants.glsl"
 #include "rounded-rect.glsl"
 
 layout(location = 0) in vec2 inPos;
@@ -8,16 +9,13 @@ layout(location = 2) in vec4 inRect;
 layout(location = 3) in vec4 inCornerWidths;
 layout(location = 4) in vec4 inCornerHeights;
 layout(location = 5) in vec4 inBorderWidths;
-layout(location = 6) in flat vec4 inClipBounds;
-layout(location = 7) in flat vec4 inClipWidths;
-layout(location = 8) in flat vec4 inClipHeights;
 
 layout(location = 0) out vec4 color;
 
 vec4
 clip (vec4 color)
 {
-  RoundedRect r = RoundedRect (vec4(inClipBounds.xy, inClipBounds.xy + inClipBounds.zw), inClipWidths, 
inClipHeights);
+  RoundedRect r = RoundedRect(vec4(push.clip_bounds.xy, push.clip_bounds.xy + push.clip_bounds.zw), 
push.clip_widths, push.clip_heights);
 
   return color * rounded_rect_coverage (r, inPos);
 }
diff --git a/gsk/resources/vulkan/border-clip-rounded.frag.spv 
b/gsk/resources/vulkan/border-clip-rounded.frag.spv
index 401d7ae..3be5443 100644
Binary files a/gsk/resources/vulkan/border-clip-rounded.frag.spv and 
b/gsk/resources/vulkan/border-clip-rounded.frag.spv differ
diff --git a/gsk/resources/vulkan/border-clip-rounded.vert.glsl 
b/gsk/resources/vulkan/border-clip-rounded.vert.glsl
index a66d7f7..8db91a5 100644
--- a/gsk/resources/vulkan/border-clip-rounded.vert.glsl
+++ b/gsk/resources/vulkan/border-clip-rounded.vert.glsl
@@ -14,9 +14,6 @@ layout(location = 2) out flat vec4 outRect;
 layout(location = 3) out flat vec4 outCornerWidths;
 layout(location = 4) out flat vec4 outCornerHeights;
 layout(location = 5) out flat vec4 outBorderWidths;
-layout(location = 6) out flat vec4 outClipBounds;
-layout(location = 7) out flat vec4 outClipWidths;
-layout(location = 8) out flat vec4 outClipHeights;
 
 out gl_PerVertex {
   vec4 gl_Position;
@@ -112,7 +109,4 @@ void main() {
   outCornerWidths = inCornerWidths;
   outCornerHeights = inCornerHeights;
   outBorderWidths = inBorderWidths;
-  outClipBounds = push.clip_bounds;
-  outClipWidths = push.clip_widths;
-  outClipHeights = push.clip_heights;
 }
diff --git a/gsk/resources/vulkan/border-clip-rounded.vert.spv 
b/gsk/resources/vulkan/border-clip-rounded.vert.spv
index 5271686..ce5e85e 100644
Binary files a/gsk/resources/vulkan/border-clip-rounded.vert.spv and 
b/gsk/resources/vulkan/border-clip-rounded.vert.spv differ
diff --git a/gsk/resources/vulkan/color-clip-rounded.frag.glsl 
b/gsk/resources/vulkan/color-clip-rounded.frag.glsl
index 515a998..c1fa503 100644
--- a/gsk/resources/vulkan/color-clip-rounded.frag.glsl
+++ b/gsk/resources/vulkan/color-clip-rounded.frag.glsl
@@ -1,9 +1,9 @@
 #version 420 core
 
+#include "constants.glsl"
+
 layout(location = 0) in vec2 inPos;
 layout(location = 1) in vec4 inColor;
-layout(location = 2) in vec4 inClipBounds;
-layout(location = 3) in vec4 inClipWidths;
 
 layout(location = 0) out vec4 color;
 
@@ -50,7 +50,7 @@ float clip(vec2 pos, RoundedRect r) {
 
 void main()
 {
-    RoundedRect r = RoundedRect(vec4(inClipBounds.xy, inClipBounds.xy + inClipBounds.zw), inClipWidths);
+  RoundedRect r = RoundedRect(vec4(push.clip_bounds.xy, push.clip_bounds.xy + push.clip_bounds.zw), 
push.clip_widths);
 
-    color = vec4(inColor.rgb * inColor.a, inColor.a) * clip (inPos, r);
+  color = vec4(inColor.rgb * inColor.a, inColor.a) * clip (inPos, r);
 }
diff --git a/gsk/resources/vulkan/color-clip-rounded.frag.spv 
b/gsk/resources/vulkan/color-clip-rounded.frag.spv
index cf650af..ce92576 100644
Binary files a/gsk/resources/vulkan/color-clip-rounded.frag.spv and 
b/gsk/resources/vulkan/color-clip-rounded.frag.spv differ
diff --git a/gsk/resources/vulkan/color-clip-rounded.vert.glsl 
b/gsk/resources/vulkan/color-clip-rounded.vert.glsl
index 2303d90..985a174 100644
--- a/gsk/resources/vulkan/color-clip-rounded.vert.glsl
+++ b/gsk/resources/vulkan/color-clip-rounded.vert.glsl
@@ -7,8 +7,6 @@ layout(location = 1) in vec4 inColor;
 
 layout(location = 0) out vec2 outPos;
 layout(location = 1) out flat vec4 outColor;
-layout(location = 2) out flat vec4 outClipBounds;
-layout(location = 3) out flat vec4 outClipWidths;
 
 out gl_PerVertex {
   vec4 gl_Position;
@@ -26,6 +24,4 @@ void main() {
   gl_Position = push.mvp * vec4 (pos, 0.0, 1.0);
   outPos = pos;
   outColor = inColor;
-  outClipBounds = push.clip_bounds;
-  outClipWidths = push.clip_widths;
 }
diff --git a/gsk/resources/vulkan/color-clip-rounded.vert.spv 
b/gsk/resources/vulkan/color-clip-rounded.vert.spv
index b283554..941189c 100644
Binary files a/gsk/resources/vulkan/color-clip-rounded.vert.spv and 
b/gsk/resources/vulkan/color-clip-rounded.vert.spv differ
diff --git a/gsk/resources/vulkan/color-matrix-clip-rounded.frag.glsl 
b/gsk/resources/vulkan/color-matrix-clip-rounded.frag.glsl
index c0e42ca..6015aee 100644
--- a/gsk/resources/vulkan/color-matrix-clip-rounded.frag.glsl
+++ b/gsk/resources/vulkan/color-matrix-clip-rounded.frag.glsl
@@ -1,5 +1,7 @@
 #version 420 core
 
+#include "constants.glsl"
+
 struct RoundedRect {
   vec4 bounds;
   vec4 corners;
@@ -7,10 +9,8 @@ struct RoundedRect {
 
 layout(location = 0) in vec2 inPos;
 layout(location = 1) in vec2 inTexCoord;
-layout(location = 2) in flat vec4 inClipBounds;
-layout(location = 3) in flat vec4 inClipWidths;
-layout(location = 4) in flat mat4 inColorMatrix;
-layout(location = 8) in flat vec4 inColorOffset;
+layout(location = 2) in flat mat4 inColorMatrix;
+layout(location = 6) in flat vec4 inColorOffset;
 
 layout(set = 0, binding = 0) uniform sampler2D inTexture;
 
@@ -70,7 +70,7 @@ color_matrix (vec4 color, mat4 color_matrix, vec4 color_offset)
 
 void main()
 {
-  RoundedRect r = RoundedRect(vec4(inClipBounds.xy, inClipBounds.xy + inClipBounds.zw), inClipWidths);
+  RoundedRect r = RoundedRect(vec4(push.clip_bounds.xy, push.clip_bounds.xy + push.clip_bounds.zw), 
push.clip_widths);
 
   color = color_matrix (texture (inTexture, inTexCoord), inColorMatrix, inColorOffset) * clip (inPos, r);
 }
diff --git a/gsk/resources/vulkan/color-matrix-clip-rounded.frag.spv 
b/gsk/resources/vulkan/color-matrix-clip-rounded.frag.spv
index f4c753a..f0a36e0 100644
Binary files a/gsk/resources/vulkan/color-matrix-clip-rounded.frag.spv and 
b/gsk/resources/vulkan/color-matrix-clip-rounded.frag.spv differ
diff --git a/gsk/resources/vulkan/color-matrix-clip-rounded.vert.glsl 
b/gsk/resources/vulkan/color-matrix-clip-rounded.vert.glsl
index 5d3e340..1c7f0a4 100644
--- a/gsk/resources/vulkan/color-matrix-clip-rounded.vert.glsl
+++ b/gsk/resources/vulkan/color-matrix-clip-rounded.vert.glsl
@@ -9,10 +9,8 @@ layout(location = 6) in vec4 inColorOffset;
 
 layout(location = 0) out vec2 outPos;
 layout(location = 1) out vec2 outTexCoord;
-layout(location = 2) out flat vec4 outClipBounds;
-layout(location = 3) out flat vec4 outClipWidths;
-layout(location = 4) out flat mat4 outColorMatrix;
-layout(location = 8) out flat vec4 outColorOffset;
+layout(location = 2) out flat mat4 outColorMatrix;
+layout(location = 6) out flat vec4 outColorOffset;
 
 out gl_PerVertex {
   vec4 gl_Position;
@@ -41,8 +39,6 @@ void main() {
   gl_Position = push.mvp * vec4 (pos, 0.0, 1.0);
 
   outPos = pos;
-  outClipBounds = push.clip_bounds;
-  outClipWidths = push.clip_widths;
 
   vec4 texrect = vec4((rect.xy - inRect.xy) / inRect.zw,
                       rect.zw / inRect.zw);
diff --git a/gsk/resources/vulkan/color-matrix-clip-rounded.vert.spv 
b/gsk/resources/vulkan/color-matrix-clip-rounded.vert.spv
index d4db483..14b85f5 100644
Binary files a/gsk/resources/vulkan/color-matrix-clip-rounded.vert.spv and 
b/gsk/resources/vulkan/color-matrix-clip-rounded.vert.spv differ
diff --git a/gsk/resources/vulkan/linear-clip-rounded.frag.glsl 
b/gsk/resources/vulkan/linear-clip-rounded.frag.glsl
index 3c5fade..4535a44 100644
--- a/gsk/resources/vulkan/linear-clip-rounded.frag.glsl
+++ b/gsk/resources/vulkan/linear-clip-rounded.frag.glsl
@@ -1,5 +1,7 @@
 #version 420 core
 
+#include "constants.glsl"
+
 struct ColorStop {
   float offset;
   vec4 color;
@@ -14,9 +16,7 @@ layout(location = 0) in vec2 inPos;
 layout(location = 1) in float inGradientPos;
 layout(location = 2) in flat int inRepeating;
 layout(location = 3) in flat int inStopCount;
-layout(location = 4) in flat vec4 inClipBounds;
-layout(location = 5) in flat vec4 inClipWidths;
-layout(location = 6) in flat ColorStop inStops[8];
+layout(location = 4) in flat ColorStop inStops[8];
 
 layout(location = 0) out vec4 outColor;
 
@@ -57,7 +57,7 @@ float clip(vec2 pos, RoundedRect r) {
 
 void main()
 {
-  RoundedRect r = RoundedRect(vec4(inClipBounds.xy, inClipBounds.xy + inClipBounds.zw), inClipWidths);
+  RoundedRect r = RoundedRect(vec4(push.clip_bounds.xy, push.clip_bounds.xy + push.clip_bounds.zw), 
push.clip_widths);
 
   float pos;
   if (inRepeating != 0)
diff --git a/gsk/resources/vulkan/linear-clip-rounded.frag.spv 
b/gsk/resources/vulkan/linear-clip-rounded.frag.spv
index ce8a52a..4a018c0 100644
Binary files a/gsk/resources/vulkan/linear-clip-rounded.frag.spv and 
b/gsk/resources/vulkan/linear-clip-rounded.frag.spv differ
diff --git a/gsk/resources/vulkan/linear-clip-rounded.vert.glsl 
b/gsk/resources/vulkan/linear-clip-rounded.vert.glsl
index c06021d..fd50e26 100644
--- a/gsk/resources/vulkan/linear-clip-rounded.vert.glsl
+++ b/gsk/resources/vulkan/linear-clip-rounded.vert.glsl
@@ -27,9 +27,7 @@ layout(location = 0) out vec2 outPos;
 layout(location = 1) out float outGradientPos;
 layout(location = 2) out flat int outRepeating;
 layout(location = 3) out flat int outStopCount;
-layout(location = 4) out flat vec4 outClipBounds;
-layout(location = 5) out flat vec4 outClipWidths;
-layout(location = 6) out flat ColorStop outStops[8];
+layout(location = 4) out flat ColorStop outStops[8];
 
 out gl_PerVertex {
   vec4 gl_Position;
@@ -56,8 +54,6 @@ void main() {
   gl_Position = push.mvp * vec4 (pos, 0.0, 1.0);
   outPos = pos;
   outGradientPos = get_gradient_pos (pos);
-  outClipBounds = push.clip_bounds;
-  outClipWidths = push.clip_widths;
   outRepeating = inRepeating;
   outStopCount = inStopCount;
   outStops[0].offset = inOffsets0[0];
diff --git a/gsk/resources/vulkan/linear-clip-rounded.vert.spv 
b/gsk/resources/vulkan/linear-clip-rounded.vert.spv
index 800e090..421516f 100644
Binary files a/gsk/resources/vulkan/linear-clip-rounded.vert.spv and 
b/gsk/resources/vulkan/linear-clip-rounded.vert.spv differ


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]