@@ -1,4 +1,4 @@
-From 027ac36756cc75eea9ed4fee135a351af30b35fd Mon Sep 17 00:00:00 2001
+From 66d73feaac088d1a588a44a1780f2eaf4335fccf Mon Sep 17 00:00:00 2001
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Date: Tue, 16 Jul 2024 12:32:47 +0300
Subject: [PATCH] freedreno: don't encode build path into binaries
@@ -13,33 +13,76 @@ it manually when running the tests.
Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30206]
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
+ meson.build | 1 +
+ meson_options.txt | 7 +++++++
src/freedreno/afuc/meson.build | 4 ++++
src/freedreno/decode/meson.build | 4 +++-
- src/freedreno/meson.build | 2 +-
- 3 files changed, 8 insertions(+), 2 deletions(-)
+ src/freedreno/meson.build | 5 ++++-
+ 5 files changed, 19 insertions(+), 2 deletions(-)
+diff --git a/meson.build b/meson.build
+index 3bc837813f967..5c94e76649c63 100644
+--- a/meson.build
++++ b/meson.build
+@@ -76,6 +76,7 @@ if with_tools.contains('all')
+ 'imagination',
+ ]
+ endif
++with_tools_for_development = get_option('tools-for-development')
+
+ with_any_vulkan_layers = get_option('vulkan-layers').length() != 0
+ with_intel_tools = with_tools.contains('intel') or with_tools.contains('intel-ui')
+diff --git a/meson_options.txt b/meson_options.txt
+index 753bebd961e3f..9bc308b512c13 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -537,6 +537,13 @@ option(
+ description : 'List of tools to build. (Note: `intel-ui` selects `intel`)',
+ )
+
++option(
++ 'tools-for-development',
++ type : 'boolean',
++ value : false,
++ description : 'Support running tools from the build tree (for developers)',
++)
++
+ option(
+ 'power8',
+ type : 'feature',
diff --git a/src/freedreno/afuc/meson.build b/src/freedreno/afuc/meson.build
-index bb7cebf5a748..351cc31ef2de 100644
+index bb7cebf5a748c..351cc31ef2dec 100644
--- a/src/freedreno/afuc/meson.build
+++ b/src/freedreno/afuc/meson.build
-@@ -56,6 +56,7 @@ if with_tests
+@@ -56,10 +56,12 @@ if with_tests
asm_fw = custom_target('afuc_test.fw',
output: 'afuc_test.fw',
- command: [asm, '-g', '6', files('../.gitlab-ci/traces/afuc_test.asm'), '@OUTPUT@'],
+ command: [asm, files('../.gitlab-ci/traces/afuc_test.asm'), '@OUTPUT@'],
++ env: {'RNN_PATH': rnn_src_path},
+ )
+ asm_fw_a7xx = custom_target('afuc_test_a7xx.fw',
+ output: 'afuc_test_a7xx.fw',
+ command: [asm, files('../.gitlab-ci/traces/afuc_test_a7xx.asm'), '@OUTPUT@'],
+ env: {'RNN_PATH': rnn_src_path},
)
test('afuc-asm',
diff,
-@@ -120,6 +122,7 @@ if cc.sizeof('size_t') > 4
+@@ -120,11 +122,13 @@ if cc.sizeof('size_t') > 4
disasm_fw = custom_target('afuc_test.asm',
output: 'afuc_test.asm',
- command: [disasm, '-u', files('../.gitlab-ci/reference/afuc_test.fw'), '-g', '630'],
+ command: [disasm, '-u', files('../.gitlab-ci/reference/afuc_test.fw')],
++ env: {'RNN_PATH': rnn_src_path},
+ capture: true
+ )
+ disasm_fw_a7xx = custom_target('afuc_test_a7xx.asm',
+ output: 'afuc_test_a7xx.asm',
+ command: [disasm, '-u', files('../.gitlab-ci/reference/afuc_test_a7xx.fw')],
+ env: {'RNN_PATH': rnn_src_path},
capture: true
)
test('afuc-disasm',
diff --git a/src/freedreno/decode/meson.build b/src/freedreno/decode/meson.build
-index 469eeb4eb597..dfa1c12d0d9f 100644
+index 469eeb4eb5975..915ba11af3b33 100644
--- a/src/freedreno/decode/meson.build
+++ b/src/freedreno/decode/meson.build
@@ -194,6 +194,7 @@ if dep_lua.found() and dep_libarchive.found()
@@ -61,18 +104,20 @@ index 469eeb4eb597..dfa1c12d0d9f 100644
test('crashdec-' + name,
diff --git a/src/freedreno/meson.build b/src/freedreno/meson.build
-index 98e49b8fcf0e..145e72597eb9 100644
+index 98e49b8fcf0e9..f8bdc5299841b 100644
--- a/src/freedreno/meson.build
+++ b/src/freedreno/meson.build
-@@ -6,7 +6,7 @@ inc_freedreno_rnn = include_directories('rnn')
+@@ -6,7 +6,10 @@ inc_freedreno_rnn = include_directories('rnn')
rnn_src_path = dir_source_root + '/src/freedreno/registers'
rnn_install_path = get_option('datadir') + '/freedreno/registers'
-rnn_path = rnn_src_path + ':' + get_option('prefix') + '/' + rnn_install_path
+rnn_path = get_option('prefix') + '/' + rnn_install_path
++if with_tools_for_development
++ rnn_path = rnn_src_path + ':' + rnn_path
++endif
dep_lua = dependency('lua54', 'lua53', 'lua52', 'lua', required: false,
allow_fallback: true, version: '>=5.2')
--
-2.39.2
-
+GitLab
similarity index 100%
rename from meta/recipes-graphics/mesa/mesa-gl_24.0.7.bb
rename to meta/recipes-graphics/mesa/mesa-gl_24.1.4.bb
@@ -16,14 +16,11 @@ PE = "2"
SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \
file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \
- file://0001-drisw-fix-build-without-dri3.patch \
- file://0002-glxext-don-t-try-zink-if-not-enabled-in-mesa.patch \
- file://0001-Revert-meson-do-not-pull-in-clc-for-clover.patch \
file://0001-amd-Include-missing-llvm-IR-header-Module.h.patch \
file://0001-freedreno-don-t-encode-build-path-into-binaries.patch\
"
-SRC_URI[sha256sum] = "7454425f1ed4a6f1b5b107e1672b30c88b22ea0efea000ae2c7d96db93f6c26a"
+SRC_URI[sha256sum] = "7cf7c6f665263ad0122889c1d4b076654c1eedea7a2f38c69c8c51579937ade1"
UPSTREAM_CHECK_GITTAGREGEX = "mesa-(?P<pver>\d+(\.\d+)+)"
@@ -144,9 +141,8 @@ PACKAGECONFIG[gles] = "-Dgles1=enabled -Dgles2=enabled, -Dgles1=disabled -Dgles2
# "egl" requires "opengl"
PACKAGECONFIG[egl] = "-Degl=enabled, -Degl=disabled"
-# "opencl" requires libclc from meta-clang and spirv-tools from OE-Core
-OPENCL_NATIVE = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', '-Dopencl-native=true', '', d)}"
-PACKAGECONFIG[opencl] = "-Dgallium-opencl=icd -Dopencl-spirv=true ${OPENCL_NATIVE},-Dgallium-opencl=disabled -Dopencl-spirv=false,libclc spirv-tools python3-ply-native"
+# "opencl" requires libclc from meta-clang
+PACKAGECONFIG[opencl] = "-Dgallium-opencl=icd -Dopencl-spirv=true,-Dgallium-opencl=disabled -Dopencl-spirv=false,libclc spirv-tools python3-ply-native"
PACKAGECONFIG[broadcom] = ""
PACKAGECONFIG[etnaviv] = ""
similarity index 100%
rename from meta/recipes-graphics/mesa/mesa_24.0.7.bb
rename to meta/recipes-graphics/mesa/mesa_24.1.4.bb
- Remove two patches that have been merged upstream - Remove 0001-Revert-meson-do-not-pull-in-clc-for-clover.patch Upstream managed to fix this: https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/meson.build?ref_type=heads#L839 - Drop OPENCL_NATIVE since the according option has been removed from meson_options.txt - Update 0001-freedreno-don-t-encode-build-path-into-binaries.patch Signed-off-by: Markus Volk <f_l_k@t-online.de> --- ...on-t-encode-build-path-into-binaries.patch | 71 +++++++++++++++---- .../{mesa-gl_24.0.7.bb => mesa-gl_24.1.4.bb} | 0 meta/recipes-graphics/mesa/mesa.inc | 10 +-- .../mesa/{mesa_24.0.7.bb => mesa_24.1.4.bb} | 0 4 files changed, 61 insertions(+), 20 deletions(-) rename meta/recipes-graphics/mesa/{mesa-gl_24.0.7.bb => mesa-gl_24.1.4.bb} (100%) rename meta/recipes-graphics/mesa/{mesa_24.0.7.bb => mesa_24.1.4.bb} (100%)