| 1 |
# Copyright 2024 Valve Corporation |
| 2 |
# SPDX-License-Identifier: MIT |
| 3 |
|
| 4 |
libagx_shader_files = files( |
| 5 |
'compression.cl', |
| 6 |
'copy.cl', |
| 7 |
'draws.cl', |
| 8 |
'geometry.cl', |
| 9 |
'query.cl', |
| 10 |
'tessellation.cl', |
| 11 |
'tessellator.cl', |
| 12 |
'texture.cl', |
| 13 |
'helper.cl', |
| 14 |
) |
| 15 |
|
| 16 |
libagx_spv = custom_target( |
| 17 |
input : libagx_shader_files, |
| 18 |
output : 'libagx.spv', |
| 19 |
command : [ |
| 20 |
prog_mesa_clc, '-o', '@OUTPUT@', '--depfile', '@DEPFILE@', |
| 21 |
libagx_shader_files, '--', |
| 22 |
'-I' + join_paths(meson.project_source_root(), 'include'), |
| 23 |
'-I' + join_paths(meson.project_source_root(), 'src/compiler/libcl'), |
| 24 |
'-I' + join_paths(meson.project_source_root(), 'src/poly/cl'), |
| 25 |
'-I' + join_paths(meson.current_source_dir(), '.'), |
| 26 |
'-I' + join_paths(meson.current_source_dir(), '../../'), |
| 27 |
'-I' + join_paths(meson.current_source_dir(), 'shaders'), |
| 28 |
'-I' + join_paths(meson.current_build_dir(), '../genxml'), |
| 29 |
cl_args, |
| 30 |
], |
| 31 |
depends : [agx_pack], |
| 32 |
depfile : 'libagx_shaders.h.d', |
| 33 |
) |
| 34 |
|
| 35 |
libagx = custom_target( |
| 36 |
input : libagx_spv, |
| 37 |
output : ['libagx.cpp', 'libagx.h'], |
| 38 |
command : [prog_vtn_bindgen2, libagx_spv, '@OUTPUT0@', '@OUTPUT1@'], |
| 39 |
) |
| 40 |
|
| 41 |
idep_libagx = declare_dependency( |
| 42 |
sources : [libagx], |
| 43 |
include_directories : include_directories('.'), |
| 44 |
) |