mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-20 06:21:16 +01:00
[gpu] Add WGSL shader generation to meson
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
f35ff87a1a
commit
709b1d8f32
1 file changed
+16
@@ -862,6 +862,11 @@ hb_gpu_msl_sources = [
|
||||
[ 'hb-gpu-vertex.msl', 'hb-gpu-vertex-msl.hh', 'hb_gpu_vertex_msl' ],
|
||||
]
|
||||
|
||||
hb_gpu_wgsl_sources = [
|
||||
[ 'hb-gpu-fragment.wgsl', 'hb-gpu-fragment-wgsl.hh', 'hb_gpu_fragment_wgsl' ],
|
||||
[ 'hb-gpu-vertex.wgsl', 'hb-gpu-vertex-wgsl.hh', 'hb_gpu_vertex_wgsl' ],
|
||||
]
|
||||
|
||||
hb_gpu_shader_helper = find_program('gen-gpu-shader-artifacts.py')
|
||||
foreach p: hb_gpu_glsl_sources
|
||||
glsl = p.get(0)
|
||||
@@ -885,6 +890,17 @@ foreach p: hb_gpu_msl_sources
|
||||
meson.current_source_dir(), '@INPUT@' ])
|
||||
endforeach
|
||||
|
||||
foreach p: hb_gpu_wgsl_sources
|
||||
wgsl = p.get(0)
|
||||
hh = p.get(1)
|
||||
custom_target('@0@'.format(hh),
|
||||
build_by_default: true,
|
||||
input: wgsl,
|
||||
output: hh,
|
||||
command: [ hb_gpu_shader_helper, '@OUTPUT@',
|
||||
meson.current_source_dir(), '@INPUT@' ])
|
||||
endforeach
|
||||
|
||||
hb_gpu_sources = files(
|
||||
'hb-gpu.cc',
|
||||
'hb-gpu-draw.cc',
|
||||
|
||||
Reference in new issue
Block a user