Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions packages/mesa/0004-do-not-check-xlocale.patch
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
+++ ./meson.build
@@ -1403,8 +1403,8 @@
@@ -1462,9 +1462,8 @@ if not ['linux'].contains(host_machine.system())
endif
endif

-foreach h : ['xlocale.h', 'linux/futex.h', 'endian.h', 'dlfcn.h', 'sys/shm.h',
- 'cet.h', 'pthread_np.h', 'sys/inotify.h', 'linux/udmabuf.h']
- 'cet.h', 'pthread_np.h', 'poll.h', 'sys/inotify.h',
- 'linux/udmabuf.h']
+foreach h : ['linux/futex.h', 'endian.h', 'dlfcn.h', 'sys/shm.h',
+ 'cet.h', 'pthread_np.h', 'sys/inotify.h']
+ 'cet.h', 'pthread_np.h', 'poll.h', 'sys/inotify.h']
if cc.check_header(h)
pre_args += '-DHAVE_@0@'.format(h.to_upper().underscorify())
endif
18 changes: 12 additions & 6 deletions packages/mesa/0016-unofficial_support_adreno_710_720.patch
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ https://gitlab.freedesktop.org/mesa/mesa/-/issues/13036

--- a/src/freedreno/common/freedreno_devices.py
+++ b/src/freedreno/common/freedreno_devices.py
@@ -1065,6 +1065,42 @@ add_gpus([
@@ -1171,6 +1171,46 @@ add_gpus([
raw_magic_regs = a730_raw_magic_regs,
))

Expand All @@ -20,6 +20,8 @@ https://gitlab.freedesktop.org/mesa/mesa/-/issues/13036
+ num_ccu = 4,
+ tile_align_w = 64,
+ tile_align_h = 32,
+ tile_max_w = 1024,
+ tile_max_h = 1024,
+ num_vsc_pipes = 32,
+ cs_shared_mem_size = 32 * 1024,
+ wave_granularity = 2,
Expand All @@ -38,6 +40,8 @@ https://gitlab.freedesktop.org/mesa/mesa/-/issues/13036
+ num_ccu = 4,
+ tile_align_w = 64,
+ tile_align_h = 32,
+ tile_max_w = 1024,
+ tile_max_h = 1024,
+ num_vsc_pipes = 32,
+ cs_shared_mem_size = 32 * 1024,
+ wave_granularity = 2,
Expand All @@ -50,11 +54,13 @@ https://gitlab.freedesktop.org/mesa/mesa/-/issues/13036
add_gpus([
GPUId(chip_id=0x07030001, name="FD730"), # KGSL, no speedbin data
GPUId(chip_id=0xffff07030001, name="FD730"), # Default no-speedbin fallback
diff --git a/src/freedreno/drm-shim/freedreno_noop.c b/src/freedreno/drm-shim/freedreno_noop.c
index 4c3e817fce7..bdfba0f5613 100644
--- a/src/freedreno/drm-shim/freedreno_noop.c
+++ b/src/freedreno/drm-shim/freedreno_noop.c
@@ -237,6 +237,16 @@ static const struct msm_device_info device_infos[] = {
.chip_id = CHIPID(6, 6, 0, 0xff),
.gmem_size = 1024 * 1024 + 512 * 1024,
@@ -236,6 +236,16 @@ static const struct msm_device_info device_infos[] = {
.chip_id = CHIPID(5, 1, 0, 0xff),
.gmem_size = 256 * 1024,
},
+ {
+ .gpu_id = 710
Expand All @@ -67,5 +73,5 @@ https://gitlab.freedesktop.org/mesa/mesa/-/issues/13036
+ .gmem_size = 2 * 1024 * 1024,
+ },
{
.gpu_id = 730,
.chip_id = 0x07030001,
.gpu_id = 530,
.chip_id = CHIPID(5, 3, 0, 2),
85 changes: 85 additions & 0 deletions packages/mesa/0019-unofficial-support-adreno-830.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
Modified based on Adreno 840, most features should work.

--- a/src/freedreno/common/freedreno_devices.py
+++ b/src/freedreno/common/freedreno_devices.py
@@ -1499,28 +1499,6 @@ a8xx_gen2 = GPUProps(
has_fs_tex_prefetch = False,
)

-# Totally fake, just to get cffdump to work:
-add_gpus([
- GPUId(chip_id=0x44050000, name="FD830"),
- ], A6xxGPUInfo(
- CHIP.A8XX,
- [a7xx_base, a7xx_gen3, a8xx_base],
- num_ccu = 6,
- num_slices = 3,
- tile_align_w = 64,
- tile_align_h = 32,
- tile_max_w = 16384,
- tile_max_h = 16384,
- num_vsc_pipes = 32,
- cs_shared_mem_size = 32 * 1024,
- wave_granularity = 2,
- fibers_per_sp = 128 * 2 * 16,
- magic_regs = dict(
- ),
- raw_magic_regs = [
- ],
- ))
-
# For a8xx, the chicken bit and most other non-ctx reg
# programming moves into the kernel, and what remains
# should be easier to share between devices
@@ -1555,6 +1533,29 @@ a8xx_gen2_raw_magic_regs = [
[A6XXRegs.REG_A8XX_PC_MODE_CNTL, 0x00003f00],
]

+# Modified based on Adreno 840, most features should work
+add_gpus([
+ GPUId(chip_id=0x44050001, name="Adreno (TM) 830"),
+ GPUId(chip_id=0xffff44050001, name="Adreno (TM) 830"),
+ ], A6xxGPUInfo(
+ CHIP.A8XX,
+ [a7xx_base, a7xx_gen3, a8xx_base, a8xx_gen2,
+ GPUProps(shading_rate_matches_vk = True)],
+ num_ccu = 6,
+ num_slices = 3,
+ tile_align_w = 96,
+ tile_align_h = 32,
+ tile_max_w = 16416,
+ tile_max_h = 16384,
+ num_vsc_pipes = 32,
+ cs_shared_mem_size = 32 * 1024,
+ wave_granularity = 2,
+ fibers_per_sp = 128 * 2 * 16,
+ magic_regs = dict(
+ ),
+ raw_magic_regs = a8xx_gen2_raw_magic_regs,
+ ))
+
add_gpus([
GPUId(chip_id=0xffff44050A31, name="Adreno (TM) 840"),
], A6xxGPUInfo(
--- a/src/freedreno/drm-shim/freedreno_noop.c
+++ b/src/freedreno/drm-shim/freedreno_noop.c
@@ -288,7 +288,7 @@ static const struct msm_device_info device_infos[] = {
},
{
.gpu_id = 830,
- .chip_id = 0x44050000,
+ .chip_id = 0x44050001,
.gmem_size = 12 * 1024 * 1024,
},
};
--- a/src/freedreno/ir3/tests/disasm.c
+++ b/src/freedreno/ir3/tests/disasm.c
@@ -33,7 +33,7 @@
#define INSTR_6XX_RAW(i, d, ...) { .gpu_id = 630, .instr = NULL, .instr_raw = i, .expected = d, __VA_ARGS__ }
#define INSTR_7XX(i, d, ...) { .chip_id = 0x07030001, .instr = #i, .instr_raw = 0, .expected = d, __VA_ARGS__ }
#define INSTR_7XX_RAW(i, d, ...) { .chip_id = 0x07030001, .instr = NULL, .instr_raw = i, .expected = d, __VA_ARGS__ }
-#define INSTR_8XX(i, d, ...) { .chip_id = 0x44050000, .instr = #i, .instr_raw = 0, .expected = d, __VA_ARGS__ }
+#define INSTR_8XX(i, d, ...) { .chip_id = 0x44050001, .instr = #i, .instr_raw = 0, .expected = d, __VA_ARGS__ }
/* clang-format on */

static const struct test {
24 changes: 24 additions & 0 deletions packages/mesa/0020-UBWC_5-and-UBWC_6-support.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
From 2da45c609845854491c09bd26d9d8245834ea4af Mon Sep 17 00:00:00 2001
From: Rob Clark <rob.clark@oss.qualcomm.com>
Date: Tue, 13 Jan 2026 10:58:51 -0800
Subject: [PATCH] WIP: tu/kgsl: Add UBWC_5 and UBWC_6 support

The #defines seem to map 1:1, so we can add support even without an
updated kgsl uabi header.
---
src/freedreno/vulkan/tu_knl_kgsl.cc | 2 ++
1 file changed, 2 insertions(+)

diff --git a/src/freedreno/vulkan/tu_knl_kgsl.cc b/src/freedreno/vulkan/tu_knl_kgsl.cc
index e3a49692e941..48a0f8802e1a 100644
--- a/src/freedreno/vulkan/tu_knl_kgsl.cc
+++ b/src/freedreno/vulkan/tu_knl_kgsl.cc
@@ -1842,6 +1842,8 @@ tu_knl_kgsl_load(struct tu_instance *instance, int fd)
device->ubwc_config.macrotile_mode = FDL_MACROTILE_4_CHANNEL;
break;
case KGSL_UBWC_4_0:
+ case 5:
+ case 6:
device->ubwc_config.bank_swizzle_levels = 0x6;
device->ubwc_config.macrotile_mode = FDL_MACROTILE_8_CHANNEL;
break;
7 changes: 4 additions & 3 deletions packages/mesa/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ 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"
TERMUX_PKG_VERSION="25.3.4"
TERMUX_PKG_SRCURL=https://archive.mesa3d.org/mesa-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=3a0fc6ec070b45ae25dc2ccb5e52fae1d89141f7c39c4a91fe4eaa80dfff9deb
TERMUX_PKG_VERSION="26.1.0"
TERMUX_PKG_SRCURL=git+https://gitlab.freedesktop.org/mesa/mesa.git
TERMUX_PKG_GIT_BRANCH=main
_COMMIT=6ea4fe9806b93ee9c4f0dd1b571e4a4a52c666ca
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_DEPENDS="libandroid-shmem, libc++, libdrm, libglvnd, libllvm (<< $TERMUX_LLVM_NEXT_MAJOR_VERSION), libwayland, libx11, libxext, libxfixes, libxshmfence, libxxf86vm, ncurses, vulkan-loader, zlib, zstd"
TERMUX_PKG_SUGGESTS="mesa-dev"
Expand Down