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:

committed by
Eric Engestrom

parent
da4de27515
commit
b47ada6635
@@ -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
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user