From: Antonio Caggiano <antonio.caggiano@collabora.com>
Request Venus when initializing VirGL.
Signed-off-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Signed-off-by: Huang Rui <ray.huang@amd.com>
---
V4 -> V5:
- Add meson check to make sure unstable APIs defined from 0.9.0. (Antonio)
hw/display/virtio-gpu-virgl.c | 4 ++++
meson.build | 5 +++++
2 files changed, 9 insertions(+)
diff --git a/hw/display/virtio-gpu-virgl.c b/hw/display/virtio-gpu-virgl.c
index 7f95490e90..39c04d730c 100644
--- a/hw/display/virtio-gpu-virgl.c
+++ b/hw/display/virtio-gpu-virgl.c
@@ -887,6 +887,10 @@ int virtio_gpu_virgl_init(VirtIOGPU *g)
}
#endif
+#ifdef VIRGL_RENDERER_VENUS
+ flags |= VIRGL_RENDERER_VENUS;
+#endif
+
ret = virgl_renderer_init(g, flags, &virtio_gpu_3d_cbs);
if (ret != 0) {
error_report("virgl could not be initialized: %d", ret);
diff --git a/meson.build b/meson.build
index f7b744ab82..e4004d05b1 100644
--- a/meson.build
+++ b/meson.build
@@ -1076,6 +1076,11 @@ if not get_option('virglrenderer').auto() or have_system or have_vhost_user_gpu
cc.has_function('virgl_renderer_resource_create_blob',
prefix: '#include <virglrenderer.h>',
dependencies: virgl))
+ if virgl.version().version_compare('>= 0.9.0') and virgl.version().version_compare('< 1.0.0')
+ message('Enabling virglrenderer unstable APIs')
+ virgl = declare_dependency(compile_args: '-DVIRGL_RENDERER_UNSTABLE_APIS',
+ dependencies: virgl)
+ endif
endif
blkio = not_found
if not get_option('blkio').auto() or have_block
--
2.34.1