mirror of
https://src.fedoraproject.org/rpms/mesa.git
synced 2024-11-24 09:32:42 +00:00
Fix missing configs with swrast
Resolves: rhbz#2303995
This commit is contained in:
parent
1f6b4daeb4
commit
cde0394bae
3 changed files with 76 additions and 0 deletions
|
@ -0,0 +1,36 @@
|
||||||
|
From d9e9b46dee6d30d127e52839fcb529183fd8ea15 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
|
||||||
|
Date: Wed, 4 Sep 2024 06:44:45 -0400
|
||||||
|
Subject: [PATCH] dril: also create double-buffered configs in swrast fallback
|
||||||
|
|
||||||
|
Fixes: 06d417af80b ("dril: use the super fallback path for software fallback")
|
||||||
|
---
|
||||||
|
src/gallium/targets/dril/dril_target.c | 11 +++++++++--
|
||||||
|
1 file changed, 9 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/gallium/targets/dril/dril_target.c b/src/gallium/targets/dril/dril_target.c
|
||||||
|
index 0caa3514dde..a94ab09858f 100644
|
||||||
|
--- a/src/gallium/targets/dril/dril_target.c
|
||||||
|
+++ b/src/gallium/targets/dril/dril_target.c
|
||||||
|
@@ -437,9 +437,16 @@ drilCreateNewScreen(int scrn, int fd,
|
||||||
|
const __DRIconfig **configs = init_dri2_configs(fd);
|
||||||
|
if (!configs && fd == -1) {
|
||||||
|
// otherwise set configs to point to our config list
|
||||||
|
- configs = calloc(ARRAY_SIZE(drilConfigs) + 1, sizeof(void *));
|
||||||
|
+ configs = calloc(ARRAY_SIZE(drilConfigs) * 2 + 1, sizeof(void *));
|
||||||
|
+ int c = 0;
|
||||||
|
for (int i = 0; i < ARRAY_SIZE(drilConfigs); i++) {
|
||||||
|
- configs[i] = mem_dup(&drilConfigs[i], sizeof(drilConfigs[i]));
|
||||||
|
+ /* create normal config */
|
||||||
|
+ configs[c++] = mem_dup(&drilConfigs[i], sizeof(drilConfigs[i]));
|
||||||
|
+
|
||||||
|
+ /* create double-buffered config */
|
||||||
|
+ configs[c] = mem_dup(&drilConfigs[i], sizeof(drilConfigs[i]));
|
||||||
|
+ struct gl_config *cfg = (void*)configs[c++];
|
||||||
|
+ cfg->doubleBufferMode = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.46.0
|
||||||
|
|
|
@ -0,0 +1,36 @@
|
||||||
|
From eee51cab8165be6e46286fd68c0f7df7fd76f3eb Mon Sep 17 00:00:00 2001
|
||||||
|
From: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
|
||||||
|
Date: Mon, 2 Sep 2024 10:42:50 -0400
|
||||||
|
Subject: [PATCH] dril: use the super fallback path for software fallback
|
||||||
|
|
||||||
|
just in case gbm init fails somehow, swrast should still be able to
|
||||||
|
return some kind of fbconfigs
|
||||||
|
|
||||||
|
Fixes: ef88af84676 ("dril: always take the egl init path")
|
||||||
|
---
|
||||||
|
src/gallium/targets/dril/dril_target.c | 9 +++++++--
|
||||||
|
1 file changed, 7 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/gallium/targets/dril/dril_target.c b/src/gallium/targets/dril/dril_target.c
|
||||||
|
index b7a6ada5197..0caa3514dde 100644
|
||||||
|
--- a/src/gallium/targets/dril/dril_target.c
|
||||||
|
+++ b/src/gallium/targets/dril/dril_target.c
|
||||||
|
@@ -435,8 +435,13 @@ drilCreateNewScreen(int scrn, int fd,
|
||||||
|
const __DRIconfig ***driver_configs, void *data)
|
||||||
|
{
|
||||||
|
const __DRIconfig **configs = init_dri2_configs(fd);
|
||||||
|
- if (!configs)
|
||||||
|
- return NULL;
|
||||||
|
+ if (!configs && fd == -1) {
|
||||||
|
+ // otherwise set configs to point to our config list
|
||||||
|
+ configs = calloc(ARRAY_SIZE(drilConfigs) + 1, sizeof(void *));
|
||||||
|
+ for (int i = 0; i < ARRAY_SIZE(drilConfigs); i++) {
|
||||||
|
+ configs[i] = mem_dup(&drilConfigs[i], sizeof(drilConfigs[i]));
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
|
||||||
|
// outpointer it
|
||||||
|
*driver_configs = configs;
|
||||||
|
--
|
||||||
|
2.46.0
|
||||||
|
|
|
@ -82,6 +82,10 @@ Source1: Mesa-MLAA-License-Clarification-Email.txt
|
||||||
|
|
||||||
Patch10: gnome-shell-glthread-disable.patch
|
Patch10: gnome-shell-glthread-disable.patch
|
||||||
Patch11: rhbz2270430.patch
|
Patch11: rhbz2270430.patch
|
||||||
|
# https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30979
|
||||||
|
Patch12: 0001-dril-use-the-super-fallback-path-for-software-fallba.patch
|
||||||
|
# https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31013
|
||||||
|
Patch13: 0001-dril-also-create-double-buffered-configs-in-swrast-f.patch
|
||||||
|
|
||||||
BuildRequires: meson >= 1.3.0
|
BuildRequires: meson >= 1.3.0
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
|
|
Loading…
Reference in a new issue