From 4807d777c09bb902116ee7b68b92009d0f92097f Mon Sep 17 00:00:00 2001 From: Martin Krastev Date: Tue, 30 Mar 2021 18:56:47 +0300 Subject: [PATCH] meson: introduce option vmware-mks-stats controlling the instrumentations of gallium svga driver The new boolean option controls the instrumentations of gallium svga driver for mksGuestStats. Reviewed-by: Roland Scheidegger Reviewed-by: Zack Rusin Reviewed-by: Brian Paul Reviewed-by: Charmaine Lee (cherry picked from commit 57760b7fe4eeb80acc8d6cd8bf6ec609a11a11dc) (cherry picked from commit 12aed00f08bd95afd605cab34c833e81a4957dbd) Part-of: --- meson.build | 7 +++++++ meson_options.txt | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/meson.build b/meson.build index 56c19bc881a..0bf02182864 100644 --- a/meson.build +++ b/meson.build @@ -867,6 +867,13 @@ if _power8 != 'disabled' endif endif +if get_option('vmware-mks-stats') + if not with_gallium_svga + error('vmware-mks-stats requires gallium VMware/svga driver.') + endif + pre_args += '-DVMX86_STATS=1' +endif + _opencl = get_option('gallium-opencl') if _opencl != 'disabled' if not with_gallium diff --git a/meson_options.txt b/meson_options.txt index 29c402c4844..8f67013d1bb 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -524,3 +524,9 @@ option( value : '', description : 'Enable a custom shader replacement mechanism. Note that enabling this option requires adding/generating a shader_replacement.h file that can be included (see shaderapi.c).' ) +option( + 'vmware-mks-stats', + type : 'boolean', + value : false, + description : 'Build gallium VMware/svga driver with mksGuestStats instrumentation.' +)