meson: Automatically generate glsl_shaders.h from specified shader programs
Encode the bayer shader files into a header as part of the build process. Qcam already compiles the shader files down into a QT resource file which it references internally. In order to share the debayering shader programs outside of qcam create a generic header which both qcam and libcamera can operate from. Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
This commit is contained in:
parent
a6a1fbd82b
commit
8422ee9441
3 changed files with 22 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
subdir('tracepoints')
|
||||
subdir('shaders')
|
||||
|
||||
libcamera_internal_headers = files([
|
||||
'bayer_format.h',
|
||||
|
@ -57,5 +58,14 @@ tracepoints_h = custom_target(
|
|||
|
||||
libcamera_internal_headers += tracepoints_h
|
||||
|
||||
libcamera_shader_headers = custom_target(
|
||||
'gen-shader-headers',
|
||||
input : [shader_files],
|
||||
output : 'glsl_shaders.h',
|
||||
command : [gen_shader_headers, meson.project_source_root(), meson.project_build_root(), '@OUTPUT@', '@INPUT@'],
|
||||
)
|
||||
|
||||
libcamera_internal_headers += libcamera_shader_headers
|
||||
|
||||
subdir('converter')
|
||||
subdir('software_isp')
|
||||
|
|
10
include/libcamera/internal/shaders/meson.build
Normal file
10
include/libcamera/internal/shaders/meson.build
Normal file
|
@ -0,0 +1,10 @@
|
|||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
# List of shader files to convert to header hex
|
||||
# for the purposes of inclusion in OpenGL debayering
|
||||
shader_files = files([
|
||||
'bayer_1x_packed.frag',
|
||||
'bayer_8.frag',
|
||||
'bayer_8.vert',
|
||||
'identity.vert',
|
||||
])
|
Loading…
Add table
Add a link
Reference in a new issue