mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 11:28:05 +02:00
vk/runtime: Set GPU_MULTI_WAIT on the drm syncobj type.
DRM syncobjs always let you wait repeatedly on them, so we can set the flag in the core instead of having each driver override it once they try to enable the emulated timeline semaphores. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36563>
This commit is contained in:
parent
7375dfd56d
commit
9e61e72e9f
5 changed files with 2 additions and 14 deletions
|
|
@ -300,9 +300,6 @@ radv_amdgpu_winsys_create(int fd, uint64_t debug_flags, uint64_t perftest_flags,
|
|||
|
||||
ws->syncobj_sync_type = vk_drm_syncobj_get_type_from_provider(ac_drm_device_get_sync_provider(dev));
|
||||
if (ws->syncobj_sync_type.features) {
|
||||
/* multi wait is always supported */
|
||||
ws->syncobj_sync_type.features |= VK_SYNC_FEATURE_GPU_MULTI_WAIT;
|
||||
|
||||
if (!ws->info.has_timeline_syncobj && ws->syncobj_sync_type.features & VK_SYNC_FEATURE_TIMELINE) {
|
||||
/* Disable timeline feature if it was disabled in the driver. */
|
||||
assert(is_virtio);
|
||||
|
|
|
|||
|
|
@ -1382,11 +1382,6 @@ create_physical_device(struct v3dv_instance *instance,
|
|||
*/
|
||||
device->drm_syncobj_type.features &= ~VK_SYNC_FEATURE_TIMELINE;
|
||||
|
||||
/* Multiwait is required for emulated timeline semaphores and is supported
|
||||
* by the v3d kernel interface.
|
||||
*/
|
||||
device->drm_syncobj_type.features |= VK_SYNC_FEATURE_GPU_MULTI_WAIT;
|
||||
|
||||
device->sync_timeline_type =
|
||||
vk_sync_timeline_get_type(&device->drm_syncobj_type);
|
||||
|
||||
|
|
|
|||
|
|
@ -205,11 +205,6 @@ get_device_sync_types(struct panvk_physical_device *device,
|
|||
*/
|
||||
device->drm_syncobj_type.features &= ~VK_SYNC_FEATURE_TIMELINE;
|
||||
|
||||
/* vk_sync_timeline requires VK_SYNC_FEATURE_GPU_MULTI_WAIT. Panfrost
|
||||
* waits on the underlying dma-fences and supports the feature.
|
||||
*/
|
||||
device->drm_syncobj_type.features |= VK_SYNC_FEATURE_GPU_MULTI_WAIT;
|
||||
|
||||
device->sync_timeline_type =
|
||||
vk_sync_timeline_get_type(&device->drm_syncobj_type);
|
||||
device->sync_types[sync_type_count++] = &device->sync_timeline_type.sync;
|
||||
|
|
|
|||
|
|
@ -403,6 +403,7 @@ vk_drm_syncobj_get_type_from_provider(struct util_sync_provider *sync)
|
|||
.size = sizeof(struct vk_drm_syncobj),
|
||||
.features = VK_SYNC_FEATURE_BINARY |
|
||||
VK_SYNC_FEATURE_GPU_WAIT |
|
||||
VK_SYNC_FEATURE_GPU_MULTI_WAIT |
|
||||
VK_SYNC_FEATURE_CPU_RESET |
|
||||
VK_SYNC_FEATURE_CPU_SIGNAL |
|
||||
VK_SYNC_FEATURE_WAIT_PENDING,
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ enum vk_sync_features {
|
|||
/** Set if this sync supports GPU waits */
|
||||
VK_SYNC_FEATURE_GPU_WAIT = (1 << 2),
|
||||
|
||||
/** Set if a sync type supports multiple GPU waits on one signal state
|
||||
/** Set if a non-timeline sync type supports multiple GPU waits on one signal state
|
||||
*
|
||||
* The Vulkan spec for VkSemaphore requires GPU wait and signal operations
|
||||
* to have a one-to-one relationship. This formally described by saying
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue