mirror of
https://github.com/italicsjenga/vello.git
synced 2025-01-10 20:51:29 +11:00
a0648a2153
The MSL translation of the prefix example had its bindings permuted; a flag prevents this (but, as is typical for shader translation, potentially creates other problems). Also use explicit unsigned literal to avoid DXC warnings.
41 lines
1.2 KiB
GLSL
41 lines
1.2 KiB
GLSL
# Build file for shaders.
|
|
|
|
# You must have Vulkan tools in your path, or patch here.
|
|
|
|
glslang_validator = glslangValidator
|
|
spirv_cross = spirv-cross
|
|
|
|
# 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 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.msl: msl gen/clear.spv
|
|
|
|
build gen/prefix.spv: glsl prefix.comp
|
|
build gen/prefix.hlsl: hlsl gen/prefix.spv
|
|
build gen/prefix.msl: msl gen/prefix.spv
|
|
|
|
build gen/prefix_reduce.spv: glsl prefix_reduce.comp
|
|
build gen/prefix_reduce.hlsl: hlsl gen/prefix_reduce.spv
|
|
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.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.msl: msl gen/prefix_scan.spv
|