struct vn_device *dev = queue->device;
const VkAllocationCallbacks *alloc = &dev->base.base.alloc;
const bool has_sync_fd_fence_export =
- (dev->physical_device->renderer_sync_fd_fence_features &
- VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT);
+ dev->physical_device->renderer_sync_fd.fence_exportable;
VkDevice device = vn_device_to_handle(dev);
VkPipelineStageFlags local_stage_masks[8];
VkPipelineStageFlags *stage_masks = local_stage_masks;
if (app_exts->ANDROID_native_buffer) {
if (!app_exts->KHR_external_fence_fd &&
- (physical_dev->renderer_sync_fd_fence_features &
- VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT)) {
+ physical_dev->renderer_sync_fd.fence_exportable) {
extra_exts[extra_count++] =
VK_KHR_EXTERNAL_FENCE_FD_EXTENSION_NAME;
}
/* see vn_queue_submission_count_batch_semaphores */
if (!app_exts->KHR_external_semaphore_fd &&
- (physical_dev->renderer_sync_fd_semaphore_features &
- VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT)) {
+ physical_dev->renderer_sync_fd.semaphore_importable) {
extra_exts[extra_count++] = VK_KHR_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME;
}
physical_dev->instance, vn_physical_device_to_handle(physical_dev),
&info, &props);
- physical_dev->renderer_sync_fd_fence_features =
- props.externalFenceFeatures;
+ physical_dev->renderer_sync_fd.fence_exportable =
+ props.externalFenceFeatures &
+ VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT;
}
physical_dev->external_fence_handles = 0;
physical_dev->instance, vn_physical_device_to_handle(physical_dev),
&info, &props);
- physical_dev->renderer_sync_fd_semaphore_features =
- props.externalSemaphoreFeatures;
+ physical_dev->renderer_sync_fd.semaphore_exportable =
+ props.externalSemaphoreFeatures &
+ VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT;
+ physical_dev->renderer_sync_fd.semaphore_importable =
+ props.externalSemaphoreFeatures &
+ VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT;
}
physical_dev->external_binary_semaphore_handles = 0;
exts->ANDROID_native_buffer = true;
}
- if ((physical_dev->renderer_sync_fd_fence_features &
- VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT))
+ if (physical_dev->renderer_sync_fd.fence_exportable)
exts->KHR_external_fence_fd = true;
- if ((physical_dev->renderer_sync_fd_semaphore_features &
- VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT) &&
- (physical_dev->renderer_sync_fd_semaphore_features &
- VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT))
+ if (physical_dev->renderer_sync_fd.semaphore_importable &&
+ physical_dev->renderer_sync_fd.semaphore_exportable)
exts->KHR_external_semaphore_fd = true;
#else /* ANDROID */
#ifdef VN_USE_WSI_PLATFORM
if (renderer_exts->EXT_image_drm_format_modifier &&
renderer_exts->EXT_queue_family_foreign &&
- (physical_dev->renderer_sync_fd_semaphore_features &
- VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT)) {
+ physical_dev->renderer_sync_fd.semaphore_importable) {
exts->KHR_incremental_present = true;
exts->KHR_swapchain = true;
exts->KHR_swapchain_mutable_format = true;
* for VK_KHR_synchronization2.
*/
.KHR_synchronization2 =
- physical_dev->renderer_sync_fd_semaphore_features &
- VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT,
+ physical_dev->renderer_sync_fd.semaphore_importable,
.KHR_zero_initialize_workgroup_memory = true,
.EXT_4444_formats = true,
.EXT_extended_dynamic_state = true,
if (!vn_semaphore_wait_external(dev, sem))
return VK_ERROR_DEVICE_LOST;
- assert(dev->physical_device->renderer_sync_fd_semaphore_features &
- VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT);
+ assert(dev->physical_device->renderer_sync_fd.semaphore_importable);
const VkImportSemaphoreResourceInfo100000MESA res_info = {
.sType =
VkResult result;
assert(sync_file);
- assert(dev->physical_device->renderer_sync_fd_fence_features &
- VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT);
+ assert(dev->physical_device->renderer_sync_fd.fence_exportable);
int fd = -1;
if (payload->type == VN_SYNC_TYPE_DEVICE_ONLY) {
struct vn_sync_payload *payload = sem->payload;
assert(sync_file);
- assert((dev->physical_device->renderer_sync_fd_semaphore_features &
- VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT));
- assert((dev->physical_device->renderer_sync_fd_semaphore_features &
- VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT));
+ assert(dev->physical_device->renderer_sync_fd.semaphore_exportable);
+ assert(dev->physical_device->renderer_sync_fd.semaphore_importable);
int fd = -1;
if (payload->type == VN_SYNC_TYPE_DEVICE_ONLY) {