build: Make shaders depend on their includes
authorBenjamin Otte <otte@redhat.com>
Thu, 4 May 2023 23:39:31 +0000 (01:39 +0200)
committerBenjamin Otte <otte@redhat.com>
Tue, 16 May 2023 16:53:27 +0000 (18:53 +0200)
This does not do any proper dependency tracking, it just makes every
shader depend on every include shader.

But that's good enough for now.

gsk/vulkan/resources/meson.build

index 3486a8868b45d785f06277dfef255a4a24bd00a9..86e98acb9e27398045c0b6ebd1a727b57ea349ec 100644 (file)
@@ -1,10 +1,9 @@
-# FIXME: what's up with these?
-#gsk_private_vulkan_include_shaders = [
-#  'clip.frag.glsl',
-#  'clip.vert.glsl',
-#  'constants.glsl',
-#  'rounded-rect.glsl',
-#]
+gsk_private_vulkan_include_shaders = [
+  'clip.frag.glsl',
+  'clip.vert.glsl',
+  'constants.glsl',
+  'rounded-rect.glsl',
+]
 
 gsk_private_vulkan_fragment_shaders = [
   'blendmode.frag',
@@ -51,6 +50,7 @@ foreach shader: gsk_private_vulkan_shaders
     compiled_shader = custom_target(spv_shader,
                                     input: shader,
                                     output: spv_shader,
+                                    depend_files: gsk_private_vulkan_include_shaders,
                                     command: [
                                       glslc,
                                       stage_arg,
@@ -61,6 +61,7 @@ foreach shader: gsk_private_vulkan_shaders
     compiled_clip_shader = custom_target(clip_spv_shader,
                                          input: shader,
                                          output: clip_spv_shader,
+                                         depend_files: gsk_private_vulkan_include_shaders,
                                          command: [
                                            glslc,
                                            stage_arg,
@@ -71,6 +72,7 @@ foreach shader: gsk_private_vulkan_shaders
     compiled_clip_rounded_shader = custom_target(clip_rounded_spv_shader,
                                                  input: shader,
                                                  output: clip_rounded_spv_shader,
+                                                 depend_files: gsk_private_vulkan_include_shaders,
                                                  command: [
                                                    glslc,
                                                    stage_arg,