SHA256
1
0
forked from pool/Mesa

Accepting request 1183148 from home:sndirsch:branches:X11:XOrg

- u_dri-Fix-BGR-format-exclusion.patch
  * fixes glxinfo/eglxinfo on s390x (boo#1226725, comment#6)

OBS-URL: https://build.opensuse.org/request/show/1183148
OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/Mesa?expand=0&rev=1307
This commit is contained in:
Stefan Dirsch 2024-06-25 11:43:33 +00:00 committed by Git OBS Bridge
parent 71de1f37ae
commit 943478c94a
3 changed files with 62 additions and 1 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Jun 25 11:14:15 UTC 2024 - Stefan Dirsch <sndirsch@suse.com>
- u_dri-Fix-BGR-format-exclusion.patch
* fixes glxinfo/eglxinfo on s390x (boo#1226725, comment#6)
-------------------------------------------------------------------
Sun Jun 23 00:24:07 UTC 2024 - Soc Virnyl Estela <obs@uncomfyhalomacro.pl>

View File

@ -1,5 +1,5 @@
#
# spec file for package Mesa
# spec file
#
# Copyright (c) 2024 SUSE LLC
#
@ -183,6 +183,7 @@ Patch54: n_drirc-disable-rgb10-for-chromium-on-amd.patch
Patch58: u_dep_xcb.patch
Patch100: U_fix-mpeg1_2-decode-mesa-20.2.patch
Patch400: n_stop-iris-flicker.patch
Patch500: u_dri-Fix-BGR-format-exclusion.patch
%ifarch %{ix86} x86_64
BuildRequires: DirectX-Headers
%endif
@ -837,6 +838,7 @@ cp %{SOURCE6} subprojects/packagecache/
%patch -P 58 -p1
%patch -P 100 -p1
%patch -P 400 -p1
%patch -P 500 -p1
# Remove requires to vulkan libs from baselibs.conf on platforms
# where vulkan build is disabled; ugly ...

View File

@ -0,0 +1,53 @@
From 79ca6e3a329dbfc3bc68df37b8f3ea7156e41aae Mon Sep 17 00:00:00 2001
From: Daniel Stone <daniels@collabora.com>
Date: Fri, 21 Jun 2024 11:24:31 +0100
Subject: [PATCH] dri: Fix BGR format exclusion
The check we had for BGR vs. RGB formats was testing completely the
wrong thing. Fix it so we can restore the previous set of configs we
expose to the frontend, which also fixes surfaceless platform on s390x.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Fixes: ad0edea53a73 ("st/dri: Check format properties from format helpers")
Closes: mesa/mesa#11360
---
src/gallium/frontends/dri/dri_screen.c | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/src/gallium/frontends/dri/dri_screen.c b/src/gallium/frontends/dri/dri_screen.c
index 6bc61dbd641..debff54c090 100644
--- a/src/gallium/frontends/dri/dri_screen.c
+++ b/src/gallium/frontends/dri/dri_screen.c
@@ -386,17 +386,21 @@ dri_fill_in_modes(struct dri_screen *screen)
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],
--
2.35.3