vello/piet-gpu-hal/examples/shader/build.ninja
Raph Levien 7d7c86c44b API changes and cleanup
Add workgroup size to dispatch call (needed by metal). Change all fence
references to mutable for consistency.

Move backend traits to a separate file (move them out of the toplevel
namespace in preparation for the hub types going there, to make the
public API nicer).

Add a method and macro for automatically choosing shader code, and
change collatz example to generate all 3 kinds on build.
2021-05-28 16:14:39 -07:00

20 lines
456 B
GLSL

# Build file for shaders.
# You must have Vulkan tools in your path, or patch here.
glslang_validator = glslangValidator
spirv_cross = spirv-cross
rule glsl
command = $glslang_validator -V -o $out $in
rule hlsl
command = $spirv_cross --hlsl $in --output $out
rule msl
command = $spirv_cross --msl $in --output $out
build gen/collatz.spv: glsl collatz.comp
build gen/collatz.hlsl: hlsl gen/collatz.spv
build gen/collatz.msl: msl gen/collatz.spv