diff --git a/0001-intel-compiler-don-t-invert-if-s-on-gen5-or-older.patch b/0001-intel-compiler-don-t-invert-if-s-on-gen5-or-older.patch new file mode 100644 index 0000000..f52f858 --- /dev/null +++ b/0001-intel-compiler-don-t-invert-if-s-on-gen5-or-older.patch @@ -0,0 +1,32 @@ +From db083cf2381638f348e31c9a832e0a8821132e21 Mon Sep 17 00:00:00 2001 +From: Dave Airlie +Date: Thu, 21 Dec 2023 10:39:08 +1000 +Subject: [PATCH] intel/compiler: don't invert if's on gen5 or older + +I'm not sure why this works, but since opt_if was changed, +gtk4-demo hasn't worked on gen4/5. + +I tried to track through some opt stages that might be dropping +predicate_inverse or something, but can't spot anything yet. + +Fixes: 31b5f5a51f3a ("nir/opt_if: Simplify if's with general conditions") +--- + src/intel/compiler/brw_fs_nir.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/intel/compiler/brw_fs_nir.cpp b/src/intel/compiler/brw_fs_nir.cpp +index b9f7366763b..0e57c343b54 100644 +--- a/src/intel/compiler/brw_fs_nir.cpp ++++ b/src/intel/compiler/brw_fs_nir.cpp +@@ -357,7 +357,7 @@ fs_visitor::nir_emit_if(nir_if *if_stmt) + * the source, but invert the predicate on the if instruction. + */ + nir_alu_instr *cond = nir_src_as_alu_instr(if_stmt->condition); +- if (cond != NULL && cond->op == nir_op_inot) { ++ if (devinfo->ver > 5 && cond != NULL && cond->op == nir_op_inot) { + invert = true; + cond_reg = get_nir_src(cond->src[0].src); + cond_reg = offset(cond_reg, bld, cond->src[0].swizzle[0]); +-- +2.43.0 + diff --git a/mesa.spec b/mesa.spec index f59328b..7a86b48 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-move-gen5-final-pass-to-actually-be-f.patch +Patch12: 0001-intel-compiler-don-t-invert-if-s-on-gen5-or-older.patch BuildRequires: meson >= 1.2.0 BuildRequires: gcc