Files
harfbuzz/util/gpu/meson.build
T
Behdad EsfahbodandClaude Opus 4.6 6910b9a3ed [gpu] Add Metal backend for macOS demo
Add MSL shader translations of the Slug GPU text rasterizer, and a
Metal rendering backend for hb-gpu-demo selectable via --metal flag.

Library changes:
- Add HB_GPU_SHADER_LANG_MSL enum value
- Add hb-gpu-vertex.msl and hb-gpu-fragment.msl
- Extend gen-gpu-shader-artifacts.py for MSL

Demo changes:
- Add demo-metal.h/mm with CAMetalLayer rendering
- Add external atlas backend for non-GL paths
- Add demo_buffer_get_vertices for Metal draw path
- Skip GL init when using Metal (GLFW_NO_API)
- Add --metal command-line flag

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 13:36:28 -06:00

41 lines
1.0 KiB
Meson

gpu_demo_sources = files(
'demo-atlas.h',
'demo-atlas.cc',
'demo-buffer.h',
'demo-buffer.cc',
'demo-common.h',
'demo-font.h',
'demo-font.cc',
'demo-glstate.h',
'demo-glstate.cc',
'demo-shader.h',
'demo-shader.cc',
'demo-view.h',
'demo-view.cc',
'demo-fragment-glsl.hh',
'demo-vertex-glsl.hh',
'default-text-en.hh',
'default-text-fa.hh',
'default-font.hh',
'matrix4x4.hh',
'trackball.hh',
)
if host_machine.system() == 'darwin'
gpu_demo_sources += files(
'demo-metal.h',
'demo-metal.mm',
)
endif
glew_dep = dependency('glew', required: false)
glfw_dep = dependency('glfw3', required: false)
if host_machine.system() == 'darwin'
gl_dep = dependency('appleframeworks', modules: ['OpenGL'], required: false)
metal_dep = dependency('appleframeworks', modules: ['Metal', 'QuartzCore', 'Foundation', 'AppKit'], required: false)
else
gl_dep = dependency('gl', required: false)
metal_dep = disabler()
endif
have_gpu_demo_deps = glew_dep.found() and glfw_dep.found() and gl_dep.found()