diff --git a/0001-gallivm-temporary-disable-coroutines-on-loongarch64.patch b/0001-gallivm-temporary-disable-coroutines-on-loongarch64.patch deleted file mode 100644 index 8b8c5a60ec43461ae2c5245619f07dce0ef9dcb4..0000000000000000000000000000000000000000 --- a/0001-gallivm-temporary-disable-coroutines-on-loongarch64.patch +++ /dev/null @@ -1,52 +0,0 @@ -From a0fa9bba4095c62a1badb86b886787174a0cbce6 Mon Sep 17 00:00:00 2001 -From: suijingfeng -Date: Sun, 11 Jul 2021 06:12:17 +0800 -Subject: [PATCH 1/3] gallivm: temporary disable coroutines on loongarch64 - -Signed-off-by: suijingfeng ---- - src/gallium/auxiliary/gallivm/lp_bld.h | 4 ++++ - src/gallium/auxiliary/gallivm/lp_bld_init.c | 4 ++-- - 2 files changed, 6 insertions(+), 2 deletions(-) - -diff --git a/src/gallium/auxiliary/gallivm/lp_bld.h b/src/gallium/auxiliary/gallivm/lp_bld.h -index e1f6200..1254f0d 100644 ---- a/src/gallium/auxiliary/gallivm/lp_bld.h -+++ b/src/gallium/auxiliary/gallivm/lp_bld.h -@@ -85,7 +85,11 @@ - #define GALLIVM_HAVE_CORO 0 - #define GALLIVM_USE_NEW_PASS 1 - #elif LLVM_VERSION_MAJOR >= 8 -+#ifdef __loongarch__ -+#define GALLIVM_HAVE_CORO 0 -+#else - #define GALLIVM_HAVE_CORO 1 -+#endif - #define GALLIVM_USE_NEW_PASS 0 - #else - #define GALLIVM_HAVE_CORO 0 -diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c -index 24d0823..5a27977 100644 ---- a/src/gallium/auxiliary/gallivm/lp_bld_init.c -+++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c -@@ -50,7 +50,7 @@ - #if GALLIVM_USE_NEW_PASS == 1 - #include - #elif GALLIVM_HAVE_CORO == 1 --#if LLVM_VERSION_MAJOR <= 8 && (DETECT_ARCH_AARCH64 || DETECT_ARCH_ARM || DETECT_ARCH_S390 || DETECT_ARCH_MIPS64) -+#if LLVM_VERSION_MAJOR <= 8 && (DETECT_ARCH_AARCH64 || DETECT_ARCH_ARM || DETECT_ARCH_S390 || DETECT_ARCH_MIPS64 || DETECT_ARCH_LOONGARCH64) - #include - #endif - #include -@@ -141,7 +141,7 @@ create_pass_manager(struct gallivm_state *gallivm) - } - - #if GALLIVM_HAVE_CORO == 1 --#if LLVM_VERSION_MAJOR <= 8 && (DETECT_ARCH_AARCH64 || DETECT_ARCH_ARM || DETECT_ARCH_S390 || DETECT_ARCH_MIPS64) -+#if LLVM_VERSION_MAJOR <= 8 && (DETECT_ARCH_AARCH64 || DETECT_ARCH_ARM || DETECT_ARCH_S390 || DETECT_ARCH_MIPS64 || DETECT_ARCH_LOONGARCH64) - LLVMAddArgumentPromotionPass(gallivm->cgpassmgr); - LLVMAddFunctionAttrsPass(gallivm->cgpassmgr); - #endif --- -2.20.1 - diff --git a/0001-zink-initialize-drm_fd-to-1.patch b/0001-zink-initialize-drm_fd-to-1.patch new file mode 100644 index 0000000000000000000000000000000000000000..1dd32520394de02b25137de5f92188abb6f10391 --- /dev/null +++ b/0001-zink-initialize-drm_fd-to-1.patch @@ -0,0 +1,39 @@ +From a89bf9e86a83005befcdcef47a94fff167bdc47b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jos=C3=A9=20Exp=C3=B3sito?= +Date: Wed, 22 Nov 2023 12:48:47 +0100 +Subject: [PATCH] zink: initialize drm_fd to -1 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The `zink_internal_create_screen()` function initializes +`screen->drm_fd` to 0, a valid file descriptor value, via `rzalloc`. + +If an error is found during initialization, the `zink_destroy_screen()` +function is invoked in the `fail` label and the `screen->drm_fd` is +closed because its value is 0 and `screen->drm_fd != -1` is checked. + +Initialize `screen->drm_fd` to -1 to avoid this issue. + +Resolves: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10191 +Signed-off-by: José Expósito +--- + src/gallium/drivers/zink/zink_screen.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c +index 50168d8daa1..f42f340657b 100644 +--- a/src/gallium/drivers/zink/zink_screen.c ++++ b/src/gallium/drivers/zink/zink_screen.c +@@ -3126,6 +3126,8 @@ zink_internal_create_screen(const struct pipe_screen_config *config, int64_t dev + return NULL; + } + ++ screen->drm_fd = -1; ++ + glsl_type_singleton_init_or_ref(); + zink_debug = debug_get_option_zink_debug(); + if (zink_descriptor_mode == ZINK_DESCRIPTOR_MODE_AUTO) +-- +2.42.0 + diff --git a/0002-gallivm-arit-use-LLVMBuildFPToUI-when-the-float-is-n.patch b/0002-gallivm-arit-use-LLVMBuildFPToUI-when-the-float-is-n.patch deleted file mode 100644 index 04b2321c209b6d7a5b687449c813a802fbdff6c3..0000000000000000000000000000000000000000 --- a/0002-gallivm-arit-use-LLVMBuildFPToUI-when-the-float-is-n.patch +++ /dev/null @@ -1,29 +0,0 @@ -From a72eb44c434a5584932053dafa91b0c60e6f104b Mon Sep 17 00:00:00 2001 -From: suijingfeng -Date: Mon, 16 Aug 2021 14:42:57 +0800 -Subject: [PATCH 2/3] gallivm: arit: use LLVMBuildFPToUI when the float is not - signed - ---- - src/gallium/auxiliary/gallivm/lp_bld_arit.c | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/src/gallium/auxiliary/gallivm/lp_bld_arit.c b/src/gallium/auxiliary/gallivm/lp_bld_arit.c -index 511c578..32ec3d0 100644 ---- a/src/gallium/auxiliary/gallivm/lp_bld_arit.c -+++ b/src/gallium/auxiliary/gallivm/lp_bld_arit.c -@@ -2389,7 +2389,10 @@ lp_build_iround(struct lp_build_context *bld, - res = LLVMBuildFAdd(builder, a, half, ""); - } - -- res = LLVMBuildFPToSI(builder, res, int_vec_type, ""); -+ if (type.sign) -+ res = LLVMBuildFPToSI(builder, res, int_vec_type, ""); -+ else -+ res = LLVMBuildFPToUI(builder, res, int_vec_type, ""); - - return res; - } --- -2.20.1 - diff --git a/0003-gallivm-add-more-optlevel-for-debug-purpose-on-loong.patch b/0003-gallivm-add-more-optlevel-for-debug-purpose-on-loong.patch deleted file mode 100644 index 48e63737f38d74b7710e52809f1de71fb477b4d6..0000000000000000000000000000000000000000 --- a/0003-gallivm-add-more-optlevel-for-debug-purpose-on-loong.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 598baf898eccc7886622ec6897d4982034edfb08 Mon Sep 17 00:00:00 2001 -From: suijingfeng -Date: Fri, 9 Jul 2021 15:25:06 +0800 -Subject: [PATCH 3/3] gallivm: add more optlevel for debug purpose on - loongarch64 - -Signed-off-by: suijingfeng ---- - src/gallium/auxiliary/gallivm/lp_bld_debug.h | 6 ++++++ - src/gallium/auxiliary/gallivm/lp_bld_init.c | 16 +++++++++++++++- - 2 files changed, 21 insertions(+), 1 deletion(-) - -diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.h b/src/gallium/auxiliary/gallivm/lp_bld_debug.h -index 291e6d5..e08e2c6 100644 ---- a/src/gallium/auxiliary/gallivm/lp_bld_debug.h -+++ b/src/gallium/auxiliary/gallivm/lp_bld_debug.h -@@ -49,6 +49,12 @@ - #define GALLIVM_PERF_NO_OPT (1 << 3) - #define GALLIVM_PERF_NO_AOS_SAMPLING (1 << 4) - -+#if DETECT_ARCH_LOONGARCH64 -+#define GALLIVM_PERF_OPT_O1 (1 << 5) -+#define GALLIVM_PERF_OPT_O2 (1 << 6) -+#define GALLIVM_PERF_OPT_O3 (1 << 7) -+#endif -+ - #ifdef __cplusplus - extern "C" { - #endif -diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c -index 5a27977..9cf9749 100644 ---- a/src/gallium/auxiliary/gallivm/lp_bld_init.c -+++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c -@@ -64,6 +64,11 @@ static const struct debug_named_value lp_bld_perf_flags[] = { - { "no_quad_lod", GALLIVM_PERF_NO_QUAD_LOD, "disable quad_lod optimization" }, - { "no_aos_sampling", GALLIVM_PERF_NO_AOS_SAMPLING, "disable aos sampling optimization" }, - { "nopt", GALLIVM_PERF_NO_OPT, "disable optimization passes to speed up shader compilation" }, -+#if DETECT_ARCH_LOONGARCH64 -+ { "o3", GALLIVM_PERF_OPT_O3, "enable aggressive optimization passes" }, -+ { "o2", GALLIVM_PERF_OPT_O2, "enable medium optimization passes" }, -+ { "o1", GALLIVM_PERF_OPT_O1, "enable less optimization passes" }, -+#endif - DEBUG_NAMED_VALUE_END - }; - -@@ -278,7 +283,16 @@ init_gallivm_engine(struct gallivm_state *gallivm) - optlevel = None; - } - else { -- optlevel = Default; -+#if DETECT_ARCH_LOONGARCH64 -+ if (gallivm_perf & GALLIVM_PERF_OPT_O3) -+ optlevel = Aggressive; -+ else if (gallivm_perf & GALLIVM_PERF_OPT_O2) -+ optlevel = Default; -+ else if (gallivm_perf & GALLIVM_PERF_OPT_O1) -+ optlevel = Less; -+ else -+#endif -+ optlevel = Default; - } - - ret = lp_build_create_jit_compiler_for_module(&gallivm->engine, --- -2.20.1 - diff --git a/Mesa-MLAA-License-Clarification-Email.txt b/Mesa-MLAA-License-Clarification-Email.txt new file mode 100644 index 0000000000000000000000000000000000000000..30bdf2e9ddb1be3ff0ac49c20ea2563f2dc2bce0 --- /dev/null +++ b/Mesa-MLAA-License-Clarification-Email.txt @@ -0,0 +1,117 @@ + +Subject: RE: Question about Mesa MLAA license +From: Jorge Jimenez +Date: 01/08/2013 12:50 PM +To: Tom Callaway +CC: "jorge@iryoku.com" + +Yes to both questions. + +Thanks, +Jorge + +From: Tom Callaway +Sent: January 8, 2013 6:49 PM +To: Jorge Jimenez +CC: jorge@iryoku.com +Subject: Re: Question about Mesa MLAA license + +On 01/08/2013 12:39 PM, Jorge Jimenez wrote: +> Hi Tom, +> +> What we meant with that is that we made an exception for clause 2. +> Instead of clause 2, in the case of the Mesa project, you have to name +> the technique Jimenez's MLAA in the config options of Mesa. We did that +> just to allow them to solve license issues. This exception should be for +> the Mesa project, and any project using Mesa, like Fedora. +> +> We want to widespread usage of our MLAA, so we want to avoid any kind of +> license complications. Hope current one is good for Fedora, if not +> please tell, and we'll see what we can do! + +Okay, a few more questions: + +* If Fedora decides to simply reproduce the quoted statement: +"Uses Jimenez's MLAA. Copyright (C) 2010 by Jorge Jimenez, Belen Masia, +Jose I. Echevarria, Fernando Navarro and Diego Gutierrez." + +Specifically, if this is done as part of documentation included with +Mesa, is that sufficient to meet clause 2 even if the Mesa config option +is not set as described in your exception? + +* Currently, the Mesa config option for MLAA says: "Morphological +anti-aliasing based on Jimenez\' MLAA. 0 to disable, 8 for default +quality". Is this in compliance with your exception? + +Thanks again, + +~tom + +== +Fedora Project + +Subject: RE: Question about Mesa MLAA license +From: Jorge Jimenez +Date: 01/08/2013 12:39 PM +To: "jorge@iryoku.com" , Tom Callaway + +Hi Tom, + +What we meant with that is that we made an exception for clause 2. +Instead of clause 2, in the case of the Mesa project, you have to name +the technique Jimenez's MLAA in the config options of Mesa. We did that +just to allow them to solve license issues. This exception should be for +the Mesa project, and any project using Mesa, like Fedora. + +We want to widespread usage of our MLAA, so we want to avoid any kind of +license complications. Hope current one is good for Fedora, if not +please tell, and we'll see what we can do! + +Cheers, +Jorge + +From: Tom Callaway +Sent: January 8, 2013 6:30 PM +To: jorge@iryoku.com +Subject: Question about Mesa MLAA license + +Jorge, + +Thanks for all of your fantastic graphics work! I have been auditing +Fedora (a popular distribution of Linux) for license compliance and I +came across your MLAA code in Mesa. + +The license says: + + * 2. Redistributions in binary form must reproduce the following +statement: + * + * "Uses Jimenez's MLAA. Copyright (C) 2010 by Jorge Jimenez, Belen Masia, + * Jose I. Echevarria, Fernando Navarro and Diego Gutierrez." + * + * Only for use in the Mesa project, this point 2 is filled by naming the + * technique Jimenez's MLAA in the Mesa config options. + +That wording is unclear. When you say "Only for use in the Mesa +project...", it seems like you could either be saying: + +- This code may only be used as part of Mesa. + +OR + +- In Mesa, you can comply with clause 2 by simply selecting "Jimenez's +MLAA" in the Mesa config options. + +***** + +If the first item is true, then we may have to remove the MLAA code from +Fedora's copy of Mesa. However, looking at the license on your SMAA +code, I do not believe it to be the case. Please let me know either way! + +Thanks in advance, + +Tom Callaway +Fedora Legal + +== +Fedora Project diff --git a/gnome-shell-glthread-disable.patch b/gnome-shell-glthread-disable.patch new file mode 100644 index 0000000000000000000000000000000000000000..b2caeb8df58685bd2596be8247707d49181126ca --- /dev/null +++ b/gnome-shell-glthread-disable.patch @@ -0,0 +1,11 @@ +diff -up mesa-22.3.0-rc4/src/util/00-mesa-defaults.conf.dma mesa-22.3.0-rc4/src/util/00-mesa-defaults.conf +--- mesa-22.3.0-rc4/src/util/00-mesa-defaults.conf.dma 2022-11-25 10:32:32.175879868 +1000 ++++ mesa-22.3.0-rc4/src/util/00-mesa-defaults.conf 2022-11-25 10:32:43.743067470 +1000 +@@ -653,6 +653,7 @@ TODO: document the other workarounds. + + + +