On 7/18/22 23:09, Ross Burton wrote:
This patch has been rejected upstream, please switch for 
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17439 instead.

OK.

Kai


Ross

On 18 Jul 2022, at 03:21, kai via lists.openembedded.org 
<[email protected]> wrote:

From: Kai Kang <[email protected]>

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)
^~~~~~~~~~

Remove 'ALWAYS_INLINE' for function src_is_ssa.

Signed-off-by: Kai Kang <[email protected]>
---
.../mesa/files/0001-nir-fix-build-at-Og.patch | 31 +++++++++++++++++++
meta/recipes-graphics/mesa/mesa.inc           |  1 +
2 files changed, 32 insertions(+)
create mode 100644 
meta/recipes-graphics/mesa/files/0001-nir-fix-build-at-Og.patch

diff --git a/meta/recipes-graphics/mesa/files/0001-nir-fix-build-at-Og.patch 
b/meta/recipes-graphics/mesa/files/0001-nir-fix-build-at-Og.patch
new file mode 100644
index 0000000000..5b4a5c7231
--- /dev/null
+++ b/meta/recipes-graphics/mesa/files/0001-nir-fix-build-at-Og.patch
@@ -0,0 +1,31 @@
+At -Og with gcc 12.1, it fails to compile:
+
+../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)
+ ^~~~~~~~~~
+
+Remove 'ALWAYS_INLINE' for function src_is_ssa.
+
+Upstream-Status: Submitted 
[https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17589]
+
+Signed-off-by: Kai Kang <[email protected]>
+---
+ src/compiler/nir/nir_opt_move.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/compiler/nir/nir_opt_move.c b/src/compiler/nir/nir_opt_move.c
+index 81bcde5c436..09db6717002 100644
+--- a/src/compiler/nir/nir_opt_move.c
++++ b/src/compiler/nir/nir_opt_move.c
+@@ -51,7 +51,7 @@
+  * lower register pressure.
+  */
+
+-static ALWAYS_INLINE bool
++static bool
+ src_is_ssa(nir_src *src, void *state)
+ {
+    return src->is_ssa;
+--
+2.34.1
+
diff --git a/meta/recipes-graphics/mesa/mesa.inc 
b/meta/recipes-graphics/mesa/mesa.inc
index 710cacb09d..58e662efd4 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-fix-build-at-Og.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 (#168266): 
https://lists.openembedded.org/g/openembedded-core/message/168266
Mute This Topic: https://lists.openembedded.org/mt/92451455/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to