mirror of
https://github.com/italicsjenga/vello.git
synced 2025-01-10 12:41:30 +11:00
f9d0aa078b
Integrate DXC for translating HLSL for use in DX12. This will work around FXC limitations and unlock the use of more advanced HLSL features such as subgroups. This hardcodes the use of DXIL, but it could be adapted (with a bit of effort) to choose between DXIL and HLSL at runtime.
25 lines
563 B
GLSL
25 lines
563 B
GLSL
# Build file for shaders.
|
|
|
|
# You must have Vulkan tools in your path, or patch here.
|
|
|
|
glslang_validator = glslangValidator
|
|
spirv_cross = spirv-cross
|
|
dxc = dxc
|
|
|
|
rule glsl
|
|
command = $glslang_validator -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
|
|
|
|
build gen/collatz.spv: glsl collatz.comp
|
|
build gen/collatz.hlsl: hlsl gen/collatz.spv
|
|
build gen/collatz.dxil: dxil gen/collatz.hlsl
|
|
build gen/collatz.msl: msl gen/collatz.spv
|