Module: Mesa
Branch: main
Commit: 4807d777c09bb902116ee7b68b92009d0f92097f
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=4807d777c09bb902116ee7b68b92009d0f92097f

Author: Martin Krastev <[email protected]>
Date:   Tue Mar 30 18:56:47 2021 +0300

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 <[email protected]>
Reviewed-by: Zack Rusin <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Charmaine Lee <[email protected]>
(cherry picked from commit 57760b7fe4eeb80acc8d6cd8bf6ec609a11a11dc)
(cherry picked from commit 12aed00f08bd95afd605cab34c833e81a4957dbd)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12873>

---

 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.'
+)

Reply via email to