From: <kai.kang@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: [PATCH] mesa: fix non-trivial designated initializers issue
Date: Tue, 4 Apr 2023 17:21:24 +0800 [thread overview]
Message-ID: <20230404092124.27242-1-kai.kang@windriver.com> (raw)
From: Kai Kang <kai.kang@windriver.com>
It fails to compile intel/compiler/brw_simd_selection.cpp with g++ 7.5.0:
| mesa-23.0.0/src/intel/compiler/brw_simd_selection.cpp: In function ‘int
brw_simd_select_for_workgroup_size(const intel_device_info*,
const brw_cs_prog_data*, const unsigned int*)’:
| mesa-23.0.0/src/intel/compiler/brw_simd_selection.cpp:205:7: sorry,
unimplemented: non-trivial designated initializers not supported
| };
| ^
Initialize the leading 2 members to fix the issue.
Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
...on.cpp-fix-non-trivial-designated-in.patch | 59 +++++++++++++++++++
meta/recipes-graphics/mesa/mesa.inc | 1 +
2 files changed, 60 insertions(+)
create mode 100644 meta/recipes-graphics/mesa/files/0001-brw_simd_selection.cpp-fix-non-trivial-designated-in.patch
diff --git a/meta/recipes-graphics/mesa/files/0001-brw_simd_selection.cpp-fix-non-trivial-designated-in.patch b/meta/recipes-graphics/mesa/files/0001-brw_simd_selection.cpp-fix-non-trivial-designated-in.patch
new file mode 100644
index 0000000000..9db738cdc0
--- /dev/null
+++ b/meta/recipes-graphics/mesa/files/0001-brw_simd_selection.cpp-fix-non-trivial-designated-in.patch
@@ -0,0 +1,59 @@
+From 6fd92cfc8a52a1884b8bc45b9ac0c7ceaf492a58 Mon Sep 17 00:00:00 2001
+From: Kai Kang <kai.kang@windriver.com>
+Date: Mon, 27 Mar 2023 21:19:36 +0800
+Subject: [PATCH] brw_simd_selection.cpp: fix non-trivial designated
+ initializers issue
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+It fails to compile intel/compiler/brw_simd_selection.cpp with g++ 7.5.0:
+
+| mesa-23.0.0/src/intel/compiler/brw_simd_selection.cpp: In function ‘int
+ brw_simd_select_for_workgroup_size(const intel_device_info*,
+ const brw_cs_prog_data*, const unsigned int*)’:
+| mesa-23.0.0/src/intel/compiler/brw_simd_selection.cpp:205:7: sorry,
+ unimplemented: non-trivial designated initializers not supported
+| };
+| ^
+
+Initialize the leading 2 members to fix the issue.
+
+Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22138]
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+ src/intel/compiler/brw_simd_selection.cpp | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/src/intel/compiler/brw_simd_selection.cpp b/src/intel/compiler/brw_simd_selection.cpp
+index 1515e538b74..4c065f9884a 100644
+--- a/src/intel/compiler/brw_simd_selection.cpp
++++ b/src/intel/compiler/brw_simd_selection.cpp
+@@ -232,10 +232,14 @@ brw_simd_select_for_workgroup_size(const struct intel_device_info *devinfo,
+ const struct brw_cs_prog_data *prog_data,
+ const unsigned *sizes)
+ {
++ void *mem_ctx = ralloc_context(NULL);
++
+ if (!sizes || (prog_data->local_size[0] == sizes[0] &&
+ prog_data->local_size[1] == sizes[1] &&
+ prog_data->local_size[2] == sizes[2])) {
+ brw_simd_selection_state simd_state{
++ .mem_ctx = mem_ctx,
++ .devinfo = devinfo,
+ .prog_data = const_cast<struct brw_cs_prog_data *>(prog_data),
+ };
+
+@@ -257,8 +261,6 @@ brw_simd_select_for_workgroup_size(const struct intel_device_info *devinfo,
+ cloned.prog_mask = 0;
+ cloned.prog_spilled = 0;
+
+- void *mem_ctx = ralloc_context(NULL);
+-
+ brw_simd_selection_state simd_state{
+ .mem_ctx = mem_ctx,
+ .devinfo = devinfo,
+--
+2.34.1
+
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index 8f72f25c17..caab1eff6d 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -17,6 +17,7 @@ PE = "2"
SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \
file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \
file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \
+ file://0001-brw_simd_selection.cpp-fix-non-trivial-designated-in.patch \
"
SRC_URI[sha256sum] = "01f3cff3763f09e0adabcb8011e4aebc6ad48f6a4dd4bae904fe918707d253e4"
--
2.17.1
next reply other threads:[~2023-04-04 9:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-04 9:21 kai.kang [this message]
2023-04-04 10:49 ` [OE-core] [PATCH] mesa: fix non-trivial designated initializers issue Böszörményi Zoltán
2023-04-04 11:13 ` Richard Purdie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230404092124.27242-1-kai.kang@windriver.com \
--to=kai.kang@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox