venus: Add driconf option to enable implicit fencing

Signed-off-by: Renato Pereyra <renatopereyra@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16735>
This commit is contained in:
Renato Pereyra 2022-05-26 18:22:16 -07:00 committed by Marge Bot
parent 87a53127e9
commit c642ebf8ab
2 changed files with 11 additions and 0 deletions

View File

@ -504,6 +504,13 @@
DRI_CONF_OPT_B(format_l8_srgb_enable_readback, def, \
"Force-enable reading back L8_SRGB textures")
/**
* \brief venus specific configuration options
*/
#define DRI_CONF_VENUS_IMPLICIT_FENCING(def) \
DRI_CONF_OPT_B(venus_implicit_fencing, def, \
"Assume the virtio-gpu kernel driver supports implicit fencing")
/**
* \brief RADV specific configuration options
*/

View File

@ -64,6 +64,7 @@ static const driOptionDescription vn_dri_options[] = {
DRI_CONF_VK_X11_OVERRIDE_MIN_IMAGE_COUNT(0)
DRI_CONF_VK_X11_STRICT_IMAGE_COUNT(false)
DRI_CONF_VK_XWAYLAND_WAIT_READY(true)
DRI_CONF_VENUS_IMPLICIT_FENCING(false)
DRI_CONF_SECTION_END
DRI_CONF_SECTION_DEBUG
DRI_CONF_VK_WSI_FORCE_BGRA8_UNORM_FIRST(false)
@ -787,6 +788,9 @@ vn_CreateInstance(const VkInstanceCreateInfo *pCreateInfo,
instance->base.base.app_info.engine_name,
instance->base.base.app_info.engine_version);
instance->renderer->info.has_implicit_fencing =
driQueryOptionb(&instance->dri_options, "venus_implicit_fencing");
*pInstance = instance_handle;
return VK_SUCCESS;