mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-25 20:00:37 +02:00
venus: add supports_multiple_timelines capset and enable
Signed-off-by: Ryan Neph <ryanneph@google.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19691>
This commit is contained in:
parent
929e52c35a
commit
fea4af6234
3 changed files with 21 additions and 2 deletions
|
|
@ -54,6 +54,16 @@ struct virgl_renderer_capset_venus {
|
|||
* shifts the responsibilities to the client drivers.
|
||||
*/
|
||||
uint32_t allow_vk_wait_syncs;
|
||||
|
||||
/* This flag indicates that the renderer supports multiple fencing
|
||||
* timelines. The client driver is expected to associate each VkQueue with
|
||||
* one of these timelines at queue creation by binding it with an unused
|
||||
* ring_idx. Queues created without a ring_idx binding are associated to a
|
||||
* shared legacy timeline. The special ring_idx==0 is reserved for CPU
|
||||
* fences that are signaled by the renderer immediately upon consumption of
|
||||
* the associated renderer submission.
|
||||
*/
|
||||
uint32_t supports_multiple_timelines;
|
||||
};
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -219,6 +219,12 @@ vn_instance_init_experimental_features(struct vn_instance *instance)
|
|||
&reply_dec, &struct_size, &instance->experimental);
|
||||
vn_renderer_shmem_unref(instance->renderer, reply_shmem);
|
||||
|
||||
/* if renderer supports multiple_timelines, the driver will use it and
|
||||
* globalFencing support can be assumed.
|
||||
*/
|
||||
if (instance->renderer->info.supports_multiple_timelines)
|
||||
instance->experimental.globalFencing = VK_TRUE;
|
||||
|
||||
if (VN_DEBUG(INIT)) {
|
||||
vn_log(instance,
|
||||
"VkVenusExperimentalFeatures100000MESA is as below:"
|
||||
|
|
@ -297,6 +303,8 @@ vn_instance_init_renderer(struct vn_instance *instance)
|
|||
renderer_info->supports_blob_id_0);
|
||||
vn_log(instance, "allow_vk_wait_syncs: %d",
|
||||
renderer_info->allow_vk_wait_syncs);
|
||||
vn_log(instance, "supports_multiple_timelines: %d",
|
||||
renderer_info->supports_multiple_timelines);
|
||||
}
|
||||
|
||||
return VK_SUCCESS;
|
||||
|
|
|
|||
|
|
@ -1380,8 +1380,6 @@ virtgpu_init_renderer_info(struct virtgpu *gpu)
|
|||
|
||||
info->has_implicit_fencing = false;
|
||||
|
||||
info->max_sync_queue_count = gpu->max_sync_queue_count;
|
||||
|
||||
const struct virgl_renderer_capset_venus *capset = &gpu->capset.data;
|
||||
info->wire_format_version = capset->wire_format_version;
|
||||
info->vk_xml_version = capset->vk_xml_version;
|
||||
|
|
@ -1399,6 +1397,9 @@ virtgpu_init_renderer_info(struct virtgpu *gpu)
|
|||
|
||||
info->allow_vk_wait_syncs = capset->allow_vk_wait_syncs;
|
||||
|
||||
info->supports_multiple_timelines = capset->supports_multiple_timelines;
|
||||
info->max_sync_queue_count = gpu->max_sync_queue_count;
|
||||
|
||||
if (gpu->bo_blob_mem == VIRTGPU_BLOB_MEM_GUEST_VRAM)
|
||||
info->has_guest_vram = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue