vulkan: Rename crossfade => cross-fade
authorBenjamin Otte <otte@redhat.com>
Tue, 27 Jun 2023 04:28:52 +0000 (06:28 +0200)
committerBenjamin Otte <otte@redhat.com>
Tue, 27 Jun 2023 04:46:57 +0000 (06:46 +0200)
Preparation for the future.

20 files changed:
gsk/vulkan/gskvulkanrender.c
gsk/vulkan/resources/cross-fade-clip-rounded.frag.spv [new file with mode: 0644]
gsk/vulkan/resources/cross-fade-clip-rounded.vert.spv [new file with mode: 0644]
gsk/vulkan/resources/cross-fade-clip.frag.spv [new file with mode: 0644]
gsk/vulkan/resources/cross-fade-clip.vert.spv [new file with mode: 0644]
gsk/vulkan/resources/cross-fade-rect.vert.spv [new file with mode: 0644]
gsk/vulkan/resources/cross-fade.frag [new file with mode: 0644]
gsk/vulkan/resources/cross-fade.frag.spv [new file with mode: 0644]
gsk/vulkan/resources/cross-fade.vert [new file with mode: 0644]
gsk/vulkan/resources/cross-fade.vert.spv [new file with mode: 0644]
gsk/vulkan/resources/crossfade-clip-rounded.frag.spv [deleted file]
gsk/vulkan/resources/crossfade-clip-rounded.vert.spv [deleted file]
gsk/vulkan/resources/crossfade-clip.frag.spv [deleted file]
gsk/vulkan/resources/crossfade-clip.vert.spv [deleted file]
gsk/vulkan/resources/crossfade-rect.vert.spv [deleted file]
gsk/vulkan/resources/crossfade.frag [deleted file]
gsk/vulkan/resources/crossfade.frag.spv [deleted file]
gsk/vulkan/resources/crossfade.vert [deleted file]
gsk/vulkan/resources/crossfade.vert.spv [deleted file]
gsk/vulkan/resources/meson.build

