venus: virtgpu: Require stable wire format

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>
(cherry picked from commit 3d3ca9b65e2dc09a765aba3c0e4b3878bd0a83bc)
This commit is contained in:
Janne Grunau
2025-04-18 18:52:25 +02:00
committed by Eric Engestrom
parent da4de27515
commit b47ada6635
2 changed files with 9 additions and 1 deletions

View File

@@ -424,7 +424,7 @@
"description": "venus: virtgpu: Require stable wire format",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

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;
}