From e50d06341cfd04f68036303664600da055b4ff34 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Wed, 3 Jan 2024 16:34:50 +1000 Subject: [PATCH] add fix for intel compiler unused variable in release builds --- ...er-fix-release-build-unused-variable.patch | 28 +++++++++++++++++++ mesa.spec | 1 + 2 files changed, 29 insertions(+) create mode 100644 0001-intel-compiler-fix-release-build-unused-variable.patch diff --git a/0001-intel-compiler-fix-release-build-unused-variable.patch b/0001-intel-compiler-fix-release-build-unused-variable.patch new file mode 100644 index 0000000..7cce827 --- /dev/null +++ b/0001-intel-compiler-fix-release-build-unused-variable.patch @@ -0,0 +1,28 @@ +From b32d3c9251e18c77b4d58db61b43797ffb7b05cf Mon Sep 17 00:00:00 2001 +From: Dave Airlie +Date: Wed, 3 Jan 2024 16:31:23 +1000 +Subject: [PATCH] intel/compiler: fix release build unused variable. + +This is only used in an assert. + +Fixes: 158ac265dfd0 ("intel/fs: Make helpers for saving/restoring instruction order") +--- + src/intel/compiler/brw_fs.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp +index 696b5db8d9d..aa01a2241ce 100644 +--- a/src/intel/compiler/brw_fs.cpp ++++ b/src/intel/compiler/brw_fs.cpp +@@ -6834,7 +6834,7 @@ save_instruction_order(const struct cfg_t *cfg) + static void + restore_instruction_order(struct cfg_t *cfg, fs_inst **inst_arr) + { +- int num_insts = cfg->last_block()->end_ip + 1; ++ ASSERTED int num_insts = cfg->last_block()->end_ip + 1; + + int ip = 0; + foreach_block (block, cfg) { +-- +2.43.0 + diff --git a/mesa.spec b/mesa.spec index c791d83..f50fd34 100644 --- a/mesa.spec +++ b/mesa.spec @@ -75,6 +75,7 @@ Source1: Mesa-MLAA-License-Clarification-Email.txt Patch10: gnome-shell-glthread-disable.patch Patch11: 0001-intel-compiler-reemit-boolean-resolve-for-inverted-i.patch +Patch12: 0001-intel-compiler-fix-release-build-unused-variable.patch BuildRequires: meson >= 1.2.0 BuildRequires: gcc