summaryrefslogtreecommitdiff
path: root/progs/egl/eglinfo.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-02-09 09:22:22 -0700
committerBrian Paul <brianp@vmware.com>2009-02-09 09:22:22 -0700
commite97681c7f551a2a2a6bd5eff0f4192a870c816c0 (patch)
treedff2bf0e6d22efb92af131f64be0621ed316977c /progs/egl/eglinfo.c
parent1a46c8a062aea59de5cf55881104489db5d609e5 (diff)
parentb907d4cd8fafe719b4f87d877562829548937485 (diff)
mesa: merge gallium-0.2 into gallium-master-merge
Merge commit 'origin/gallium-0.2' into gallium-master-merge Conflicts: Makefile docs/relnotes-7.4.html docs/relnotes.html src/mesa/drivers/dri/i965/brw_wm.h src/mesa/main/imports.c src/mesa/main/mtypes.h src/mesa/main/texcompress.c src/mesa/main/texenvprogram.c src/mesa/main/version.h src/mesa/vbo/vbo_exec_api.c src/mesa/vbo/vbo_save_draw.c
Diffstat (limited to 'progs/egl/eglinfo.c')
-rw-r--r--progs/egl/eglinfo.c32
1 files changed, 20 insertions, 12 deletions
diff --git a/progs/egl/eglinfo.c b/progs/egl/eglinfo.c
index f9c2475445..feae954b75 100644
--- a/progs/egl/eglinfo.c
+++ b/progs/egl/eglinfo.c
@@ -24,8 +24,10 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
+#define EGL_EGLEXT_PROTOTYPES
-#include <GLES/egl.h>
+#include <EGL/egl.h>
+#include <EGL/eglext.h>
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
@@ -35,7 +37,6 @@
#define MAX_MODES 1000
#define MAX_SCREENS 10
-
/**
* Print table of all available configurations.
*/
@@ -48,15 +49,17 @@ PrintConfigs(EGLDisplay d)
eglGetConfigs(d, configs, MAX_CONFIGS, &numConfigs);
printf("Configurations:\n");
- printf(" bf lv d st colorbuffer dp st supported\n");
- printf(" id sz l b ro r g b a th cl surfaces \n");
- printf("---------------------------------------------------\n");
+ printf(" bf lv d st colorbuffer dp st ms vis supported\n");
+ printf(" id sz l b ro r g b a th cl ns b id surfaces \n");
+ printf("--------------------------------------------------------\n");
for (i = 0; i < numConfigs; i++) {
EGLint id, size, level;
EGLint red, green, blue, alpha;
EGLint depth, stencil;
EGLint surfaces;
EGLint doubleBuf = 1, stereo = 0;
+ EGLint vid;
+ EGLint samples, sampleBuffers;
char surfString[100] = "";
eglGetConfigAttrib(d, configs[i], EGL_CONFIG_ID, &id);
@@ -69,8 +72,12 @@ PrintConfigs(EGLDisplay d)
eglGetConfigAttrib(d, configs[i], EGL_ALPHA_SIZE, &alpha);
eglGetConfigAttrib(d, configs[i], EGL_DEPTH_SIZE, &depth);
eglGetConfigAttrib(d, configs[i], EGL_STENCIL_SIZE, &stencil);
+ eglGetConfigAttrib(d, configs[i], EGL_NATIVE_VISUAL_ID, &vid);
eglGetConfigAttrib(d, configs[i], EGL_SURFACE_TYPE, &surfaces);
+ eglGetConfigAttrib(d, configs[i], EGL_SAMPLES, &samples);
+ eglGetConfigAttrib(d, configs[i], EGL_SAMPLE_BUFFERS, &sampleBuffers);
+
if (surfaces & EGL_WINDOW_BIT)
strcat(surfString, "win,");
if (surfaces & EGL_PBUFFER_BIT)
@@ -84,12 +91,13 @@ PrintConfigs(EGLDisplay d)
if (strlen(surfString) > 0)
surfString[strlen(surfString) - 1] = 0;
- printf("0x%02x %2d %2d %c %c %2d %2d %2d %2d %2d %2d %-12s\n",
+ printf("0x%02x %2d %2d %c %c %2d %2d %2d %2d %2d %2d %2d%2d 0x%02x %-12s\n",
id, size, level,
doubleBuf ? 'y' : '.',
stereo ? 'y' : '.',
red, green, blue, alpha,
- depth, stencil, surfString);
+ depth, stencil,
+ samples, sampleBuffers, vid, surfString);
}
}
@@ -139,8 +147,8 @@ int
main(int argc, char *argv[])
{
int maj, min;
- /*EGLDisplay d = eglGetDisplay(EGL_DEFAULT_DISPLAY);*/
- EGLDisplay d = eglGetDisplay(":0");
+ //EGLDisplay d = eglGetDisplay((EGLNativeDisplayType)"!EGL_i915");
+ EGLDisplay d = eglGetDisplay((EGLNativeDisplayType)"!EGL_i915");
if (!eglInitialize(d, &maj, &min)) {
printf("eglinfo: eglInitialize failed\n");
@@ -150,14 +158,14 @@ main(int argc, char *argv[])
printf("EGL API version: %d.%d\n", maj, min);
printf("EGL vendor string: %s\n", eglQueryString(d, EGL_VENDOR));
printf("EGL version string: %s\n", eglQueryString(d, EGL_VERSION));
+#ifdef EGL_VERSION_1_2
+ printf("EGL client APIs: %s\n", eglQueryString(d, EGL_CLIENT_APIS));
+#endif
printf("EGL extensions string:\n");
printf(" %s\n", eglQueryString(d, EGL_EXTENSIONS));
- printf("\n");
PrintConfigs(d);
- printf("\n");
-
PrintModes(d);
eglTerminate(d);