a/vk: Pass external_[fence|samaphore]_fd status to vk_init_from_given

This commit is contained in:
Jakob Bornecrantz 2022-05-08 13:02:25 +01:00 committed by Christoph Haag
parent 6a8e679f87
commit e092a3687b
3 changed files with 15 additions and 0 deletions

View file

@ -992,6 +992,8 @@ vk_init_from_given(struct vk_bundle *vk,
VkDevice device,
uint32_t queue_family_index,
uint32_t queue_index,
bool external_fence_fd_enabled,
bool external_semaphore_fd_enabled,
bool timeline_semaphore_enabled,
enum u_logging_level log_level)
{
@ -1022,6 +1024,15 @@ vk_init_from_given(struct vk_bundle *vk,
// passed a vulkan context and do not call selectPhysicalDevice()
vk->vkGetPhysicalDeviceMemoryProperties(vk->physical_device, &vk->device_memory_props);
// Vulkan does not let us read what extensions was enabled.
if (external_fence_fd_enabled) {
vk->has_KHR_external_fence_fd = true;
}
// Vulkan does not let us read what extensions was enabled.
if (external_semaphore_fd_enabled) {
vk->has_KHR_external_semaphore_fd = true;
}
#ifdef VK_KHR_timeline_semaphore
/*

View file

@ -623,6 +623,8 @@ vk_init_from_given(struct vk_bundle *vk,
VkDevice device,
uint32_t queue_family_index,
uint32_t queue_index,
bool external_fence_fd_enabled,
bool external_semaphore_fd_enabled,
bool timeline_semaphore_enabled,
enum u_logging_level log_level);

View file

@ -818,6 +818,8 @@ client_vk_compositor_create(struct xrt_compositor_native *xcn,
device, // device
queueFamilyIndex, // queue_family_index
queueIndex, // queue_index
true, // external_fence_fd_enabled
true, // external_semaphore_fd_enabled
timeline_semaphore_enabled, // timeline_semaphore_enabled
log_level); // log_level
if (ret != VK_SUCCESS) {