diff options
author | Eric Engestrom <eric@igalia.com> | 2023-02-15 19:23:21 +0000 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2023-02-17 23:53:30 +0000 |
commit | adbe8b6c17a76bb5ee0b924d927473f81c593eba (patch) | |
tree | 876f5092bdb975e09b4e85a12f894a150c48763b /meson.build | |
parent | b20a614e8281ca358f321de442846a673fc66353 (diff) | |
download | mesa-adbe8b6c17a76bb5ee0b924d927473f81c593eba.tar.gz |
mesa: optimize out _mesa_is_desktop_gl*() and _mesa_is_gles*() calls when not built
This will in turn optimize out anything that's gated on those.
Suggested-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21343>
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/meson.build b/meson.build index 326d8c645b3..91a7fb8669e 100644 --- a/meson.build +++ b/meson.build @@ -121,6 +121,10 @@ with_gles2 = get_option('gles2') \ .require(with_shared_glapi, error_message : 'OpengGL ES 2.x requires shared-glapi') \ .allowed() +pre_args += '-DHAVE_OPENGL=@0@'.format(with_opengl ? '1' : '0') +pre_args += '-DHAVE_OPENGL_ES_1=@0@'.format(with_gles1 ? '1' : '0') +pre_args += '-DHAVE_OPENGL_ES_2=@0@'.format(with_gles2 ? '1' : '0') + with_any_opengl = with_opengl or with_gles1 or with_gles2 # Only build shared_glapi if at least one OpenGL API is enabled with_shared_glapi = with_shared_glapi and with_any_opengl |