Fix egl on s390x

Resolves: https://issues.redhat.com/browse/RHEL-44948
This commit is contained in:
José Expósito 2024-06-26 13:16:15 +02:00
parent fb36fb8f79
commit f664770f20
2 changed files with 40 additions and 1 deletions

34
fix-s390x-modes.patch Normal file
View File

@ -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],

View File

@ -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 <jexposit@redhat.com> - 24.1.0-3
- Fix egl on s390x
Resolves: https://issues.redhat.com/browse/RHEL-44948
* Mon Jun 10 2024 José Expósito <jexposit@redhat.com> - 24.1.0-2
- spirv-llvm-translator: Fix compilation with new spirv-headers