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 <sroland@vmware.com>
Reviewed-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
(cherry picked from commit 57760b7fe4eeb80acc8d6cd8bf6ec609a11a11dc)
(cherry picked from commit 12aed00f08bd95afd605cab34c833e81a4957dbd)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12873>
This commit is contained in:
Martin Krastev 2021-03-30 18:56:47 +03:00 committed by Marge Bot
parent 4feb9c3c47
commit 4807d777c0
2 changed files with 13 additions and 0 deletions

View File

@ -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

View File

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