mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 19:58:09 +02:00
venus: renderer to store allow_vk_wait_syncs capset
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Ryan Neph <ryanneph@google.com> Reviewed-by: Chad Versace <chadversary@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16731>
This commit is contained in:
parent
8ecac4c063
commit
9f9d543b12
5 changed files with 17 additions and 1 deletions
|
|
@ -33,7 +33,9 @@ struct virgl_renderer_capset_venus {
|
|||
uint32_t vk_ext_command_serialization_spec_version;
|
||||
uint32_t vk_mesa_venus_protocol_spec_version;
|
||||
|
||||
/* TODO revisit this when we bump up wire_format_version to 1 */
|
||||
/* This flag indicates render server config, and will be needed until drm
|
||||
* virtio-gpu blob mem gets fixed to attach_resource before resource_map.
|
||||
*/
|
||||
uint32_t supports_blob_id_0;
|
||||
|
||||
/* Extension number N, where N is defined by the Vulkan spec, corresponds
|
||||
|
|
@ -45,6 +47,13 @@ struct virgl_renderer_capset_venus {
|
|||
* extensions are assumed to be supported by the renderer side protocol.
|
||||
*/
|
||||
uint32_t vk_extension_mask1[32];
|
||||
|
||||
/* The single-threaded renderer cannot afford potential blocking calls. It
|
||||
* also leads to GPU lost if the wait depends on a following command. This
|
||||
* capset allows such blocking calls to passthrough from the clients, and
|
||||
* shifts the responsibilities to the client drivers.
|
||||
*/
|
||||
uint32_t allow_vk_wait_syncs;
|
||||
};
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -293,6 +293,8 @@ vn_instance_init_renderer(struct vn_instance *instance)
|
|||
renderer_info->vk_mesa_venus_protocol_spec_version);
|
||||
vn_log(instance, "supports blob id 0: %d",
|
||||
renderer_info->supports_blob_id_0);
|
||||
vn_log(instance, "allow_vk_wait_syncs: %d",
|
||||
renderer_info->allow_vk_wait_syncs);
|
||||
}
|
||||
|
||||
return VK_SUCCESS;
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ struct vn_renderer_info {
|
|||
uint32_t supports_blob_id_0;
|
||||
/* combined mask for vk_extension_mask1, 2,..., N */
|
||||
uint32_t vk_extension_mask[32];
|
||||
uint32_t allow_vk_wait_syncs;
|
||||
};
|
||||
|
||||
struct vn_renderer_submit_batch {
|
||||
|
|
|
|||
|
|
@ -1415,6 +1415,8 @@ virtgpu_init_renderer_info(struct virtgpu *gpu)
|
|||
memcpy(info->vk_extension_mask, capset->vk_extension_mask1,
|
||||
sizeof(capset->vk_extension_mask1));
|
||||
|
||||
info->allow_vk_wait_syncs = capset->allow_vk_wait_syncs;
|
||||
|
||||
if (gpu->bo_blob_mem == VIRTGPU_BLOB_MEM_GUEST_VRAM)
|
||||
info->has_guest_vram = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -951,6 +951,8 @@ vtest_init_renderer_info(struct vtest *vtest)
|
|||
sizeof(capset->vk_extension_mask1));
|
||||
memcpy(info->vk_extension_mask, capset->vk_extension_mask1,
|
||||
sizeof(capset->vk_extension_mask1));
|
||||
|
||||
info->allow_vk_wait_syncs = capset->allow_vk_wait_syncs;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue