From: Benjamin Otte Date: Tue, 27 Jun 2023 04:28:52 +0000 (+0200) Subject: vulkan: Rename crossfade => cross-fade X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~1^2~92^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=2e58274f2333b57a02a473acfdfbe8c561cebb76;p=gtk4.git vulkan: Rename crossfade => cross-fade Preparation for the future. --- diff --git a/gsk/vulkan/gskvulkanrender.c b/gsk/vulkan/gskvulkanrender.c index 16b08f32b7..580d621d74 100644 --- a/gsk/vulkan/gskvulkanrender.c +++ b/gsk/vulkan/gskvulkanrender.c @@ -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 index 0000000000..2452726c44 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 index 0000000000..4db5a05bfe 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 index 0000000000..b969b21dd8 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 index 0000000000..4db5a05bfe 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 index 0000000000..9ed91e1326 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 index 0000000000..9cb3939a31 --- /dev/null +++ b/gsk/vulkan/resources/cross-fade.frag @@ -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 index 0000000000..b969b21dd8 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 index 0000000000..ffa9921760 --- /dev/null +++ b/gsk/vulkan/resources/cross-fade.vert @@ -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 index 0000000000..c8cf569098 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 index 2452726c44..0000000000 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 index 4db5a05bfe..0000000000 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 index b969b21dd8..0000000000 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 index 4db5a05bfe..0000000000 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 index 9ed91e1326..0000000000 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 index 9cb3939a31..0000000000 --- a/gsk/vulkan/resources/crossfade.frag +++ /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 index b969b21dd8..0000000000 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 index ffa9921760..0000000000 --- a/gsk/vulkan/resources/crossfade.vert +++ /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 index c8cf569098..0000000000 Binary files a/gsk/vulkan/resources/crossfade.vert.spv and /dev/null differ diff --git a/gsk/vulkan/resources/meson.build b/gsk/vulkan/resources/meson.build index 35cfec7610..019d9d4da8 100644 --- a/gsk/vulkan/resources/meson.build +++ b/gsk/vulkan/resources/meson.build @@ -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',