[Mesa-dev] [PATCH mesa 3/5] egl: add note about checking the extension string length

Eric Engestrom eric at engestrom.ch
Wed Mar 1 23:31:52 UTC 2017


The current string uses up to 910/1000 chars, so a couple more
extensions will bring it over, but would go unnoticed if not tested
with all extensions active.

Signed-off-by: Eric Engestrom <eric at engestrom.ch>
---
 src/egl/main/eglapi.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
index 220e53be8c..274dcde01d 100644
--- a/src/egl/main/eglapi.c
+++ b/src/egl/main/eglapi.c
@@ -478,7 +478,9 @@ _eglCreateExtensionsString(_EGLDisplay *dpy)
 
    char *exts = dpy->ExtensionsString;
 
-   /* Please keep these sorted alphabetically. */
+   /* Please keep these sorted alphabetically.
+    * NOTE: when adding extensions, make sure _EGL_MAX_EXTENSIONS_LEN stays
+    * big enough to handle all extensions being enabled. */
    _EGL_CHECK_EXTENSION(ANDROID_framebuffer_target);
    _EGL_CHECK_EXTENSION(ANDROID_image_native_buffer);
    _EGL_CHECK_EXTENSION(ANDROID_native_fence_sync);
-- 
Cheers,
  Eric



More information about the mesa-dev mailing list