2020-04-16 14:04:40 -07:00
|
|
|
# Build file for shaders.
|
|
|
|
|
2021-11-23 07:28:50 -08:00
|
|
|
# You must have Vulkan tools in your path, or patch here.
|
2020-04-16 14:04:40 -07:00
|
|
|
|
|
|
|
glslang_validator = glslangValidator
|
2021-11-23 07:28:50 -08:00
|
|
|
spirv_cross = spirv-cross
|
|
|
|
dxc = dxc
|
|
|
|
|
|
|
|
# See https://github.com/KhronosGroup/SPIRV-Cross/issues/1248 for
|
|
|
|
# why we set this.
|
|
|
|
msl_flags = --msl-decoration-binding
|
2020-04-16 14:04:40 -07:00
|
|
|
|
|
|
|
rule glsl
|
2021-04-02 18:59:07 -07:00
|
|
|
command = $glslang_validator $flags -V -o $out $in
|
2020-04-16 14:04:40 -07:00
|
|
|
|
2021-11-23 07:28:50 -08:00
|
|
|
rule hlsl
|
|
|
|
command = $spirv_cross --hlsl $in --output $out
|
|
|
|
|
|
|
|
rule dxil
|
|
|
|
command = $dxc -T cs_6_0 $in -Fo $out
|
|
|
|
|
|
|
|
rule msl
|
|
|
|
command = $spirv_cross --msl $in --output $out $msl_flags
|
|
|
|
|
2020-05-11 20:01:06 -07:00
|
|
|
|
2020-05-12 13:38:26 -07:00
|
|
|
build elements.spv: glsl elements.comp | scene.h state.h annotated.h
|
|
|
|
|
2020-05-20 16:36:09 -07:00
|
|
|
build binning.spv: glsl binning.comp | annotated.h state.h bins.h setup.h
|
2020-05-13 15:35:19 -07:00
|
|
|
|
2020-06-02 17:10:20 -07:00
|
|
|
build tile_alloc.spv: glsl tile_alloc.comp | annotated.h tile.h setup.h
|
|
|
|
|
2020-06-09 16:01:47 -07:00
|
|
|
build path_coarse.spv: glsl path_coarse.comp | annotated.h pathseg.h tile.h setup.h
|
2020-06-02 17:10:20 -07:00
|
|
|
|
2020-06-05 15:07:02 -07:00
|
|
|
build backdrop.spv: glsl backdrop.comp | annotated.h tile.h setup.h
|
|
|
|
|
2021-06-08 16:29:40 +09:00
|
|
|
build backdrop_lg.spv: glsl backdrop.comp | annotated.h tile.h setup.h
|
|
|
|
flags = -DBACKDROP_DIST_FACTOR=4
|
|
|
|
|
2020-05-13 15:35:19 -07:00
|
|
|
build coarse.spv: glsl coarse.comp | annotated.h bins.h ptcl.h setup.h
|
2020-05-15 15:20:25 -07:00
|
|
|
|
|
|
|
build kernel4.spv: glsl kernel4.comp | ptcl.h setup.h
|
2021-11-23 07:28:50 -08:00
|
|
|
|
|
|
|
# New element pipeline follows
|
|
|
|
|
|
|
|
build gen/transform_reduce.spv: glsl transform_reduce.comp | scene.h setup.h mem.h
|
|
|
|
build gen/transform_reduce.hlsl: hlsl gen/transform_reduce.spv
|
|
|
|
build gen/transform_reduce.dxil: dxil gen/transform_reduce.hlsl
|
|
|
|
build gen/transform_reduce.msl: msl gen/transform_reduce.spv
|
|
|
|
|
|
|
|
build gen/transform_root.spv: glsl transform_scan.comp
|
|
|
|
flags = -DROOT
|
|
|
|
build gen/transform_root.hlsl: hlsl gen/transform_root.spv
|
|
|
|
build gen/transform_root.dxil: dxil gen/transform_root.hlsl
|
|
|
|
build gen/transform_root.msl: msl gen/transform_root.spv
|
|
|
|
|
|
|
|
build gen/transform_leaf.spv: glsl transform_leaf.comp | scene.h tile.h setup.h mem.h
|
|
|
|
build gen/transform_leaf.hlsl: hlsl gen/transform_leaf.spv
|
|
|
|
build gen/transform_leaf.dxil: dxil gen/transform_leaf.hlsl
|
|
|
|
build gen/transform_leaf.msl: msl gen/transform_leaf.spv
|
2021-11-24 16:26:45 -08:00
|
|
|
|
|
|
|
build gen/pathtag_reduce.spv: glsl pathtag_reduce.comp | pathtag.h setup.h mem.h
|
2021-12-01 08:42:06 -08:00
|
|
|
build gen/pathtag_reduce.hlsl: hlsl gen/pathtag_reduce.spv
|
|
|
|
build gen/pathtag_reduce.dxil: dxil gen/pathtag_reduce.hlsl
|
|
|
|
build gen/pathtag_reduce.msl: msl gen/pathtag_reduce.spv
|
2021-11-24 16:26:45 -08:00
|
|
|
|
|
|
|
build gen/pathtag_root.spv: glsl pathtag_scan.comp | pathtag.h
|
|
|
|
flags = -DROOT
|
2021-12-01 08:42:06 -08:00
|
|
|
build gen/pathtag_root.hlsl: hlsl gen/pathtag_root.spv
|
|
|
|
build gen/pathtag_root.dxil: dxil gen/pathtag_root.hlsl
|
|
|
|
build gen/pathtag_root.msl: msl gen/pathtag_root.spv
|
2021-11-24 16:26:45 -08:00
|
|
|
|
|
|
|
build gen/bbox_clear.spv: glsl bbox_clear.comp | setup.h mem.h
|
2021-12-01 08:42:06 -08:00
|
|
|
build gen/bbox_clear.hlsl: hlsl gen/bbox_clear.spv
|
|
|
|
build gen/bbox_clear.dxil: dxil gen/bbox_clear.hlsl
|
|
|
|
build gen/bbox_clear.msl: msl gen/bbox_clear.spv
|
2021-11-24 16:26:45 -08:00
|
|
|
|
|
|
|
build gen/pathseg.spv: glsl pathseg.comp | tile.h pathseg.h pathtag.h setup.h mem.h
|
2021-12-01 08:42:06 -08:00
|
|
|
build gen/pathseg.hlsl: hlsl gen/pathseg.spv
|
|
|
|
build gen/pathseg.dxil: dxil gen/pathseg.hlsl
|
|
|
|
build gen/pathseg.msl: msl gen/pathseg.spv
|