mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 11:20:11 +01:00
venus: store extension mask in renderer info
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15495>
This commit is contained in:
parent
be713e15ab
commit
2223f13b26
4 changed files with 24 additions and 0 deletions
|
|
@ -35,6 +35,16 @@ struct virgl_renderer_capset_venus {
|
||||||
|
|
||||||
/* TODO revisit this when we bump up wire_format_version to 1 */
|
/* TODO revisit this when we bump up wire_format_version to 1 */
|
||||||
uint32_t supports_blob_id_0;
|
uint32_t supports_blob_id_0;
|
||||||
|
|
||||||
|
/* Extension number N, where N is defined by the Vulkan spec, corresponds
|
||||||
|
* to bit [N / 32] & (1 << N % 32). The below mask1 covers the first 1023
|
||||||
|
* Vulkan extensions (numbered from 1 to 1023).
|
||||||
|
*
|
||||||
|
* Bit (mask1[0] & 0x1) is used for backward compatibility purpose. When
|
||||||
|
* that bit is set, the extension mask(s) are valid. Otherwise, all the
|
||||||
|
* extensions are assumed to be supported by the renderer side protocol.
|
||||||
|
*/
|
||||||
|
uint32_t vk_extension_mask1[32];
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -66,6 +66,8 @@ struct vn_renderer_info {
|
||||||
uint32_t vk_ext_command_serialization_spec_version;
|
uint32_t vk_ext_command_serialization_spec_version;
|
||||||
uint32_t vk_mesa_venus_protocol_spec_version;
|
uint32_t vk_mesa_venus_protocol_spec_version;
|
||||||
uint32_t supports_blob_id_0;
|
uint32_t supports_blob_id_0;
|
||||||
|
/* combined mask for vk_extension_mask1, 2,..., N */
|
||||||
|
uint32_t vk_extension_mask[32];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct vn_renderer_submit_batch {
|
struct vn_renderer_submit_batch {
|
||||||
|
|
|
||||||
|
|
@ -1409,6 +1409,12 @@ virtgpu_init_renderer_info(struct virtgpu *gpu)
|
||||||
capset->vk_mesa_venus_protocol_spec_version;
|
capset->vk_mesa_venus_protocol_spec_version;
|
||||||
info->supports_blob_id_0 = capset->supports_blob_id_0;
|
info->supports_blob_id_0 = capset->supports_blob_id_0;
|
||||||
|
|
||||||
|
/* ensure vk_extension_mask is large enough to hold all capset masks */
|
||||||
|
STATIC_ASSERT(sizeof(info->vk_extension_mask) >=
|
||||||
|
sizeof(capset->vk_extension_mask1));
|
||||||
|
memcpy(info->vk_extension_mask, capset->vk_extension_mask1,
|
||||||
|
sizeof(capset->vk_extension_mask1));
|
||||||
|
|
||||||
if (gpu->bo_blob_mem == VIRTGPU_BLOB_MEM_GUEST_VRAM)
|
if (gpu->bo_blob_mem == VIRTGPU_BLOB_MEM_GUEST_VRAM)
|
||||||
info->has_guest_vram = true;
|
info->has_guest_vram = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -945,6 +945,12 @@ vtest_init_renderer_info(struct vtest *vtest)
|
||||||
info->vk_mesa_venus_protocol_spec_version =
|
info->vk_mesa_venus_protocol_spec_version =
|
||||||
capset->vk_mesa_venus_protocol_spec_version;
|
capset->vk_mesa_venus_protocol_spec_version;
|
||||||
info->supports_blob_id_0 = capset->supports_blob_id_0;
|
info->supports_blob_id_0 = capset->supports_blob_id_0;
|
||||||
|
|
||||||
|
/* ensure vk_extension_mask is large enough to hold all capset masks */
|
||||||
|
STATIC_ASSERT(sizeof(info->vk_extension_mask) >=
|
||||||
|
sizeof(capset->vk_extension_mask1));
|
||||||
|
memcpy(info->vk_extension_mask, capset->vk_extension_mask1,
|
||||||
|
sizeof(capset->vk_extension_mask1));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue