weston/libweston/renderer-gl/meson.build
Pekka Paalanen 92f2367e58 gl-renderer: implement 3 x 1D LUT color pre-curve
This makes weston_color_transform object be able to express
three-channel one-dimensional look-up table transformations. They are
useful for applying EOTF and EOTF^-1 mapping, or, gamma curves. They
will also be useful in optimizing a following 3D LUT tap distribution
once support for 3D LUT is added.

The code added here translates from the lut_3x1d fill_in() interface to
a GL texture to be used with SHADER_COLOR_CURVE_LUT_3x1D for
weston_surfaces.

It demonstrates how renderer data is attached to weston_color_transform
and cached.

GL_OES_texture_float_linear is required to be able to use bilinear
texture filtering with 32-bit floating-point textures, used for the LUT.

As the size of the LUT depends on what implements it, lut_3x1d fill_in()
interface is a callback to the color management component to ask for an
arbitrary size. For GL-renderer this is not important as it can easily
realize any LUT size, but when DRM-backend wants to offload the EOTF^-1
mapping to KMS (GAMMA_LUT), the LUT size comes from KMS.

Nothing actually implements lut_3x1d fill_in() yet, that will come in a
later patch.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2021-06-21 14:36:33 +00:00

58 lines
1.2 KiB
Meson

if not get_option('renderer-gl')
subdir_done()
endif
config_h.set('ENABLE_EGL', '1')
vertex_glsl = custom_target(
'vertex-shader.h',
command: cmd_xxd + [ '-n', 'vertex_shader' ],
input: 'vertex.glsl',
output: 'vertex-shader.h',
)
fragment_glsl = custom_target(
'fragment-shader.h',
command: cmd_xxd + [ '-n', 'fragment_shader' ],
input: 'fragment.glsl',
output: 'fragment-shader.h',
)
srcs_renderer_gl = [
'egl-glue.c',
fragment_glsl,
'gl-renderer.c',
'gl-shaders.c',
'gl-shader-config-color-transformation.c',
linux_dmabuf_unstable_v1_protocol_c,
linux_dmabuf_unstable_v1_server_protocol_h,
vertex_glsl,
]
deps_renderer_gl = [
dep_libm,
dep_pixman,
dep_libweston_private,
dep_libdrm_headers,
dep_vertex_clipping
]
foreach name : [ 'egl', 'glesv2' ]
d = dependency(name, required: false)
if not d.found()
error('gl-renderer requires @0@ which was not found. Or, you can use \'-Drenderer-gl=false\'.'.format(name))
endif
deps_renderer_gl += d
endforeach
plugin_gl = shared_library(
'gl-renderer',
srcs_renderer_gl,
include_directories: common_inc,
dependencies: deps_renderer_gl,
name_prefix: '',
install: true,
install_dir: dir_module_libweston
)
env_modmap += 'gl-renderer.so=@0@;'.format(plugin_gl.full_path())