diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index 9e411c45144..61949da3234 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -921,12 +921,18 @@ anv_physical_device_try_create(struct vk_instance *vk_instance, device->sync_syncobj_type.features &= ~VK_SYNC_FEATURE_TIMELINE; device->sync_types[st_idx++] = &device->sync_syncobj_type; - if (!(device->sync_syncobj_type.features & VK_SYNC_FEATURE_CPU_WAIT)) - device->sync_types[st_idx++] = &anv_bo_sync_type; + /* anv_bo_sync_type is only supported with i915 for now */ + if (device->info.kmd_type == INTEL_KMD_TYPE_I915) { + if (!(device->sync_syncobj_type.features & VK_SYNC_FEATURE_CPU_WAIT)) + device->sync_types[st_idx++] = &anv_bo_sync_type; - if (!(device->sync_syncobj_type.features & VK_SYNC_FEATURE_TIMELINE)) { - device->sync_timeline_type = vk_sync_timeline_get_type(&anv_bo_sync_type); - device->sync_types[st_idx++] = &device->sync_timeline_type.sync; + if (!(device->sync_syncobj_type.features & VK_SYNC_FEATURE_TIMELINE)) { + device->sync_timeline_type = vk_sync_timeline_get_type(&anv_bo_sync_type); + device->sync_types[st_idx++] = &device->sync_timeline_type.sync; + } + } else { + assert(device->sync_syncobj_type.features & VK_SYNC_FEATURE_TIMELINE); + assert(device->sync_syncobj_type.features & VK_SYNC_FEATURE_CPU_WAIT); } device->sync_types[st_idx++] = NULL; @@ -3051,6 +3057,8 @@ VkResult anv_CreateDevice( device->vk.command_buffer_ops = &anv_cmd_buffer_ops; device->vk.create_sync_for_memory = anv_create_sync_for_memory; + if (physical_device->info.kmd_type == INTEL_KMD_TYPE_I915) + device->vk.create_sync_for_memory = anv_create_sync_for_memory; vk_device_set_drm_fd(&device->vk, device->fd); uint32_t num_queues = 0; diff --git a/src/intel/vulkan/anv_wsi.c b/src/intel/vulkan/anv_wsi.c index b8177924530..0087ab041dc 100644 --- a/src/intel/vulkan/anv_wsi.c +++ b/src/intel/vulkan/anv_wsi.c @@ -65,9 +65,11 @@ anv_init_wsi(struct anv_physical_device *physical_device) return result; physical_device->wsi_device.supports_modifiers = true; - physical_device->wsi_device.signal_semaphore_with_memory = true; - physical_device->wsi_device.signal_fence_with_memory = true; physical_device->wsi_device.get_blit_queue = anv_wsi_get_prime_blit_queue; + if (physical_device->info.kmd_type == INTEL_KMD_TYPE_I915) { + physical_device->wsi_device.signal_semaphore_with_memory = true; + physical_device->wsi_device.signal_fence_with_memory = true; + } physical_device->vk.wsi_device = &physical_device->wsi_device;