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 32bvh_spv = [] 33foreach s : bvh_shaders 34 command = [ 35 prog_glslang, '-V', '-I' + vk_bvh_include_dir, '-I' + anv_bvh_include_dir, '--target-env', 'spirv1.5', '-x', '-o', '@OUTPUT@', '@INPUT@' 36 ] 37 command += glslang_quiet 38 39 foreach define : s[2] 40 command += '-D' + define 41 endforeach 42 43 bvh_spv += custom_target( 44 s[1] + '.spv.h', 45 input : s[0], 46 output : s[1] + '.spv.h', 47 command : command, 48 depend_files: [vk_bvh_includes, anv_bvh_includes], 49 ) 50endforeach 51