Remove check of VIRGL_CAP_V2_UNTYPED_RESOURCE flag in
virgl_resource_from_handle() so that guest can still call
into virglrenderer to import external vulkan resource via
OpenGL APIs even if egl is not initialized.
Signed-off-by: Julia Zhang <julia.zhang@amd.com>
Signed-off-by: Huang Rui <ray.huang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23680>
/* assign blob resource a type in case it was created untyped */
if (res->blob_mem && plane == 0 &&
- (vs->caps.caps.v2.capability_bits_v2 & VIRGL_CAP_V2_UNTYPED_RESOURCE)) {
+ (vs->caps.caps.v2.host_feature_check_version >= 18 ||
+ (vs->caps.caps.v2.capability_bits_v2 & VIRGL_CAP_V2_UNTYPED_RESOURCE))) {
uint32_t plane_strides[VIRGL_MAX_PLANE_COUNT];
uint32_t plane_offsets[VIRGL_MAX_PLANE_COUNT];
uint32_t plane_count = 0;