Skip to content
Merged
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
4 changes: 1 addition & 3 deletions .github/actions/compile/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,7 @@ runs:
shell: bash
run: |
cd ${{ github.workspace }}/mesa
for patch in ../patches/*.patch; do
patch -p1 --fuzz=3 < "$patch"
done
../apply_patches.py ${{ inputs.mesa-tag }}
if [[ "${{ runner.os }}" == "macOS" ]]; then
eval "$(brew shellenv)"
touch include/xf86drm.h
Expand Down
12 changes: 12 additions & 0 deletions apply_patches.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env python3
import sys, os, pathlib, email.parser
from packaging.version import Version
from packaging.specifiers import SpecifierSet

assert len(sys.argv) == 2, f"usage: {sys.argv[0]} MESA_TAG"
mesa_ver = Version(sys.argv[1].split('-')[1])
parser = email.parser.HeaderParser()

for p in (pathlib.Path(__file__).parent / 'patches').iterdir():
if mesa_ver in SpecifierSet(parser.parse(p.open()).get('Mesa-Version', '')):
os.system(f"patch -p1 --fuzz=3 -i {p}")
32 changes: 32 additions & 0 deletions patches/0002-nak-hardcode-const-offsets.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
From: Christopher Milan <chrismilan@ucla.edu>
Date: Fri, 19 Jun 2026 18:13:03 -0700
Subject: [PATCH] nak: hardcode const offsets
Mesa-Version: >=26.1

NAK doesn't depend on NVK

---
src/nouveau/compiler/nak_private.h | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/nouveau/compiler/nak_private.h b/src/nouveau/compiler/nak_private.h
index 588eb897eb4..dbaf9c340ae 100644
--- a/src/nouveau/compiler/nak_private.h
+++ b/src/nouveau/compiler/nak_private.h
@@ -347,11 +347,8 @@ enum nak_fs_out {
static inline const struct nak_constant_offset_info*
nak_const_offsets(const struct nak_compiler* nak, bool is_graphics)
{
- if (nak->sm >= 75 && is_graphics) {
- return &nak_const_offsets_turing_graphics;
- } else {
- return &nak_const_offsets_base;
- }
+ static const struct nak_constant_offset_info base = {};
+ return &base;
}

bool nak_nir_rematerialize_load_const(nir_shader *nir);
--
2.52.0

Loading