index 16b08f32b7cb4c8ce0ecf645982dfd8a6ac34542..580d621d7435b0420fb835d9f8eff35ecf1fc5cc 100644 (file)
@@ -418,9 +418,9 @@ gsk_vulkan_render_get_pipeline (GskVulkanRender       *self,
     { "texture",                    1, gsk_vulkan_color_text_pipeline_new },
     { "texture-clip",               1, gsk_vulkan_color_text_pipeline_new },
     { "texture-clip-rounded",       1, gsk_vulkan_color_text_pipeline_new },
-    { "crossfade",                  2, gsk_vulkan_cross_fade_pipeline_new },
-    { "crossfade-clip",             2, gsk_vulkan_cross_fade_pipeline_new },
-    { "crossfade-clip-rounded",     2, gsk_vulkan_cross_fade_pipeline_new },
+    { "cross-fade",                 2, gsk_vulkan_cross_fade_pipeline_new },
+    { "cross-fade-clip",            2, gsk_vulkan_cross_fade_pipeline_new },
+    { "cross-fade-clip-rounded",    2, gsk_vulkan_cross_fade_pipeline_new },
     { "blend-mode",                 2, gsk_vulkan_blend_mode_pipeline_new },
     { "blend-mode-clip",            2, gsk_vulkan_blend_mode_pipeline_new },
     { "blend-mode-clip-rounded",    2, gsk_vulkan_blend_mode_pipeline_new },
diff --git a/gsk/vulkan/resources/cross-fade-clip-rounded.frag.spv b/gsk/vulkan/resources/cross-fade-clip-rounded.frag.spv
new file mode 100644 (file)
index 0000000..2452726
Binary files /dev/null and b/gsk/vulkan/resources/cross-fade-clip-rounded.frag.spv differ
diff --git a/gsk/vulkan/resources/cross-fade-clip-rounded.vert.spv b/gsk/vulkan/resources/cross-fade-clip-rounded.vert.spv
new file mode 100644 (file)
index 0000000..4db5a05
Binary files /dev/null and b/gsk/vulkan/resources/cross-fade-clip-rounded.vert.spv differ
diff --git a/gsk/vulkan/resources/cross-fade-clip.frag.spv b/gsk/vulkan/resources/cross-fade-clip.frag.spv
new file mode 100644 (file)
index 0000000..b969b21
Binary files /dev/null and b/gsk/vulkan/resources/cross-fade-clip.frag.spv differ
diff --git a/gsk/vulkan/resources/cross-fade-clip.vert.spv b/gsk/vulkan/resources/cross-fade-clip.vert.spv
new file mode 100644 (file)
index 0000000..4db5a05
Binary files /dev/null and b/gsk/vulkan/resources/cross-fade-clip.vert.spv differ
diff --git a/gsk/vulkan/resources/cross-fade-rect.vert.spv b/gsk/vulkan/resources/cross-fade-rect.vert.spv
new file mode 100644 (file)
index 0000000..9ed91e1
Binary files /dev/null and b/gsk/vulkan/resources/cross-fade-rect.vert.spv differ
diff --git a/gsk/vulkan/resources/cross-fade.frag b/gsk/vulkan/resources/cross-fade.frag
new file mode 100644 (file)
index 0000000..9cb3939
--- /dev/null
@@ -0,0 +1,26 @@
+#version 450
+
+#include "common.frag.glsl"
+#include "clip.frag.glsl"
+#include "rect.frag.glsl"
+
+layout(location = 0) in vec2 inPos;
+layout(location = 1) in Rect inStartRect;
+layout(location = 2) in Rect inEndRect;
+layout(location = 3) in vec2 inStartTexCoord;
+layout(location = 4) in vec2 inEndTexCoord;
+layout(location = 5) flat in uvec2 inStartTexId;
+layout(location = 6) flat in uvec2 inEndTexId;
+layout(location = 7) in float inProgress;
+
+layout(location = 0) out vec4 color;
+
+void main()
+{
+  float start_alpha = rect_coverage (inStartRect, inPos);
+  vec4 start = texture (get_sampler (inStartTexId), inStartTexCoord) * start_alpha;
+  float end_alpha = rect_coverage (inEndRect, inPos);
+  vec4 end = texture (get_sampler (inEndTexId), inEndTexCoord) * end_alpha;
+
+  color = clip_scaled (inPos, mix (start, end, inProgress));
+}
diff --git a/gsk/vulkan/resources/cross-fade.frag.spv b/gsk/vulkan/resources/cross-fade.frag.spv
new file mode 100644 (file)
index 0000000..b969b21
Binary files /dev/null and b/gsk/vulkan/resources/cross-fade.frag.spv differ
diff --git a/gsk/vulkan/resources/cross-fade.vert b/gsk/vulkan/resources/cross-fade.vert
new file mode 100644 (file)
index 0000000..ffa9921
--- /dev/null
@@ -0,0 +1,36 @@
+#version 450
+
+#include "common.vert.glsl"
+#include "rect.vert.glsl"
+
+layout(location = 0) in vec4 inRect;
+layout(location = 1) in vec4 inStartRect;
+layout(location = 2) in vec4 inEndRect;
+layout(location = 3) in vec4 inStartTexRect;
+layout(location = 4) in vec4 inEndTexRect;
+layout(location = 5) in uvec2 inStartTexId;
+layout(location = 6) in uvec2 inEndTexId;
+layout(location = 7) in float inProgress;
+
+layout(location = 0) out vec2 outPos;
+layout(location = 1) flat out Rect outStartRect;
+layout(location = 2) flat out Rect outEndRect;
+layout(location = 3) out vec2 outStartTexCoord;
+layout(location = 4) out vec2 outEndTexCoord;
+layout(location = 5) flat out uvec2 outStartTexId;
+layout(location = 6) flat out uvec2 outEndTexId;
+layout(location = 7) flat out float outProgress;
+
+void main() {
+  Rect r = rect_from_gsk (inRect);
+  vec2 pos = set_position_from_rect (r);
+
+  outPos = pos;
+  outStartRect = rect_from_gsk (inStartRect);
+  outEndRect = rect_from_gsk (inEndRect);
+  outStartTexCoord = scale_tex_coord (pos, r, inStartTexRect);
+  outEndTexCoord = scale_tex_coord (pos, r, inEndTexRect);
+  outStartTexId = inStartTexId;
+  outEndTexId = inEndTexId;
+  outProgress = inProgress;
+}
diff --git a/gsk/vulkan/resources/cross-fade.vert.spv b/gsk/vulkan/resources/cross-fade.vert.spv
new file mode 100644 (file)
index 0000000..c8cf569
Binary files /dev/null and b/gsk/vulkan/resources/cross-fade.vert.spv differ
diff --git a/gsk/vulkan/resources/crossfade-clip-rounded.frag.spv b/gsk/vulkan/resources/crossfade-clip-rounded.frag.spv
deleted file mode 100644 (file)
index 2452726..0000000
Binary files a/gsk/vulkan/resources/crossfade-clip-rounded.frag.spv and /dev/null differ
diff --git a/gsk/vulkan/resources/crossfade-clip-rounded.vert.spv b/gsk/vulkan/resources/crossfade-clip-rounded.vert.spv
deleted file mode 100644 (file)
index 4db5a05..0000000
Binary files a/gsk/vulkan/resources/crossfade-clip-rounded.vert.spv and /dev/null differ
diff --git a/gsk/vulkan/resources/crossfade-clip.frag.spv b/gsk/vulkan/resources/crossfade-clip.frag.spv
deleted file mode 100644 (file)
index b969b21..0000000
Binary files a/gsk/vulkan/resources/crossfade-clip.frag.spv and /dev/null differ
diff --git a/gsk/vulkan/resources/crossfade-clip.vert.spv b/gsk/vulkan/resources/crossfade-clip.vert.spv
deleted file mode 100644 (file)
index 4db5a05..0000000
Binary files a/gsk/vulkan/resources/crossfade-clip.vert.spv and /dev/null differ
diff --git a/gsk/vulkan/resources/crossfade-rect.vert.spv b/gsk/vulkan/resources/crossfade-rect.vert.spv
deleted file mode 100644 (file)
index 9ed91e1..0000000
Binary files a/gsk/vulkan/resources/crossfade-rect.vert.spv and /dev/null differ
diff --git a/gsk/vulkan/resources/crossfade.frag b/gsk/vulkan/resources/crossfade.frag
deleted file mode 100644 (file)
index 9cb3939..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#version 450
-
-#include "common.frag.glsl"
-#include "clip.frag.glsl"
-#include "rect.frag.glsl"
-
-layout(location = 0) in vec2 inPos;
-layout(location = 1) in Rect inStartRect;
-layout(location = 2) in Rect inEndRect;
-layout(location = 3) in vec2 inStartTexCoord;
-layout(location = 4) in vec2 inEndTexCoord;
-layout(location = 5) flat in uvec2 inStartTexId;
-layout(location = 6) flat in uvec2 inEndTexId;
-layout(location = 7) in float inProgress;
-
-layout(location = 0) out vec4 color;
-
-void main()
-{
-  float start_alpha = rect_coverage (inStartRect, inPos);
-  vec4 start = texture (get_sampler (inStartTexId), inStartTexCoord) * start_alpha;
-  float end_alpha = rect_coverage (inEndRect, inPos);
-  vec4 end = texture (get_sampler (inEndTexId), inEndTexCoord) * end_alpha;
-
-  color = clip_scaled (inPos, mix (start, end, inProgress));
-}
diff --git a/gsk/vulkan/resources/crossfade.frag.spv b/gsk/vulkan/resources/crossfade.frag.spv
deleted file mode 100644 (file)
index b969b21..0000000
Binary files a/gsk/vulkan/resources/crossfade.frag.spv and /dev/null differ
diff --git a/gsk/vulkan/resources/crossfade.vert b/gsk/vulkan/resources/crossfade.vert
deleted file mode 100644 (file)
index ffa9921..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-#version 450
-
-#include "common.vert.glsl"
-#include "rect.vert.glsl"
-
-layout(location = 0) in vec4 inRect;
-layout(location = 1) in vec4 inStartRect;
-layout(location = 2) in vec4 inEndRect;
-layout(location = 3) in vec4 inStartTexRect;
-layout(location = 4) in vec4 inEndTexRect;
-layout(location = 5) in uvec2 inStartTexId;
-layout(location = 6) in uvec2 inEndTexId;
-layout(location = 7) in float inProgress;
-
-layout(location = 0) out vec2 outPos;
-layout(location = 1) flat out Rect outStartRect;
-layout(location = 2) flat out Rect outEndRect;
-layout(location = 3) out vec2 outStartTexCoord;
-layout(location = 4) out vec2 outEndTexCoord;
-layout(location = 5) flat out uvec2 outStartTexId;
-layout(location = 6) flat out uvec2 outEndTexId;
-layout(location = 7) flat out float outProgress;
-
-void main() {
-  Rect r = rect_from_gsk (inRect);
-  vec2 pos = set_position_from_rect (r);
-
-  outPos = pos;
-  outStartRect = rect_from_gsk (inStartRect);
-  outEndRect = rect_from_gsk (inEndRect);
-  outStartTexCoord = scale_tex_coord (pos, r, inStartTexRect);
-  outEndTexCoord = scale_tex_coord (pos, r, inEndTexRect);
-  outStartTexId = inStartTexId;
-  outEndTexId = inEndTexId;
-  outProgress = inProgress;
-}
diff --git a/gsk/vulkan/resources/crossfade.vert.spv b/gsk/vulkan/resources/crossfade.vert.spv
deleted file mode 100644 (file)
index c8cf569..0000000
Binary files a/gsk/vulkan/resources/crossfade.vert.spv and /dev/null differ
index 35cfec7610c38f74ce4f227b8d26b543f50b4d68..019d9d4da8552d8b895444745181f897536c8f37 100644 (file)
@@ -17,7 +17,7 @@ gsk_private_vulkan_fragment_shaders = [
   'border.frag',
   'color.frag',
   'color-matrix.frag',
-  'crossfade.frag',
+  'cross-fade.frag',
   'inset-shadow.frag',
   'linear.frag',
   'mask.frag',
@@ -31,7 +31,7 @@ gsk_private_vulkan_vertex_shaders = [
   'border.vert',
   'color.vert',
   'color-matrix.vert',
-  'crossfade.vert',
+  'cross-fade.vert',
   'inset-shadow.vert',
   'linear.vert',
   'mask.vert',