diff mbox series

[RFC,QEMU,09/18] meson: Enable virglrenderer unstable APIs

Message ID 20230312092244.451465-10-ray.huang@amd.com (mailing list archive)
State New, archived
Headers show
Series Add VirtIO GPU and Passthrough GPU support on Xen | expand

Commit Message

Huang Rui March 12, 2023, 9:22 a.m. UTC
From: Antonio Caggiano <antonio.caggiano@collabora.com>

Also, use alternatives to meson compiler has_function, which does not
work properly on my development environment.

Signed-off-by: Antonio Caggiano <antonio.caggiano@collabora.com>
---
 meson.build | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/meson.build b/meson.build
index 826b3473c4..8cd453844f 100644
--- a/meson.build
+++ b/meson.build
@@ -774,13 +774,16 @@  if not get_option('virglrenderer').auto() or have_system or have_vhost_user_gpu
                      method: 'pkg-config',
                      required: get_option('virglrenderer'),
                      kwargs: static_kwargs)
+  virgl = declare_dependency(compile_args: '-DVIRGL_RENDERER_UNSTABLE_APIS',
+                             dependencies: virgl)
+
   config_host_data.set('HAVE_VIRGL_RESOURCE_BLOB',
-		       cc.has_function('virgl_renderer_resource_create_blob',
+                       cc.has_type('struct virgl_renderer_resource_create_blob_args',
 				       prefix: '#include <virglrenderer.h>',
 				       dependencies: virgl))
   config_host_data.set('HAVE_VIRGL_CONTEXT_INIT',
-                       cc.has_function('virgl_renderer_context_create_with_flags',
-                                       prefix: '#include <virglrenderer.h>',
+                       cc.has_header_symbol('virglrenderer.h',
+                                       'VIRGL_RENDERER_CONTEXT_FLAG_CAPSET_ID_MASK',
                                        dependencies: virgl))
 endif
 blkio = not_found