blob: 2d6504de4e50480812eb40585ca155a612edfb16 [file] [log] [blame]
# Build file for shaders.
# You must have Vulkan tools in your path, or patch here.
glslang_validator = glslangValidator
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
rule glsl
command = $glslang_validator $flags -V -o $out $in
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
build gen/clear.spv: glsl clear.comp
build gen/clear.hlsl: hlsl gen/clear.spv
build gen/clear.dxil: dxil gen/clear.hlsl
build gen/clear.msl: msl gen/clear.spv
build gen/prefix.spv: glsl prefix.comp
build gen/prefix.hlsl: hlsl gen/prefix.spv
build gen/prefix.dxil: dxil gen/prefix.hlsl
build gen/prefix.msl: msl gen/prefix.spv
build gen/prefix_atomic.spv: glsl prefix.comp
flags = -DATOMIC
build gen/prefix_atomic.hlsl: hlsl gen/prefix_atomic.spv
build gen/prefix_atomic.dxil: dxil gen/prefix_atomic.hlsl
build gen/prefix_atomic.msl: msl gen/prefix_atomic.spv
build gen/prefix_vkmm.spv: glsl prefix.comp
flags = -DATOMIC -DVKMM
# Vulkan memory model doesn't translate
build gen/prefix_reduce.spv: glsl prefix_reduce.comp
build gen/prefix_reduce.hlsl: hlsl gen/prefix_reduce.spv
build gen/prefix_reduce.dxil: dxil gen/prefix_reduce.hlsl
build gen/prefix_reduce.msl: msl gen/prefix_reduce.spv
build gen/prefix_root.spv: glsl prefix_scan.comp
flags = -DROOT
build gen/prefix_root.hlsl: hlsl gen/prefix_root.spv
build gen/prefix_root.dxil: dxil gen/prefix_root.hlsl
build gen/prefix_root.msl: msl gen/prefix_root.spv
build gen/prefix_scan.spv: glsl prefix_scan.comp
build gen/prefix_scan.hlsl: hlsl gen/prefix_scan.spv
build gen/prefix_scan.dxil: dxil gen/prefix_scan.hlsl
build gen/prefix_scan.msl: msl gen/prefix_scan.spv
build gen/message_passing.spv: glsl message_passing.comp
build gen/message_passing.hlsl: hlsl gen/message_passing.spv
build gen/message_passing.dxil: dxil gen/message_passing.hlsl
build gen/message_passing.msl: msl gen/message_passing.spv
build gen/message_passing_vkmm.spv: glsl message_passing.comp
flags = -DVKMM
build gen/linkedlist.spv: glsl linkedlist.comp
build gen/linkedlist.hlsl: hlsl gen/linkedlist.spv
build gen/linkedlist.dxil: dxil gen/linkedlist.hlsl
build gen/linkedlist.msl: msl gen/linkedlist.spv
build gen/stack_reduce.spv: glsl stack_reduce.comp
build gen/stack_reduce.hlsl: hlsl gen/stack_reduce.spv
build gen/stack_reduce.dxil: dxil gen/stack_reduce.hlsl
build gen/stack_reduce.msl: msl gen/stack_reduce.spv
build gen/stack_leaf.spv: glsl stack_leaf.comp
build gen/stack_leaf.hlsl: hlsl gen/stack_leaf.spv
build gen/stack_leaf.dxil: dxil gen/stack_leaf.hlsl
build gen/stack_leaf.msl: msl gen/stack_leaf.spv
build gen/union_reduce.spv: glsl union_reduce.comp
build gen/union_reduce.hlsl: hlsl gen/union_reduce.spv
build gen/union_reduce.dxil: dxil gen/union_reduce.hlsl
build gen/union_reduce.msl: msl gen/union_reduce.spv
build gen/union_leaf.spv: glsl union_leaf.comp
build gen/union_leaf.hlsl: hlsl gen/union_leaf.spv
build gen/union_leaf.dxil: dxil gen/union_leaf.hlsl
build gen/union_leaf.msl: msl gen/union_leaf.spv
build gen/intersection_reduce.spv: glsl intersection_reduce.comp
build gen/intersection_reduce.hlsl: hlsl gen/intersection_reduce.spv
build gen/intersection_reduce.dxil: dxil gen/intersection_reduce.hlsl
build gen/intersection_reduce.msl: msl gen/intersection_reduce.spv
build gen/intersection_leaf.spv: glsl intersection_leaf.comp
build gen/intersection_leaf.hlsl: hlsl gen/intersection_leaf.spv
build gen/intersection_leaf.dxil: dxil gen/intersection_leaf.hlsl
build gen/intersection_leaf.msl: msl gen/intersection_leaf.spv