Skip to content

Commit

Permalink
virglrenderer: enable venus
Browse files Browse the repository at this point in the history
  • Loading branch information
xMeM committed Feb 1, 2024
1 parent cc9c496 commit 9bdcceb
Show file tree
Hide file tree
Showing 3 changed files with 405 additions and 2 deletions.
22 changes: 22 additions & 0 deletions x11-packages/virglrenderer/anon_file.c.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/src/mesa/util/anon_file.c b/src/mesa/util/anon_file.c
index d4faa2fe..20c69fdd 100644
--- a/src/mesa/util/anon_file.c
+++ b/src/mesa/util/anon_file.c
@@ -36,7 +36,7 @@

#if defined(HAVE_MEMFD_CREATE) || defined(__FreeBSD__) || defined(__OpenBSD__)
#include <sys/mman.h>
-#elif defined(ANDROID)
+#elif defined(__ANDROID__)
#include <sys/syscall.h>
#include <linux/memfd.h>
#else
@@ -118,7 +118,7 @@ os_create_anonymous_file(off_t size, const char *debug_name)
if (!debug_name)
debug_name = "mesa-shared";
fd = memfd_create(debug_name, MFD_CLOEXEC | MFD_ALLOW_SEALING);
-#elif defined(ANDROID)
+#elif defined(__ANDROID__)
if (!debug_name)
debug_name = "mesa-shared";
fd = syscall(SYS_memfd_create, debug_name, MFD_CLOEXEC | MFD_ALLOW_SEALING);
6 changes: 4 additions & 2 deletions x11-packages/virglrenderer/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ TERMUX_PKG_VERSION="1.0.1"
TERMUX_PKG_SRCURL=https://gitlab.freedesktop.org/virgl/virglrenderer/-/archive/virglrenderer-${TERMUX_PKG_VERSION}/virglrenderer-virglrenderer-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=446ab3e265f574ec598e77bdfbf0616ee3c77361f0574bec733ba4bac4df730a
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_DEPENDS="libdrm, libepoxy, libglvnd, libx11, mesa"
TERMUX_PKG_DEPENDS="libdrm, libepoxy, libglvnd, libx11, mesa, vulkan-loader"
TERMUX_PKG_BUILD_DEPENDS="xorgproto"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="-Dplatforms=egl,glx"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="-Dplatforms=egl,glx -Dvenus=true"
TERMUX_PKG_API_LEVEL=28

termux_step_pre_configure() {
# error: using an array subscript expression within 'offsetof' is a Clang extension [-Werror,-Wgnu-offsetof-extensions]
# list_for_each_entry_safe(struct vrend_linked_shader_program, ent, &shader->programs, sl[shader->sel->type])
CPPFLAGS+=" -Wno-error=gnu-offsetof-extensions"
LDFLAGS+=" -landroid"
}
Loading

0 comments on commit 9bdcceb

Please sign in to comment.