mesa/0001-dril-also-create-double-buffered-configs-in-swrast-f.patch

37 lines
1.5 KiB
Diff
Raw Normal View History

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