}
static VkResult
-vn_instance_init_experimental_features(struct vn_instance *instance)
-{
- if (instance->renderer->info.vk_mesa_venus_protocol_spec_version !=
- 100000) {
- if (VN_DEBUG(INIT))
- vn_log(instance, "renderer supports no experimental features");
- return VK_SUCCESS;
- }
-
- size_t struct_size = sizeof(instance->experimental);
- vn_call_vkGetVenusExperimentalFeatureData100000MESA(
- instance, &struct_size, &instance->experimental);
-
- VkVenusExperimentalFeatures100000MESA *exp_feats = &instance->experimental;
-
- /* if renderer supports multiple_timelines, the driver will use it and
- * globalFencing support can be assumed.
- */
- if (instance->renderer->info.supports_multiple_timelines)
- exp_feats->globalFencing = VK_TRUE;
-
- if (!exp_feats->memoryResourceAllocationSize ||
- !exp_feats->globalFencing || !exp_feats->largeRing ||
- !exp_feats->syncFdFencing || !exp_feats->asyncRoundtrip ||
- !exp_feats->ringMonitoring)
- return VK_ERROR_INITIALIZATION_FAILED;
-
- if (VN_DEBUG(INIT)) {
- vn_log(instance,
- "VkVenusExperimentalFeatures100000MESA is as below:"
- "\n\tmemoryResourceAllocationSize = %u"
- "\n\tglobalFencing = %u"
- "\n\tlargeRing = %u"
- "\n\tsyncFdFencing = %u"
- "\n\tasyncRoundtrip = %u"
- "\n\tringMonitoring = %u",
- instance->experimental.memoryResourceAllocationSize,
- instance->experimental.globalFencing,
- instance->experimental.largeRing,
- instance->experimental.syncFdFencing,
- instance->experimental.asyncRoundtrip,
- instance->experimental.ringMonitoring);
- }
-
- return VK_SUCCESS;
-}
-
-static VkResult
vn_instance_init_renderer(struct vn_instance *instance)
{
const VkAllocationCallbacks *alloc = &instance->base.base.alloc;
if (result != VK_SUCCESS)
goto fail;
- result = vn_instance_init_experimental_features(instance);
- if (result != VK_SUCCESS)
- goto fail;
-
result = vn_instance_init_renderer_versions(instance);
if (result != VK_SUCCESS)
goto fail;