diff options
| author | Kai Kang <kai.kang@windriver.com> | 2022-07-27 15:29:56 +0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-07-28 11:07:33 +0100 |
| commit | 130e9b341db652614d16d701f10554107446a354 (patch) | |
| tree | 88c7a3c3608961dcd317f2570b68d539639cdf34 /meta/recipes-graphics/mesa/files | |
| parent | 99779299f76fc28d4f14ea8ff93fa0120a9195f9 (diff) | |
| download | poky-130e9b341db652614d16d701f10554107446a354.tar.gz | |
mesa: fix compile error when debug build enabled
It fails to compile mesa{,-native} when DEBUG_BUILD is enabled:
../mesa-22.1.3/src/compiler/nir/nir_inline_helpers.h: In function ‘nir_opt_move_block’:
../mesa-22.1.3/src/compiler/nir/nir_opt_move.c:55:1: error: inlining failed in call to
always_inline ‘src_is_ssa’: indirect function call with a yet undetermined callee
src_is_ssa(nir_src *src, void *state)
^~~~~~~~~~
Backport patch from mesa merge request to fix it.
(From OE-Core rev: 468715c42632a8467dc1f0abe0f3cd540de5f7c3)
Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics/mesa/files')
| -rw-r--r-- | meta/recipes-graphics/mesa/files/0001-nir-nir_opt_move-fix-ALWAYS_INLINE-compiler-error.patch | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/meta/recipes-graphics/mesa/files/0001-nir-nir_opt_move-fix-ALWAYS_INLINE-compiler-error.patch b/meta/recipes-graphics/mesa/files/0001-nir-nir_opt_move-fix-ALWAYS_INLINE-compiler-error.patch new file mode 100644 index 0000000000..48fc1e37ff --- /dev/null +++ b/meta/recipes-graphics/mesa/files/0001-nir-nir_opt_move-fix-ALWAYS_INLINE-compiler-error.patch | |||
| @@ -0,0 +1,65 @@ | |||
| 1 | Backport merge request to fix mesa compile error when debug build | ||
| 2 | enabled. | ||
| 3 | |||
| 4 | Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17439] | ||
| 5 | |||
| 6 | Signed-off-by: Kai Kang <kai.kang@windriver.com> | ||
| 7 | |||
| 8 | From c69c6e7a35205557de73734ad4a1f411c8f99926 Mon Sep 17 00:00:00 2001 | ||
| 9 | From: t bettler <thomas.bettler@gmail.com> | ||
| 10 | Date: Sat, 9 Jul 2022 09:28:51 +0000 | ||
| 11 | Subject: [PATCH] nir/nir_opt_move: fix ALWAYS_INLINE compiler error | ||
| 12 | MIME-Version: 1.0 | ||
| 13 | Content-Type: text/plain; charset=UTF-8 | ||
| 14 | Content-Transfer-Encoding: 8bit | ||
| 15 | |||
| 16 | fix call to ‘always_inline’ ‘src_is_ssa’ | ||
| 17 | |||
| 18 | Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6825 | ||
| 19 | Fixes: f1d20ec67c3f186886b97de94f74484650f8fda1 ("nir/nir_opt_move: handle non-SSA defs ") | ||
| 20 | --- | ||
| 21 | src/compiler/nir/nir_inline_helpers.h | 10 ++++++++-- | ||
| 22 | src/compiler/nir/nir_opt_move.c | 2 +- | ||
| 23 | 2 files changed, 9 insertions(+), 3 deletions(-) | ||
| 24 | |||
| 25 | diff --git a/src/compiler/nir/nir_inline_helpers.h b/src/compiler/nir/nir_inline_helpers.h | ||
| 26 | index 125dd8a537c..ec33f0509f7 100644 | ||
| 27 | --- a/src/compiler/nir/nir_inline_helpers.h | ||
| 28 | +++ b/src/compiler/nir/nir_inline_helpers.h | ||
| 29 | @@ -73,8 +73,8 @@ nir_foreach_dest(nir_instr *instr, nir_foreach_dest_cb cb, void *state) | ||
| 30 | return _nir_foreach_dest(instr, cb, state); | ||
| 31 | } | ||
| 32 | |||
| 33 | -static inline bool | ||
| 34 | -nir_foreach_src(nir_instr *instr, nir_foreach_src_cb cb, void *state) | ||
| 35 | +static ALWAYS_INLINE bool | ||
| 36 | +_nir_foreach_src(nir_instr *instr, nir_foreach_src_cb cb, void *state) | ||
| 37 | { | ||
| 38 | switch (instr->type) { | ||
| 39 | case nir_instr_type_alu: { | ||
| 40 | @@ -162,3 +162,9 @@ nir_foreach_src(nir_instr *instr, nir_foreach_src_cb cb, void *state) | ||
| 41 | dest_state.cb = cb; | ||
| 42 | return _nir_foreach_dest(instr, _nir_visit_dest_indirect, &dest_state); | ||
| 43 | } | ||
| 44 | + | ||
| 45 | +static inline bool | ||
| 46 | +nir_foreach_src(nir_instr *instr, nir_foreach_src_cb cb, void *state) | ||
| 47 | +{ | ||
| 48 | + return _nir_foreach_src(instr, cb, state); | ||
| 49 | +} | ||
| 50 | diff --git a/src/compiler/nir/nir_opt_move.c b/src/compiler/nir/nir_opt_move.c | ||
| 51 | index 81bcde5c436..051c3cc6295 100644 | ||
| 52 | --- a/src/compiler/nir/nir_opt_move.c | ||
| 53 | +++ b/src/compiler/nir/nir_opt_move.c | ||
| 54 | @@ -60,7 +60,7 @@ src_is_ssa(nir_src *src, void *state) | ||
| 55 | static ALWAYS_INLINE bool | ||
| 56 | instr_reads_register(nir_instr *instr) | ||
| 57 | { | ||
| 58 | - return !nir_foreach_src(instr, src_is_ssa, NULL); | ||
| 59 | + return !_nir_foreach_src(instr, src_is_ssa, NULL); | ||
| 60 | } | ||
| 61 | |||
| 62 | static bool | ||
| 63 | -- | ||
| 64 | 2.34.1 | ||
| 65 | |||
