Message ID | 20220727072956.15438-1-kai.kang@windriver.com |
---|---|
State | New |
Headers | show |
Series | [v2] mesa: fix compile error when debug build enabled | expand |
Does this still work for you? With this change applied (now in master), mesa fails here with: http://errors.yoctoproject.org/Errors/Details/664881/ and builds fine with DEBUG_BUILD when I revert this. I've reported the same in upstream MR https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17439 On Wed, Jul 27, 2022 at 9:30 AM kai <kai.kang@windriver.com> wrote: > From: Kai Kang <kai.kang@windriver.com> > > 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. > > Signed-off-by: Kai Kang <kai.kang@windriver.com> > --- > v2: > * use patch from mesa merge request > > ...ove-fix-ALWAYS_INLINE-compiler-error.patch | 65 +++++++++++++++++++ > meta/recipes-graphics/mesa/mesa.inc | 1 + > 2 files changed, 66 insertions(+) > create mode 100644 > meta/recipes-graphics/mesa/files/0001-nir-nir_opt_move-fix-ALWAYS_INLINE-compiler-error.patch > > 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 @@ > +Backport merge request to fix mesa compile error when debug build > +enabled. > + > +Upstream-Status: Submitted [ > https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17439] > + > +Signed-off-by: Kai Kang <kai.kang@windriver.com> > + > +From c69c6e7a35205557de73734ad4a1f411c8f99926 Mon Sep 17 00:00:00 2001 > +From: t bettler <thomas.bettler@gmail.com> > +Date: Sat, 9 Jul 2022 09:28:51 +0000 > +Subject: [PATCH] nir/nir_opt_move: fix ALWAYS_INLINE compiler error > +MIME-Version: 1.0 > +Content-Type: text/plain; charset=UTF-8 > +Content-Transfer-Encoding: 8bit > + > +fix call to ‘always_inline’ ‘src_is_ssa’ > + > +Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6825 > +Fixes: f1d20ec67c3f186886b97de94f74484650f8fda1 ("nir/nir_opt_move: > handle non-SSA defs ") > +--- > + src/compiler/nir/nir_inline_helpers.h | 10 ++++++++-- > + src/compiler/nir/nir_opt_move.c | 2 +- > + 2 files changed, 9 insertions(+), 3 deletions(-) > + > +diff --git a/src/compiler/nir/nir_inline_helpers.h > b/src/compiler/nir/nir_inline_helpers.h > +index 125dd8a537c..ec33f0509f7 100644 > +--- a/src/compiler/nir/nir_inline_helpers.h > ++++ b/src/compiler/nir/nir_inline_helpers.h > +@@ -73,8 +73,8 @@ nir_foreach_dest(nir_instr *instr, nir_foreach_dest_cb > cb, void *state) > + return _nir_foreach_dest(instr, cb, state); > + } > + > +-static inline bool > +-nir_foreach_src(nir_instr *instr, nir_foreach_src_cb cb, void *state) > ++static ALWAYS_INLINE bool > ++_nir_foreach_src(nir_instr *instr, nir_foreach_src_cb cb, void *state) > + { > + switch (instr->type) { > + case nir_instr_type_alu: { > +@@ -162,3 +162,9 @@ nir_foreach_src(nir_instr *instr, nir_foreach_src_cb > cb, void *state) > + dest_state.cb = cb; > + return _nir_foreach_dest(instr, _nir_visit_dest_indirect, > &dest_state); > + } > ++ > ++static inline bool > ++nir_foreach_src(nir_instr *instr, nir_foreach_src_cb cb, void *state) > ++{ > ++ return _nir_foreach_src(instr, cb, state); > ++} > +diff --git a/src/compiler/nir/nir_opt_move.c > b/src/compiler/nir/nir_opt_move.c > +index 81bcde5c436..051c3cc6295 100644 > +--- a/src/compiler/nir/nir_opt_move.c > ++++ b/src/compiler/nir/nir_opt_move.c > +@@ -60,7 +60,7 @@ src_is_ssa(nir_src *src, void *state) > + static ALWAYS_INLINE bool > + instr_reads_register(nir_instr *instr) > + { > +- return !nir_foreach_src(instr, src_is_ssa, NULL); > ++ return !_nir_foreach_src(instr, src_is_ssa, NULL); > + } > + > + static bool > +-- > +2.34.1 > + > diff --git a/meta/recipes-graphics/mesa/mesa.inc > b/meta/recipes-graphics/mesa/mesa.inc > index 710cacb09d..f02ef2dc2b 100644 > --- a/meta/recipes-graphics/mesa/mesa.inc > +++ b/meta/recipes-graphics/mesa/mesa.inc > @@ -22,6 +22,7 @@ SRC_URI = " > https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \ > file://0001-util-format-Check-for-NEON-before-using-it.patch \ > > file://0001-Revert-egl-wayland-deprecate-drm_handle_format-and-d.patch \ > > file://0001-swrast_kms-use-swkmsDRI2Extension-instead-of-driDRI2.patch \ > + > file://0001-nir-nir_opt_move-fix-ALWAYS_INLINE-compiler-error.patch \ > " > > SRC_URI[sha256sum] = > "b98f32ba7aa2a1ff5725fb36eb999c693079f0ca16f70aa2f103e2b6c3f093e3" > -- > 2.17.1 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#168545): > https://lists.openembedded.org/g/openembedded-core/message/168545 > Mute This Topic: https://lists.openembedded.org/mt/92644854/3617156 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ > Martin.Jansa@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- > >
On 8/8/22 01:35, Martin Jansa wrote: Hi Mark, > Does this still work for you? Yes, it still works for me. Without that patch, it fails with "DEBUG_BUILD = '1'" in local.conf for qemux86-64. > > With this change applied (now in master), mesa fails here with: > http://errors.yoctoproject.org/Errors/Details/664881/ > <https://urldefense.com/v3/__http://errors.yoctoproject.org/Errors/Details/664881/__;!!AjveYdw8EvQ!fJX82CjYkZXv1aLFsDHckQo9_SiJfysklCtNMVlW8GPSyvnGDFlKkBZpdNWKwWpwCeU_Mv0NvgxptSMUn492GZ4$> > > and builds fine with DEBUG_BUILD when I revert this. Is there any extra config? I saw the the error is: ../mesa-22.1.3/src/compiler/nir/nir_opt_move.c:55:1: error: inlining failed in call to 'always_inline' 'src_is_ssa': function not considered for inlining Without the commit, it fails with: | ../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) Regards, Kai > > I've reported the same in upstream MR > https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17439 > <https://urldefense.com/v3/__https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17439__;!!AjveYdw8EvQ!fJX82CjYkZXv1aLFsDHckQo9_SiJfysklCtNMVlW8GPSyvnGDFlKkBZpdNWKwWpwCeU_Mv0NvgxptSMUu70TdHw$> > > On Wed, Jul 27, 2022 at 9:30 AM kai <kai.kang@windriver.com> wrote: > > From: Kai Kang <kai.kang@windriver.com> > > 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. > > Signed-off-by: Kai Kang <kai.kang@windriver.com> > --- > v2: > * use patch from mesa merge request > > ...ove-fix-ALWAYS_INLINE-compiler-error.patch | 65 > +++++++++++++++++++ > meta/recipes-graphics/mesa/mesa.inc | 1 + > 2 files changed, 66 insertions(+) > create mode 100644 > meta/recipes-graphics/mesa/files/0001-nir-nir_opt_move-fix-ALWAYS_INLINE-compiler-error.patch > > 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 @@ > +Backport merge request to fix mesa compile error when debug build > +enabled. > + > +Upstream-Status: Submitted > [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17439 > <https://urldefense.com/v3/__https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17439__;!!AjveYdw8EvQ!fJX82CjYkZXv1aLFsDHckQo9_SiJfysklCtNMVlW8GPSyvnGDFlKkBZpdNWKwWpwCeU_Mv0NvgxptSMUu70TdHw$>] > + > +Signed-off-by: Kai Kang <kai.kang@windriver.com> > + > +From c69c6e7a35205557de73734ad4a1f411c8f99926 Mon Sep 17 00:00:00 > 2001 > +From: t bettler <thomas.bettler@gmail.com> > +Date: Sat, 9 Jul 2022 09:28:51 +0000 > +Subject: [PATCH] nir/nir_opt_move: fix ALWAYS_INLINE compiler error > +MIME-Version: 1.0 > +Content-Type: text/plain; charset=UTF-8 > +Content-Transfer-Encoding: 8bit > + > +fix call to ‘always_inline’ ‘src_is_ssa’ > + > +Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6825 > <https://urldefense.com/v3/__https://gitlab.freedesktop.org/mesa/mesa/-/issues/6825__;!!AjveYdw8EvQ!fJX82CjYkZXv1aLFsDHckQo9_SiJfysklCtNMVlW8GPSyvnGDFlKkBZpdNWKwWpwCeU_Mv0NvgxptSMUf3T6WDU$> > +Fixes: f1d20ec67c3f186886b97de94f74484650f8fda1 > ("nir/nir_opt_move: handle non-SSA defs ") > +--- > + src/compiler/nir/nir_inline_helpers.h | 10 ++++++++-- > + src/compiler/nir/nir_opt_move.c | 2 +- > + 2 files changed, 9 insertions(+), 3 deletions(-) > + > +diff --git a/src/compiler/nir/nir_inline_helpers.h > b/src/compiler/nir/nir_inline_helpers.h > +index 125dd8a537c..ec33f0509f7 100644 > +--- a/src/compiler/nir/nir_inline_helpers.h > ++++ b/src/compiler/nir/nir_inline_helpers.h > +@@ -73,8 +73,8 @@ nir_foreach_dest(nir_instr *instr, > nir_foreach_dest_cb cb, void *state) > + return _nir_foreach_dest(instr, cb, state); > + } > + > +-static inline bool > +-nir_foreach_src(nir_instr *instr, nir_foreach_src_cb cb, void > *state) > ++static ALWAYS_INLINE bool > ++_nir_foreach_src(nir_instr *instr, nir_foreach_src_cb cb, void > *state) > + { > + switch (instr->type) { > + case nir_instr_type_alu: { > +@@ -162,3 +162,9 @@ nir_foreach_src(nir_instr *instr, > nir_foreach_src_cb cb, void *state) > + dest_state.cb = cb; > + return _nir_foreach_dest(instr, _nir_visit_dest_indirect, > &dest_state); > + } > ++ > ++static inline bool > ++nir_foreach_src(nir_instr *instr, nir_foreach_src_cb cb, void > *state) > ++{ > ++ return _nir_foreach_src(instr, cb, state); > ++} > +diff --git a/src/compiler/nir/nir_opt_move.c > b/src/compiler/nir/nir_opt_move.c > +index 81bcde5c436..051c3cc6295 100644 > +--- a/src/compiler/nir/nir_opt_move.c > ++++ b/src/compiler/nir/nir_opt_move.c > +@@ -60,7 +60,7 @@ src_is_ssa(nir_src *src, void *state) > + static ALWAYS_INLINE bool > + instr_reads_register(nir_instr *instr) > + { > +- return !nir_foreach_src(instr, src_is_ssa, NULL); > ++ return !_nir_foreach_src(instr, src_is_ssa, NULL); > + } > + > + static bool > +-- > +2.34.1 > + > diff --git a/meta/recipes-graphics/mesa/mesa.inc > b/meta/recipes-graphics/mesa/mesa.inc > index 710cacb09d..f02ef2dc2b 100644 > --- a/meta/recipes-graphics/mesa/mesa.inc > +++ b/meta/recipes-graphics/mesa/mesa.inc > @@ -22,6 +22,7 @@ SRC_URI = > "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz > <https://urldefense.com/v3/__https://mesa.freedesktop.org/archive/mesa-$*7BPV*7D.tar.xz__;JSU!!AjveYdw8EvQ!fJX82CjYkZXv1aLFsDHckQo9_SiJfysklCtNMVlW8GPSyvnGDFlKkBZpdNWKwWpwCeU_Mv0NvgxptSMU7TXzo3Y$> > \ > file://0001-util-format-Check-for-NEON-before-using-it.patch \ > file://0001-Revert-egl-wayland-deprecate-drm_handle_format-and-d.patch > \ > file://0001-swrast_kms-use-swkmsDRI2Extension-instead-of-driDRI2.patch > \ > + > file://0001-nir-nir_opt_move-fix-ALWAYS_INLINE-compiler-error.patch \ > " > > SRC_URI[sha256sum] = > "b98f32ba7aa2a1ff5725fb36eb999c693079f0ca16f70aa2f103e2b6c3f093e3" > -- > 2.17.1 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#168545): > https://lists.openembedded.org/g/openembedded-core/message/168545 > <https://urldefense.com/v3/__https://lists.openembedded.org/g/openembedded-core/message/168545__;!!AjveYdw8EvQ!fJX82CjYkZXv1aLFsDHckQo9_SiJfysklCtNMVlW8GPSyvnGDFlKkBZpdNWKwWpwCeU_Mv0NvgxptSMUkjHUb6c$> > Mute This Topic: > https://lists.openembedded.org/mt/92644854/3617156 > <https://urldefense.com/v3/__https://lists.openembedded.org/mt/92644854/3617156__;!!AjveYdw8EvQ!fJX82CjYkZXv1aLFsDHckQo9_SiJfysklCtNMVlW8GPSyvnGDFlKkBZpdNWKwWpwCeU_Mv0NvgxptSMUpD0FcUk$> > Group Owner: openembedded-core+owner@lists.openembedded.org > <mailto:openembedded-core%2Bowner@lists.openembedded.org> > Unsubscribe: > https://lists.openembedded.org/g/openembedded-core/unsub > <https://urldefense.com/v3/__https://lists.openembedded.org/g/openembedded-core/unsub__;!!AjveYdw8EvQ!fJX82CjYkZXv1aLFsDHckQo9_SiJfysklCtNMVlW8GPSyvnGDFlKkBZpdNWKwWpwCeU_Mv0NvgxptSMUbQFZS8o$> > [Martin.Jansa@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- >
No extra config, just nodistro default configuration and short local.conf, the only thing which affects mesa build might be: DISTRO_FEATURES:append = " opengl wayland vulkan" On Tue, Aug 9, 2022 at 6:59 AM kai <kai.kang@windriver.com> wrote: > On 8/8/22 01:35, Martin Jansa wrote: > > Hi Mark, > > Does this still work for you? > > > Yes, it still works for me. Without that patch, it fails with "DEBUG_BUILD > = '1'" in local.conf for qemux86-64. > > > > With this change applied (now in master), mesa fails here with: > http://errors.yoctoproject.org/Errors/Details/664881/ > <https://urldefense.com/v3/__http://errors.yoctoproject.org/Errors/Details/664881/__;!!AjveYdw8EvQ!fJX82CjYkZXv1aLFsDHckQo9_SiJfysklCtNMVlW8GPSyvnGDFlKkBZpdNWKwWpwCeU_Mv0NvgxptSMUn492GZ4$> > > > and builds fine with DEBUG_BUILD when I revert this. > > Is there any extra config? I saw the the error is: > > ../mesa-22.1.3/src/compiler/nir/nir_opt_move.c:55:1: error: inlining > failed in call to 'always_inline' 'src_is_ssa': function not considered for > inlining > > Without the commit, it fails with: > > | ../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) > > Regards, > Kai > > > I've reported the same in upstream MR > https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17439 > <https://urldefense.com/v3/__https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17439__;!!AjveYdw8EvQ!fJX82CjYkZXv1aLFsDHckQo9_SiJfysklCtNMVlW8GPSyvnGDFlKkBZpdNWKwWpwCeU_Mv0NvgxptSMUu70TdHw$> > > > > On Wed, Jul 27, 2022 at 9:30 AM kai <kai.kang@windriver.com> wrote: > >> From: Kai Kang <kai.kang@windriver.com> >> >> 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. >> >> Signed-off-by: Kai Kang <kai.kang@windriver.com> >> --- >> v2: >> * use patch from mesa merge request >> >> ...ove-fix-ALWAYS_INLINE-compiler-error.patch | 65 +++++++++++++++++++ >> meta/recipes-graphics/mesa/mesa.inc | 1 + >> 2 files changed, 66 insertions(+) >> create mode 100644 >> meta/recipes-graphics/mesa/files/0001-nir-nir_opt_move-fix-ALWAYS_INLINE-compiler-error.patch >> >> 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 @@ >> +Backport merge request to fix mesa compile error when debug build >> +enabled. >> + >> +Upstream-Status: Submitted [ >> https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17439 >> <https://urldefense.com/v3/__https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17439__;!!AjveYdw8EvQ!fJX82CjYkZXv1aLFsDHckQo9_SiJfysklCtNMVlW8GPSyvnGDFlKkBZpdNWKwWpwCeU_Mv0NvgxptSMUu70TdHw$> >> ] >> + >> +Signed-off-by: Kai Kang <kai.kang@windriver.com> >> + >> +From c69c6e7a35205557de73734ad4a1f411c8f99926 Mon Sep 17 00:00:00 2001 >> +From: t bettler <thomas.bettler@gmail.com> >> +Date: Sat, 9 Jul 2022 09:28:51 +0000 >> +Subject: [PATCH] nir/nir_opt_move: fix ALWAYS_INLINE compiler error >> +MIME-Version: 1.0 >> +Content-Type: text/plain; charset=UTF-8 >> +Content-Transfer-Encoding: 8bit >> + >> +fix call to ‘always_inline’ ‘src_is_ssa’ >> + >> +Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6825 >> <https://urldefense.com/v3/__https://gitlab.freedesktop.org/mesa/mesa/-/issues/6825__;!!AjveYdw8EvQ!fJX82CjYkZXv1aLFsDHckQo9_SiJfysklCtNMVlW8GPSyvnGDFlKkBZpdNWKwWpwCeU_Mv0NvgxptSMUf3T6WDU$> >> +Fixes: f1d20ec67c3f186886b97de94f74484650f8fda1 ("nir/nir_opt_move: >> handle non-SSA defs ") >> +--- >> + src/compiler/nir/nir_inline_helpers.h | 10 ++++++++-- >> + src/compiler/nir/nir_opt_move.c | 2 +- >> + 2 files changed, 9 insertions(+), 3 deletions(-) >> + >> +diff --git a/src/compiler/nir/nir_inline_helpers.h >> b/src/compiler/nir/nir_inline_helpers.h >> +index 125dd8a537c..ec33f0509f7 100644 >> +--- a/src/compiler/nir/nir_inline_helpers.h >> ++++ b/src/compiler/nir/nir_inline_helpers.h >> +@@ -73,8 +73,8 @@ nir_foreach_dest(nir_instr *instr, nir_foreach_dest_cb >> cb, void *state) >> + return _nir_foreach_dest(instr, cb, state); >> + } >> + >> +-static inline bool >> +-nir_foreach_src(nir_instr *instr, nir_foreach_src_cb cb, void *state) >> ++static ALWAYS_INLINE bool >> ++_nir_foreach_src(nir_instr *instr, nir_foreach_src_cb cb, void *state) >> + { >> + switch (instr->type) { >> + case nir_instr_type_alu: { >> +@@ -162,3 +162,9 @@ nir_foreach_src(nir_instr *instr, nir_foreach_src_cb >> cb, void *state) >> + dest_state.cb = cb; >> + return _nir_foreach_dest(instr, _nir_visit_dest_indirect, >> &dest_state); >> + } >> ++ >> ++static inline bool >> ++nir_foreach_src(nir_instr *instr, nir_foreach_src_cb cb, void *state) >> ++{ >> ++ return _nir_foreach_src(instr, cb, state); >> ++} >> +diff --git a/src/compiler/nir/nir_opt_move.c >> b/src/compiler/nir/nir_opt_move.c >> +index 81bcde5c436..051c3cc6295 100644 >> +--- a/src/compiler/nir/nir_opt_move.c >> ++++ b/src/compiler/nir/nir_opt_move.c >> +@@ -60,7 +60,7 @@ src_is_ssa(nir_src *src, void *state) >> + static ALWAYS_INLINE bool >> + instr_reads_register(nir_instr *instr) >> + { >> +- return !nir_foreach_src(instr, src_is_ssa, NULL); >> ++ return !_nir_foreach_src(instr, src_is_ssa, NULL); >> + } >> + >> + static bool >> +-- >> +2.34.1 >> + >> diff --git a/meta/recipes-graphics/mesa/mesa.inc >> b/meta/recipes-graphics/mesa/mesa.inc >> index 710cacb09d..f02ef2dc2b 100644 >> --- a/meta/recipes-graphics/mesa/mesa.inc >> +++ b/meta/recipes-graphics/mesa/mesa.inc >> @@ -22,6 +22,7 @@ SRC_URI = " >> https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz >> <https://urldefense.com/v3/__https://mesa.freedesktop.org/archive/mesa-$*7BPV*7D.tar.xz__;JSU!!AjveYdw8EvQ!fJX82CjYkZXv1aLFsDHckQo9_SiJfysklCtNMVlW8GPSyvnGDFlKkBZpdNWKwWpwCeU_Mv0NvgxptSMU7TXzo3Y$> >> \ >> file://0001-util-format-Check-for-NEON-before-using-it.patch >> \ >> >> file://0001-Revert-egl-wayland-deprecate-drm_handle_format-and-d.patch \ >> >> file://0001-swrast_kms-use-swkmsDRI2Extension-instead-of-driDRI2.patch \ >> + >> file://0001-nir-nir_opt_move-fix-ALWAYS_INLINE-compiler-error.patch \ >> " >> >> SRC_URI[sha256sum] = >> "b98f32ba7aa2a1ff5725fb36eb999c693079f0ca16f70aa2f103e2b6c3f093e3" >> -- >> 2.17.1 >> >> >> >> >> > -- > Kai Kang > Wind River Linux > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#169132): > https://lists.openembedded.org/g/openembedded-core/message/169132 > Mute This Topic: https://lists.openembedded.org/mt/92644854/3617156 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ > Martin.Jansa@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- > >
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 @@ +Backport merge request to fix mesa compile error when debug build +enabled. + +Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17439] + +Signed-off-by: Kai Kang <kai.kang@windriver.com> + +From c69c6e7a35205557de73734ad4a1f411c8f99926 Mon Sep 17 00:00:00 2001 +From: t bettler <thomas.bettler@gmail.com> +Date: Sat, 9 Jul 2022 09:28:51 +0000 +Subject: [PATCH] nir/nir_opt_move: fix ALWAYS_INLINE compiler error +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +fix call to ‘always_inline’ ‘src_is_ssa’ + +Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6825 +Fixes: f1d20ec67c3f186886b97de94f74484650f8fda1 ("nir/nir_opt_move: handle non-SSA defs ") +--- + src/compiler/nir/nir_inline_helpers.h | 10 ++++++++-- + src/compiler/nir/nir_opt_move.c | 2 +- + 2 files changed, 9 insertions(+), 3 deletions(-) + +diff --git a/src/compiler/nir/nir_inline_helpers.h b/src/compiler/nir/nir_inline_helpers.h +index 125dd8a537c..ec33f0509f7 100644 +--- a/src/compiler/nir/nir_inline_helpers.h ++++ b/src/compiler/nir/nir_inline_helpers.h +@@ -73,8 +73,8 @@ nir_foreach_dest(nir_instr *instr, nir_foreach_dest_cb cb, void *state) + return _nir_foreach_dest(instr, cb, state); + } + +-static inline bool +-nir_foreach_src(nir_instr *instr, nir_foreach_src_cb cb, void *state) ++static ALWAYS_INLINE bool ++_nir_foreach_src(nir_instr *instr, nir_foreach_src_cb cb, void *state) + { + switch (instr->type) { + case nir_instr_type_alu: { +@@ -162,3 +162,9 @@ nir_foreach_src(nir_instr *instr, nir_foreach_src_cb cb, void *state) + dest_state.cb = cb; + return _nir_foreach_dest(instr, _nir_visit_dest_indirect, &dest_state); + } ++ ++static inline bool ++nir_foreach_src(nir_instr *instr, nir_foreach_src_cb cb, void *state) ++{ ++ return _nir_foreach_src(instr, cb, state); ++} +diff --git a/src/compiler/nir/nir_opt_move.c b/src/compiler/nir/nir_opt_move.c +index 81bcde5c436..051c3cc6295 100644 +--- a/src/compiler/nir/nir_opt_move.c ++++ b/src/compiler/nir/nir_opt_move.c +@@ -60,7 +60,7 @@ src_is_ssa(nir_src *src, void *state) + static ALWAYS_INLINE bool + instr_reads_register(nir_instr *instr) + { +- return !nir_foreach_src(instr, src_is_ssa, NULL); ++ return !_nir_foreach_src(instr, src_is_ssa, NULL); + } + + static bool +-- +2.34.1 + diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc index 710cacb09d..f02ef2dc2b 100644 --- a/meta/recipes-graphics/mesa/mesa.inc +++ b/meta/recipes-graphics/mesa/mesa.inc @@ -22,6 +22,7 @@ SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \ file://0001-util-format-Check-for-NEON-before-using-it.patch \ file://0001-Revert-egl-wayland-deprecate-drm_handle_format-and-d.patch \ file://0001-swrast_kms-use-swkmsDRI2Extension-instead-of-driDRI2.patch \ + file://0001-nir-nir_opt_move-fix-ALWAYS_INLINE-compiler-error.patch \ " SRC_URI[sha256sum] = "b98f32ba7aa2a1ff5725fb36eb999c693079f0ca16f70aa2f103e2b6c3f093e3"