[gtk+] Add rules to regenerate all shader variants



commit 86c0c243a0872e5935935718e8f531aedf1eb12d
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Sep 3 19:58:41 2017 -0400

    Add rules to regenerate all shader variants
    
    We were missing rules to build the clip variants of
    the shaders.

 gsk/resources/vulkan/meson.build |   28 ++++++++++++++++++++++++++--
 1 files changed, 26 insertions(+), 2 deletions(-)
---
diff --git a/gsk/resources/vulkan/meson.build b/gsk/resources/vulkan/meson.build
index d3b01fa..8595ccf 100644
--- a/gsk/resources/vulkan/meson.build
+++ b/gsk/resources/vulkan/meson.build
@@ -36,6 +36,8 @@ foreach shader: gsk_private_vulkan_shaders
 
   stage_arg = suffix == 'frag' ? '-fshader-stage=fragment' : '-fshader-stage=vertex'
   spv_shader = '@0@.@1@.spv'.format(basefn, suffix)
+  clip_spv_shader = '@0@-clip.@1@.spv'.format(basefn, suffix)
+  clip_rounded_spv_shader = '@0@-clip-rounded.@1@.spv'.format(basefn, suffix)
 
   if glslc.found()
     compiled_shader = custom_target(spv_shader,
@@ -49,8 +51,30 @@ foreach shader: gsk_private_vulkan_shaders
                                       '@INPUT@',
                                       '-o', '@OUTPUT@'
                                     ])
+    compiled_clip_shader = custom_target(clip_spv_shader,
+                                         input: shader,
+                                         output: clip_spv_shader,
+                                         build_by_default: true,
+                                         command: [
+                                           glslc,
+                                           stage_arg,
+                                           '-DCLIP_RECT',
+                                           '@INPUT@',
+                                           '-o', '@OUTPUT@'
+                                         ])
+    compiled_clip_rounded_shader = custom_target(clip_rounded_spv_shader,
+                                                 input: shader,
+                                                 output: clip_rounded_spv_shader,
+                                                 build_by_default: true,
+                                                 command: [
+                                                   glslc,
+                                                   stage_arg,
+                                                   '-DCLIP_ROUNDED_RECT',
+                                                   '@INPUT@',
+                                                   '-o', '@OUTPUT@'
+                                                 ])
   endif
   gsk_private_vulkan_compiled_shaders += files(spv_shader)
-  gsk_private_vulkan_compiled_shaders += '@0@-clip.@1@.spv'.format(basefn, suffix)
-  gsk_private_vulkan_compiled_shaders += '@0@-clip-rounded.@1@.spv'.format(basefn, suffix)
+  gsk_private_vulkan_compiled_shaders += files(clip_spv_shader)
+  gsk_private_vulkan_compiled_shaders += files(clip_rounded_spv_shader)
 endforeach


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