Mesa (master): egl_dri2: Discard similar configs
Kristian Høgsberg
krh at kemper.freedesktop.org
Fri May 13 13:34:26 UTC 2011
Module: Mesa
Branch: master
Commit: 83c68758be3589edeab4d20346388241dc2ebaac
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=83c68758be3589edeab4d20346388241dc2ebaac
Author: Benjamin Franzke <benjaminfranzke at googlemail.com>
Date: Thu May 12 19:30:05 2011 +0200
egl_dri2: Discard similar configs
---
src/egl/drivers/dri2/egl_dri2.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index 10309e6..ea8c8fb 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -200,10 +200,8 @@ dri2_add_config(_EGLDisplay *disp, const __DRIconfig *dri_config, int id,
else if (!double_buffer && !conf->dri_single_config)
conf->dri_single_config = dri_config;
else
- /* a similar config type is already added
- * => attach it as new config
- */
- num_configs = 0;
+ /* a similar config type is already added (unlikely) => discard */
+ return NULL;
}
else if (num_configs == 0) {
conf = malloc(sizeof *conf);
More information about the mesa-commit
mailing list