1# Copyright © 2022 Konstantin Seurer 2# Copyright © 2024 Intel Corporation 3# SPDX-License-Identifier: MIT 4 5# source file, output name, defines 6bvh_shaders = [ 7 [ 8 'encode.comp', 9 'encode', 10 [], 11 ], 12 [ 13 'header.comp', 14 'header', 15 [], 16 ], 17 [ 18 'copy.comp', 19 'copy', 20 [] 21 ], 22] 23 24anv_bvh_include_dir = dir_source_root + '/src/intel/vulkan/bvh' 25 26anv_bvh_includes = files( 27 'anv_build_helpers.h', 28 'anv_build_interface.h', 29 'anv_bvh.h', 30) 31 32foreach s : bvh_shaders 33 command = [ 34 prog_glslang, '-V', '-I' + vk_bvh_include_dir, '-I' + anv_bvh_include_dir, '--target-env', 'spirv1.5', '-x', '-o', '@OUTPUT@', '@INPUT@' 35 ] 36 command += glslang_quiet 37 38 foreach define : s[2] 39 command += '-D' + define 40 endforeach 41 42 bvh_spv += custom_target( 43 s[1] + '.spv.h', 44 input : s[0], 45 output : s[1] + '.spv.h', 46 command : command, 47 depend_files: [vk_bvh_includes, anv_bvh_includes], 48 ) 49endforeach 50