gsk_private_vulkan_shaders += gsk_private_vulkan_fragment_shaders
gsk_private_vulkan_shaders += gsk_private_vulkan_vertex_shaders
-glslc = find_program('glslc', required: false)
+glslc = find_program('glslc', required: true)
foreach shader: gsk_private_vulkan_shaders
basefn = shader.split('.').get(0)
suffix = shader.split('.').get(1)
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,
- input: shader,
- output: spv_shader,
- depend_files: gsk_private_vulkan_include_shaders,
- command: [
- glslc,
- stage_arg,
- '-DCLIP_NONE',
- '@INPUT@',
- '-o', '@OUTPUT@'
- ])
- 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,
- '-DCLIP_RECT',
- '@INPUT@',
- '-o', '@OUTPUT@'
- ])
- 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,
- '-DCLIP_ROUNDED_RECT',
- '@INPUT@',
- '-o', '@OUTPUT@'
- ])
- gsk_private_vulkan_compiled_shaders_deps += [compiled_shader, compiled_clip_shader, compiled_clip_rounded_shader]
- gsk_private_vulkan_compiled_shaders += [spv_shader, clip_spv_shader, clip_rounded_spv_shader]
- else
- gsk_private_vulkan_compiled_shaders += files(spv_shader, clip_spv_shader, clip_rounded_spv_shader)
- endif
+ compiled_shader = custom_target(spv_shader,
+ input: shader,
+ output: spv_shader,
+ depend_files: gsk_private_vulkan_include_shaders,
+ command: [
+ glslc,
+ stage_arg,
+ '-DCLIP_NONE',
+ '@INPUT@',
+ '-o', '@OUTPUT@'
+ ])
+ 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,
+ '-DCLIP_RECT',
+ '@INPUT@',
+ '-o', '@OUTPUT@'
+ ])
+ 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,
+ '-DCLIP_ROUNDED_RECT',
+ '@INPUT@',
+ '-o', '@OUTPUT@'
+ ])
+ gsk_private_vulkan_compiled_shaders_deps += [compiled_shader, compiled_clip_shader, compiled_clip_rounded_shader]
+ gsk_private_vulkan_compiled_shaders += [spv_shader, clip_spv_shader, clip_rounded_spv_shader]
endforeach
foreach shader: gsk_private_vulkan_vertex_shaders