[Mesa-dev] [PATCH 2/2] eg: explicitly size dri2_to_egl_attribute_map[]
Emil Velikov
emil.l.velikov at gmail.com
Mon May 1 18:43:39 UTC 2017
From: Emil Velikov <emil.velikov at collabora.com>
This way we'll get an implicit zero initialization of the remaining
members, as required by dri2_add_config().
Fixes: e5efaeb85c3 ("egl: polish dri2_to_egl_attribute_map[]")
Cc: Tomasz Figa <tfiga at chromium.org>
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
Tomasz, thanks for spotting this!
---
src/egl/drivers/dri2/egl_dri2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index 91456b025d5..0be7132ac58 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -102,7 +102,7 @@ const __DRIuseInvalidateExtension use_invalidate = {
.base = { __DRI_USE_INVALIDATE, 1 }
};
-static const EGLint dri2_to_egl_attribute_map[] = {
+static const EGLint dri2_to_egl_attribute_map[__DRI_ATTRIB_MAX] = {
[__DRI_ATTRIB_BUFFER_SIZE ] = EGL_BUFFER_SIZE,
[__DRI_ATTRIB_LEVEL] = EGL_LEVEL,
[__DRI_ATTRIB_RED_SIZE] = EGL_RED_SIZE,
--
2.12.2
More information about the mesa-dev
mailing list