From f664770f20e53299e8702ecfc9ca06540fe5ff9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Exp=C3=B3sito?= Date: Wed, 26 Jun 2024 13:16:15 +0200 Subject: [PATCH] Fix egl on s390x Resolves: https://issues.redhat.com/browse/RHEL-44948 --- fix-s390x-modes.patch | 34 ++++++++++++++++++++++++++++++++++ mesa.spec | 7 ++++++- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 fix-s390x-modes.patch diff --git a/fix-s390x-modes.patch b/fix-s390x-modes.patch new file mode 100644 index 0000000..9e62f34 --- /dev/null +++ b/fix-s390x-modes.patch @@ -0,0 +1,34 @@ +diff -up mesa-24.1.0/src/gallium/frontends/dri/dri_screen.c.s390x mesa-24.1.0/src/gallium/frontends/dri/dri_screen.c +--- mesa-24.1.0/src/gallium/frontends/dri/dri_screen.c.s390x 2024-06-20 14:57:54.495763904 -0400 ++++ mesa-24.1.0/src/gallium/frontends/dri/dri_screen.c 2024-06-20 15:01:33.555766438 -0400 +@@ -386,17 +386,21 @@ dri_fill_in_modes(struct dri_screen *scr + uint8_t msaa_modes[MSAA_VISUAL_MAX_SAMPLES]; + + /* Expose only BGRA ordering if the loader doesn't support RGBA ordering. */ +- if (!allow_rgba_ordering && +- util_format_get_component_shift(pipe_formats[f], +- UTIL_FORMAT_COLORSPACE_RGB, 0) ++ if (!allow_rgba_ordering) { ++ unsigned sh_ax = util_format_get_component_shift(pipe_formats[f], UTIL_FORMAT_COLORSPACE_RGB, 3); ++ unsigned sh_b = util_format_get_component_shift(pipe_formats[f], UTIL_FORMAT_COLORSPACE_RGB, 2); + #if UTIL_ARCH_BIG_ENDIAN +- > ++ unsigned sz_b = util_format_get_component_bits(pipe_formats[f], UTIL_FORMAT_COLORSPACE_RGB, 2); ++ ++ if (sz_b + sh_b == sh_ax) ++ continue; + #else +- < ++ unsigned sz_ax = util_format_get_component_bits(pipe_formats[f], UTIL_FORMAT_COLORSPACE_RGB, 3); ++ ++ if (sz_ax + sh_ax == sh_b) ++ continue; + #endif +- util_format_get_component_shift(pipe_formats[f], +- UTIL_FORMAT_COLORSPACE_RGB, 2)) +- continue; ++ } + + if (!allow_rgb10 && + util_format_get_component_bits(pipe_formats[f], + diff --git a/mesa.spec b/mesa.spec index df44163..422590a 100644 --- a/mesa.spec +++ b/mesa.spec @@ -70,7 +70,7 @@ Name: mesa Summary: Mesa graphics libraries %global ver 24.1.0 Version: %{lua:ver = string.gsub(rpm.expand("%{ver}"), "-", "~"); print(ver)} -Release: 2%{?dist} +Release: 3%{?dist} License: MIT AND BSD-3-Clause AND SGI-B-2.0 URL: http://www.mesa3d.org @@ -112,6 +112,7 @@ BuildRequires: wayland-devel # mesa patches (< 10000) Patch10: gnome-shell-glthread-disable.patch +Patch11: fix-s390x-modes.patch # spirv-llvm-translator (>= 10000) Patch10000: 0001-Update-LongConstantCompositeINTEL-to-LongCompositesI.patch @@ -865,6 +866,10 @@ popd %endif %changelog +* Wed Jun 26 2024 José Expósito - 24.1.0-3 +- Fix egl on s390x + Resolves: https://issues.redhat.com/browse/RHEL-44948 + * Mon Jun 10 2024 José Expósito - 24.1.0-2 - spirv-llvm-translator: Fix compilation with new spirv-headers