virglrenderer: add a recipe

This component enables hardware-accelerated GL inside QEMU guests.
For more information, see here:

https://lwn.net/Articles/767970/
https://www.collabora.com/news-and-blog/blog/2018/02/12/virtualizing-gpu-access/
https://www.collabora.com/news-and-blog/blog/2018/05/09/gpu-virtualization-update/

(From OE-Core rev: 27d54985e4581904d7c4e0b849e88ffa69209827)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Alexander Kanavin
2019-02-22 15:33:36 +01:00
committed by Richard Purdie
parent a3c4aaf9b3
commit 0929ec267c
4 changed files with 89 additions and 0 deletions

View File

@@ -700,6 +700,7 @@ RECIPE_MAINTAINER_pn-util-macros = "Armin Kuster <akuster808@gmail.com>"
RECIPE_MAINTAINER_pn-v86d = "Alexander Kanavin <alex.kanavin@gmail.com>"
RECIPE_MAINTAINER_pn-vala = "Alexander Kanavin <alex.kanavin@gmail.com>"
RECIPE_MAINTAINER_pn-valgrind = "Alexander Kanavin <alex.kanavin@gmail.com>"
RECIPE_MAINTAINER_pn-virglrenderer = "Alexander Kanavin <alex.kanavin@gmail.com>"
RECIPE_MAINTAINER_pn-volatile-binds = "Chen Qi <Qi.Chen@windriver.com>"
RECIPE_MAINTAINER_pn-vte = "Anuj Mittal <anuj.mittal@intel.com>"
RECIPE_MAINTAINER_pn-vulkan = "Ross Burton <ross.burton@intel.com>"

View File

@@ -0,0 +1,31 @@
From d61f7073b8ce159d21811b291c22b273b040c330 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Tue, 12 Feb 2019 12:04:52 +0100
Subject: [PATCH] Makefile.am: explicitly link with libdrm
Otherwise, a failure happens with gold linker:
../src/.libs/libvirglrenderer.so: error: undefined reference to 'drmPrimeHandleToFD'
https://errors.yoctoproject.org/Errors/Details/222046/
Upstream-Status: Accepted [https://gitlab.freedesktop.org/virgl/virglrenderer/merge_requests/153]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
src/Makefile.am | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/Makefile.am b/src/Makefile.am
index 9a0a44e..9b668c8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,5 +1,6 @@
SUBDIRS := gallium/auxiliary
AM_LDFLAGS = -lm \
+ $(LIBDRM_LIBS) \
$(GBM_LIBS) \
$(EPOXY_LIBS) \
$(X11_LIBS) \
--
2.17.1

View File

@@ -0,0 +1,38 @@
From 05c5c5f43fbffb3317bd9da27d414890d2ef493c Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Fri, 18 Jan 2019 13:47:23 +0100
Subject: [PATCH] vtest: add missing includes
This fixes build failures with musl C library
Upstream-Status: Accepted [https://gitlab.freedesktop.org/virgl/virglrenderer/merge_requests/125]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
vtest/util.c | 1 +
vtest/vtest_server.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/vtest/util.c b/vtest/util.c
index 0d3c78f..c605253 100644
--- a/vtest/util.c
+++ b/vtest/util.c
@@ -26,6 +26,7 @@
#include <stdio.h>
#include <string.h>
#include <unistd.h>
+#include <sys/select.h>
int vtest_wait_for_fd_read(int fd)
{
diff --git a/vtest/vtest_server.c b/vtest/vtest_server.c
index bc6c95f..010721f 100644
--- a/vtest/vtest_server.c
+++ b/vtest/vtest_server.c
@@ -31,6 +31,7 @@
#include <netinet/in.h>
#include <sys/un.h>
#include <fcntl.h>
+#include <string.h>
#include "util.h"
#include "vtest.h"

View File

@@ -0,0 +1,19 @@
SUMMARY = "VirGL virtual OpenGL renderer"
HOMEPAGE = "https://virgil3d.github.io/"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=c81c08eeefd9418fca8f88309a76db10"
DEPENDS = "libdrm mesa libepoxy"
SRCREV = "402c228861c9893f64cffbbcb4cb23044b8c721c"
SRC_URI = "git://anongit.freedesktop.org/virglrenderer \
file://0001-vtest-add-missing-includes.patch \
file://0001-Makefile.am-explicitly-link-with-libdrm.patch \
"
S = "${WORKDIR}/git"
inherit autotools pkgconfig
BBCLASSEXTEND = "native nativesdk"