egl: implment EGL_LARGEST_PBUFFER query
authorBrian Paul <brian.paul@tungstengraphics.com>
Fri, 20 Jun 2008 16:20:25 +0000 (10:20 -0600)
committerBrian Paul <brian.paul@tungstengraphics.com>
Fri, 20 Jun 2008 16:20:25 +0000 (10:20 -0600)
src/egl/main/egldriver.h
src/egl/main/eglsurface.c

index 7827ca3ae3d91b5059383b9646f8cecac409fb96..4066c6ec1df9b9c3ab134a7ce78763b7423b7d88 100644 (file)
@@ -39,6 +39,8 @@ struct _egl_driver
    _EGLAPI API;  /**< EGL API dispatch table */
 
    _EGLExtensions Extensions;
+
+   int LargestPbuffer;
 };
 
 
index 796d62f2b94d2b636a2fee193cebd3d912cda471..3777049ca6dcd6fef307b04dd39c5e3173a36a80 100644 (file)
@@ -8,6 +8,7 @@
 #include <string.h>
 #include "eglcontext.h"
 #include "eglconfig.h"
+#include "egldriver.h"
 #include "eglglobals.h"
 #include "eglhash.h"
 #include "egllog.h"
@@ -319,7 +320,9 @@ _eglQuerySurface(_EGLDriver *drv, EGLDisplay dpy, EGLSurface surf,
    case EGL_CONFIG_ID:
       *value = GET_CONFIG_ATTRIB(surface->Config, EGL_CONFIG_ID);
       return EGL_TRUE;
-   /*XXX case EGL_LARGEST_PBUFFER:*/
+   case EGL_LARGEST_PBUFFER:
+      *value = drv->LargestPbuffer;
+      return EGL_TRUE;
    case EGL_SURFACE_TYPE:
       *value = surface->Type;
       return EGL_TRUE;