[PATCH v12 03/13] virtio-gpu: Use pkgconfig version to decide which virgl features are available

Dmitry Osipenko posted 13 patches 1 year, 10 months ago
There is a newer version of this series
[PATCH v12 03/13] virtio-gpu: Use pkgconfig version to decide which virgl features are available
Posted by Dmitry Osipenko 1 year, 10 months ago
New virglrerenderer features were stabilized with release of v1.0.0.
Presence of symbols in virglrenderer.h doesn't guarantee ABI compatibility
with pre-release development versions of libvirglerender. Use virglrenderer
version to decide reliably which virgl features are available.

Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
---
 meson.build | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/meson.build b/meson.build
index a9de71d45064..413ec5179145 100644
--- a/meson.build
+++ b/meson.build
@@ -2301,11 +2301,8 @@ config_host_data.set('CONFIG_PNG', png.found())
 config_host_data.set('CONFIG_VNC', vnc.found())
 config_host_data.set('CONFIG_VNC_JPEG', jpeg.found())
 config_host_data.set('CONFIG_VNC_SASL', sasl.found())
-if virgl.found()
-  config_host_data.set('HAVE_VIRGL_D3D_INFO_EXT',
-                       cc.has_member('struct virgl_renderer_resource_info_ext', 'd3d_tex2d',
-                                     prefix: '#include <virglrenderer.h>',
-                                     dependencies: virgl))
+if virgl.version().version_compare('>=1.0.0')
+  config_host_data.set('HAVE_VIRGL_D3D_INFO_EXT', 1)
 endif
 config_host_data.set('CONFIG_VIRTFS', have_virtfs)
 config_host_data.set('CONFIG_VTE', vte.found())
-- 
2.44.0
Re: [PATCH v12 03/13] virtio-gpu: Use pkgconfig version to decide which virgl features are available
Posted by Alex Bennée 1 year, 10 months ago
Dmitry Osipenko <dmitry.osipenko@collabora.com> writes:

> New virglrerenderer features were stabilized with release of v1.0.0.
> Presence of symbols in virglrenderer.h doesn't guarantee ABI compatibility
> with pre-release development versions of libvirglerender. Use virglrenderer
> version to decide reliably which virgl features are available.

Is the requirement for 087e9a96d13 (venus: make cross-device optional)
on the host or guest side? Because I can't see its in a tagged version.

> --- a/meson.build
> +++ b/meson.build
> @@ -2301,11 +2301,8 @@ config_host_data.set('CONFIG_PNG', png.found())
>  config_host_data.set('CONFIG_VNC', vnc.found())
>  config_host_data.set('CONFIG_VNC_JPEG', jpeg.found())
>  config_host_data.set('CONFIG_VNC_SASL', sasl.found())
> -if virgl.found()
> -  config_host_data.set('HAVE_VIRGL_D3D_INFO_EXT',
> -                       cc.has_member('struct virgl_renderer_resource_info_ext', 'd3d_tex2d',
> -                                     prefix: '#include <virglrenderer.h>',
> -                                     dependencies: virgl))
> +if virgl.version().version_compare('>=1.0.0')
> +  config_host_data.set('HAVE_VIRGL_D3D_INFO_EXT', 1)
>  endif

If all the host side needs is 1.0.0 then:

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro
Re: [PATCH v12 03/13] virtio-gpu: Use pkgconfig version to decide which virgl features are available
Posted by Dmitry Osipenko 1 year, 10 months ago
On 5/22/24 15:48, Alex Bennée wrote:
>> New virglrerenderer features were stabilized with release of v1.0.0.
>> Presence of symbols in virglrenderer.h doesn't guarantee ABI compatibility
>> with pre-release development versions of libvirglerender. Use virglrenderer
>> version to decide reliably which virgl features are available.
> Is the requirement for 087e9a96d13 (venus: make cross-device optional)
> on the host or guest side? Because I can't see its in a tagged version.

It's required only on guest side. Mesa 24.2 hasn't been tagged yet.

-- 
Best regards,
Dmitry