Skip to content

Commit

Permalink
Experiment with mesa
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxython committed Feb 2, 2024
1 parent b9a022f commit d84142a
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 6 deletions.
10 changes: 4 additions & 6 deletions gpkg/mesa/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,16 @@ TERMUX_PKG_DESCRIPTION="An open-source implementation of the OpenGL specificatio
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_LICENSE_FILE="docs/license.rst"
TERMUX_PKG_MAINTAINER="@termux-pacman"
TERMUX_PKG_VERSION="23.3.4"
TERMUX_PKG_VERSION="23.3.5"
TERMUX_PKG_SRCURL="https://archive.mesa3d.org/mesa-${TERMUX_PKG_VERSION}.tar.xz"
TERMUX_PKG_SHA256="df12d765be4650fe532860b18aa18e6da1d0b07d1a21dfdfe04660e6b7bac39a"
TERMUX_PKG_SHA256="69ccb1278641ff5bad71ca0f866188aeb1a92aadc4dbb9d35f50aebec5b8b50f"
TERMUX_PKG_DEPENDS="libglvnd-glibc, gcc-libs-glibc, libdrm-glibc, libllvm-glibc, libexpat-glibc, zlib-glibc, zstd-glibc, libx11-glibc, libxcb-glibc, libxext-glibc, libxfixes-glibc, libxshmfence-glibc, libxxf86vm-glibc, libwayland-glibc, libvdpau-glibc, libomxil-bellagio-glibc, libva-glibc, libxml2-glibc, libelf-glibc, libbz2-glibc, libclc-glibc"
TERMUX_PKG_SUGGESTS="mesa-dev-glibc"
TERMUX_PKG_BUILD_DEPENDS="llvm-glibc, libwayland-protocols-glibc, xorgproto-glibc, glslang-glibc"
TERMUX_PKG_PYTHON_COMMON_DEPS="mako"
# disabling libunwind, microsoft-clc and valgrind will improve performance

# -D gallium-opencl=icd
# -D vulkan-drivers=amd,swrast,broadcom,panfrost,virtio,freedreno
# -Dshader-cache=true
# -D gallium-drivers=r300,r600,radeonsi,freedreno,nouveau,swrast,virgl,zink,d3d12,etnaviv,kmsro,lima,panfrost,v3d,vc4
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
-D android-libbacktrace=disabled
Expand Down Expand Up @@ -47,8 +45,8 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS="

termux_step_pre_configure() {
case $TERMUX_ARCH in
arm|aarch64) TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" -Dvulkan-drivers=swrast,freedreno -Dfreedreno-kmds=msm,kgsl";;
*) TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" -Dvulkan-drivers=swrast";;
arm|aarch64) TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" -Dvulkan-drivers=amd,swrast,freedreno -Dfreedreno-kmds=msm,kgsl";;
*) TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" -Dvulkan-drivers=amd,swrast";;
esac
LDFLAGS+=" -ltinfo -lm"
export LLVM_CONFIG=$TERMUX_PREFIX/bin/llvm-config
Expand Down
22 changes: 22 additions & 0 deletions gpkg/mesa/enable-smoothLines.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
--- src/src/broadcom/vulkan/v3dv_device.c 2024-01-24 23:01:24.000000000 +0300
+++ src/src/broadcom/vulkan/v3dv_device.c.patch 2024-01-31 11:04:04.927688286 +0300
@@ -383,7 +383,7 @@
/* VK_EXT_line_rasterization */
.rectangularLines = true,
.bresenhamLines = true,
- .smoothLines = false,
+ .smoothLines = true,
.stippledRectangularLines = false,
.stippledBresenhamLines = false,
.stippledSmoothLines = false,
--- src/src/freedreno/vulkan/tu_device.cc 2024-01-24 23:01:24.000000000 +0300
+++ src/src/freedreno/vulkan/tu_device.cc.patch 2024-01-31 11:04:37.987688273 +0300
@@ -505,7 +505,7 @@
/* VK_EXT_line_rasterization */
features->rectangularLines = true;
features->bresenhamLines = true;
- features->smoothLines = false;
+ features->smoothLines = true;
features->stippledRectangularLines = false;
features->stippledBresenhamLines = false;
features->stippledSmoothLines = false;

0 comments on commit d84142a

Please sign in to comment.