diff options
author | Emil Velikov <[email protected]> | 2016-11-09 21:45:07 +0000 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2016-11-09 21:48:50 +0000 |
commit | aeaf21ab3e6cb3e628ff0219461cbd06f3a99d34 (patch) | |
tree | e8ebca6535d3e868b57bf076dc14e80a16e719fb /src/egl | |
parent | 5b92008ae279962dc09bcf98c9e5511a325a2bd9 (diff) |
Revert "egl: remove explicit config_id management from dri2_add_config()"
This reverts commit 3652d1d5942a857f225700d67ce2c900396982f2.
Self nack/reject on this one. The base.ConfigID is overwritten
immediately after we store the current value, thus one memcpy [further
down] the wrong value will be copied.
Diffstat (limited to 'src/egl')
-rw-r--r-- | src/egl/drivers/dri2/egl_dri2.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index 403f3d3b729..d9e2ad701b7 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -166,6 +166,7 @@ dri2_add_config(_EGLDisplay *disp, const __DRIconfig *dri_config, int id, unsigned int dri_masks[4] = { 0, 0, 0, 0 }; _EGLConfig *matching_config; EGLint num_configs = 0; + EGLint config_id; int i; _eglInitConfig(&base, disp, id); @@ -285,6 +286,7 @@ dri2_add_config(_EGLDisplay *disp, const __DRIconfig *dri_config, int id, return NULL; } + config_id = base.ConfigID; base.ConfigID = EGL_DONT_CARE; base.SurfaceType = EGL_DONT_CARE; num_configs = _eglFilterArray(disp->Configs, (void **) &matching_config, 1, @@ -313,6 +315,7 @@ dri2_add_config(_EGLDisplay *disp, const __DRIconfig *dri_config, int id, memcpy(&conf->base, &base, sizeof base); conf->base.SurfaceType = 0; + conf->base.ConfigID = config_id; _eglLinkConfig(&conf->base); } |