build: Make shaders depend on their includes

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.
This commit is contained in:
Benjamin Otte
2023-05-05 01:39:31 +02:00
parent b9bd7124c0
commit d51c92f54d

View 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,