[packages/virglrenderer] - updated to 1.1.1, enabled venus (vulkan) and video (libva) acceleration
qboosh
qboosh at pld-linux.org
Tue Aug 26 18:57:24 CEST 2025
commit c57e19aecf64cd8851a79f14858229b45ead8577
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Tue Aug 26 19:00:05 2025 +0200
- updated to 1.1.1, enabled venus (vulkan) and video (libva) acceleration
virglrenderer-types.patch | 92 +++++++++++++++++++++++++++++++++++++++++++++++
virglrenderer.spec | 60 ++++++++++++++++++++++++-------
2 files changed, 139 insertions(+), 13 deletions(-)
---
diff --git a/virglrenderer.spec b/virglrenderer.spec
index 97e7a7d..20a0c88 100644
--- a/virglrenderer.spec
+++ b/virglrenderer.spec
@@ -1,25 +1,44 @@
# TODO: optional percetto>=0.0.8 or vperfetto_min or sysprof>=3.38.0 for tracing
-# venus renderer? (-Dvenus=true, BR: libgbm, libvulkan, opt. libminijail)
-# video support? (-Dvideo=true, BR: libva, libva-drm)
+# optional minijail support in venus renderer? (Android specific?)
#
# Conditional build:
%bcond_without static_libs # static library
+%bcond_with drm_amdgpu # AMDGPU DRM native-context renderer (experimental)
+%bcond_without drm_msm # MSM DRM native-context renderer
+%bcond_without va # video accelleration via libva
+%bcond_without vulkan # venus renderer
#
+%ifnarch aarch64
+%undefine with_drm_msm
+%endif
+%if %{with drm_amdgpu}
+%define libdrm_ver 2.4.50
+%else
+# actually it's libdrm_amdgpu library dependency, but it isnt'a a separate package in PLD
+%define libdrm_ver 2.4.121
+%endif
Summary: VirGL virtual OpenGL renderer library
Summary(pl.UTF-8): VirGL - biblioteka wirtualnego renderera OpenGL
Name: virglrenderer
-Version: 1.0.1
+Version: 1.1.1
Release: 1
License: MIT
Group: Libraries
#Source0Download: https://gitlab.freedesktop.org/virgl/virglrenderer/-/tags
Source0: https://gitlab.freedesktop.org/virgl/virglrenderer/-/archive/%{version}/%{name}-%{version}.tar.bz2
-# Source0-md5: c3d2785352a8e612858017d61377b74d
+# Source0-md5: 2c7588e8ced5053224f9bb5330f9bad6
+Patch0: %{name}-types.patch
URL: https://virgil3d.github.io/
BuildRequires: Mesa-libgbm-devel
+%{?with_vulkan:BuildRequires: Vulkan-Loader-devel}
BuildRequires: check-devel >= 0.9.4
-BuildRequires: libdrm-devel >= 2.4.50
+BuildRequires: gcc >= 6:4.1
+BuildRequires: libdrm-devel >= %{libdrm_ver}
BuildRequires: libepoxy-devel >= 1.5.4
+%if %{with va}
+BuildRequires: libva-devel
+BuildRequires: libva-drm-devel
+%endif
BuildRequires: meson >= 0.55
BuildRequires: ninja >= 1.5
BuildRequires: pkgconfig
@@ -27,7 +46,7 @@ BuildRequires: python3
BuildRequires: rpmbuild(macros) >= 2.042
BuildRequires: sed >= 4.0
BuildRequires: xorg-lib-libX11-devel
-Requires: libdrm >= 2.4.50
+Requires: libdrm >= %{libdrm_ver}
Requires: libepoxy >= 1.5.4
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -42,6 +61,17 @@ Summary: Header file for virglrenderer library
Summary(pl.UTF-8): Plik nagłówkowy biblioteki virglrenderer
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
+Requires: Mesa-libgbm-devel
+%if %{with vulkan}
+Requires: Vulkan-Loader-devel
+%endif
+Requires: libdrm-devel >= %{libdrm_ver}
+Requires: libepoxy-devel >= 1.5.4
+%if %{with va}
+Requires: libva-devel
+Requires: libva-drm-devel
+%endif
+Requires: xorg-lib-libX11-devel
%description devel
Header file for virglrenderer library.
@@ -63,14 +93,15 @@ Statyczna biblioteka virglrenderer.
%prep
%setup -q
-
-%if %{with static_libs}
-%{__sed} -i -e '/^libvirglrenderer = / s/shared_library/library/' src/meson.build
-%endif
+%patch -P0 -p1
%build
+drm_renderers="%{?with_drm_amdgpu:amdgpu-experimental} %{?with_drm_msm:msm}"
%meson \
- %{!?with_static_libs:--default-library=shared}
+ %{!?with_static_libs:--default-library=shared} \
+ -Ddrm-renderers="$(echo $drm_renderers | tr ' ' ',')" \
+ %{?with_vulkan:-Dvenus=true} \
+ %{?with_va:-Dvideo=true}
%meson_build
@@ -90,11 +121,14 @@ rm -rf $RPM_BUILD_ROOT
%doc COPYING
%attr(755,root,root) %{_bindir}/virgl_test_server
%attr(755,root,root) %{_libdir}/libvirglrenderer.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libvirglrenderer.so.1
+%ghost %{_libdir}/libvirglrenderer.so.1
+%if %{with vulkan}
+%attr(755,root,root) %{_libexecdir}/virgl_render_server
+%endif
%files devel
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libvirglrenderer.so
+%{_libdir}/libvirglrenderer.so
%{_includedir}/virgl
%{_pkgconfigdir}/virglrenderer.pc
diff --git a/virglrenderer-types.patch b/virglrenderer-types.patch
new file mode 100644
index 0000000..872a40c
--- /dev/null
+++ b/virglrenderer-types.patch
@@ -0,0 +1,92 @@
+--- virglrenderer-1.1.1/src/drm/amdgpu/amdgpu_renderer.c.orig 2025-04-02 14:24:35.000000000 +0200
++++ virglrenderer-1.1.1/src/drm/amdgpu/amdgpu_renderer.c 2025-08-26 06:20:36.831641271 +0200
+@@ -376,7 +376,7 @@ amdgpu_renderer_get_blob(struct virgl_co
+
+ /* If GEM_NEW fails, we can end up here without a backing obj or if it's a dumb buffer. */
+ if (!obj) {
+- print(0, "No object with blob_id=%ld", blob_id);
++ print(0, "No object with blob_id=%" PRId64, blob_id);
+ return -ENOENT;
+ }
+
+@@ -389,7 +389,7 @@ amdgpu_renderer_get_blob(struct virgl_co
+ * to the same storage.
+ */
+ if (obj->exported) {
+- print(0, "Already exported! blob_id:%ld", blob_id);
++ print(0, "Already exported! blob_id:%" PRId64, blob_id);
+ return -EINVAL;
+ }
+
+@@ -401,7 +401,7 @@ amdgpu_renderer_get_blob(struct virgl_co
+ ret = amdgpu_bo_export(obj->bo, amdgpu_bo_handle_type_dma_buf_fd, (uint32_t *)&fd);
+
+ if (ret) {
+- print(0, "Export to fd failed for blob_id:%ld r=%d (%s)", blob_id, ret, strerror(errno));
++ print(0, "Export to fd failed for blob_id:%" PRId64 " r=%d (%s)", blob_id, ret, strerror(errno));
+ return ret;
+ }
+
+@@ -480,7 +480,7 @@ amdgpu_ccmd_gem_new(struct drm_context *
+ goto alloc_failed;
+ }
+ if (!drm_context_blob_id_valid(dctx, req->blob_id)) {
+- print(0, "Invalid blob_id %ld", req->blob_id);
++ print(0, "Invalid blob_id %" PRId64, req->blob_id);
+ ret = -EINVAL;
+ goto alloc_failed;
+ }
+@@ -518,7 +518,7 @@ amdgpu_ccmd_gem_new(struct drm_context *
+
+ drm_context_object_set_blob_id(dctx, &obj->base, req->blob_id);
+
+- print(2, "new object blob_id: %ld heap: %08x flags: %lx size: %ld",
++ print(2, "new object blob_id: %" PRId64 " heap: %08x flags: %" PRIx64 " size: %" PRId64,
+ req->blob_id, req->r.preferred_heap, req->r.flags, req->r.alloc_size);
+
+ return 0;
+@@ -527,7 +527,7 @@ va_map_failed:
+ amdgpu_bo_free(bo_handle);
+
+ alloc_failed:
+- print(2, "ERROR blob_id: %ld heap: %08x flags: %lx",
++ print(2, "ERROR blob_id: %" PRId64 " heap: %08x flags: %" PRIx64,
+ req->blob_id, req->r.preferred_heap, req->r.flags);
+ if (ctx->shmem)
+ ctx->shmem->async_error++;
+@@ -558,7 +558,7 @@ amdgpu_ccmd_bo_va_op(struct drm_context
+ } else {
+ obj = amdgpu_get_object_from_res_id(ctx, req->res_id, __FUNCTION__);
+ if (!obj) {
+- print(0, "amdgpu_bo_va_op_raw failed: op: %d res_id: %d offset: 0x%lx size: 0x%lx va: %" PRIx64 " r=%d",
++ print(0, "amdgpu_bo_va_op_raw failed: op: %d res_id: %d offset: 0x%" PRIx64 " size: 0x%" PRIx64 " va: %" PRIx64 " r=%d",
+ req->op, obj->base.res_id, req->offset, req->vm_map_size, req->va, rsp->ret);
+
+ /* This is ok. This means the guest closed the GEM already. */
+@@ -574,7 +574,7 @@ amdgpu_ccmd_bo_va_op(struct drm_context
+ if (ctx->shmem)
+ ctx->shmem->async_error++;
+
+- print(0, "amdgpu_bo_va_op_raw failed: op: %d res_id: %d offset: 0x%lx size: 0x%lx va: %" PRIx64 " r=%d",
++ print(0, "amdgpu_bo_va_op_raw failed: op: %d res_id: %d offset: 0x%" PRIx64 " size: 0x%" PRIx64 " va: %" PRIx64 " r=%d",
+ req->op, req->res_id, req->offset, req->vm_map_size, req->va, rsp->ret);
+ } else {
+ print(2, "va_op %d res_id: %u va: [0x%" PRIx64 ", 0x%" PRIx64 "] @offset 0x%" PRIx64,
+@@ -1008,7 +1008,7 @@ amdgpu_ccmd_cs_submit(struct drm_context
+
+ drmSyncobjDestroy(amdgpu_device_get_fd(ctx->dev), syncobj_out.handle);
+
+- print(3, "ctx: %d -> seqno={v=%d a=%ld} r=%d", req->ctx_id, hdr->seqno, seqno, r);
++ print(3, "ctx: %d -> seqno={v=%d a=%" PRId64 "} r=%d", req->ctx_id, hdr->seqno, seqno, r);
+
+ end:
+ if (bo_list)
+@@ -1135,7 +1135,7 @@ amdgpu_renderer_submit_fence(struct virg
+ return 0;
+ }
+
+- print(3, "ring_idx: %d fence_id: %lu", ring_idx, fence_id);
++ print(3, "ring_idx: %d fence_id: %" PRIu64, ring_idx, fence_id);
+ return drm_timeline_submit_fence(&ctx->timelines[ring_idx - 1], flags, fence_id);
+ }
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/virglrenderer.git/commitdiff/c57e19aecf64cd8851a79f14858229b45ead8577
More information about the pld-cvs-commit
mailing list