venus: virtgpu: Require stable wire format
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

When VMMs do not support VIRTGPU_DRM_CAPSET_VENUS the capset data
remains zeroed. By requiring the stable wire_format_version 1 this can
be detected early without initialising the renderer.

Avoids triggering `assert(capset->supports_blob_id_0);` in debug builds
under such circumstances.

Cc: mesa-stable
Signed-off-by: Janne Grunau <j@jannau.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34613>
This commit is contained in:
Janne Grunau 2025-04-18 18:52:25 +02:00 committed by Marge Bot
parent 2a4675ee9f
commit 3d3ca9b65e

View file

@ -1490,6 +1490,14 @@ virtgpu_init_capset(struct virtgpu *gpu)
return VK_ERROR_INITIALIZATION_FAILED;
}
if (gpu->capset.data.wire_format_version == 0) {
if (VN_DEBUG(INIT)) {
vn_log(gpu->instance, "Unsupported wire format version %u",
gpu->capset.data.wire_format_version);
}
return VK_ERROR_INITIALIZATION_FAILED;
}
return VK_SUCCESS;
}