X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=progs%2Fopenvg%2Ftrivial%2Feglcommon.c;h=0316e596c69b0409a4e9135a1fb30dc72d24eb3a;hb=0a18cdb0ed2f4b747688f653d9947d174fae77ff;hp=bacd5685d759ddbdf25f82dd0bea8db0f8b9054d;hpb=7549a8397b310acf672f97a08c8e7d866cdf492c;p=mesa.git diff --git a/progs/openvg/trivial/eglcommon.c b/progs/openvg/trivial/eglcommon.c index bacd5685d75..0316e596c69 100644 --- a/progs/openvg/trivial/eglcommon.c +++ b/progs/openvg/trivial/eglcommon.c @@ -42,6 +42,7 @@ make_x_window(Display *x_dpy, EGLDisplay egl_dpy, EGL_RED_SIZE, 1, EGL_GREEN_SIZE, 1, EGL_BLUE_SIZE, 1, + EGL_RENDERABLE_TYPE, EGL_OPENVG_BIT, EGL_NONE }; @@ -60,13 +61,13 @@ make_x_window(Display *x_dpy, EGLDisplay egl_dpy, scrnum = DefaultScreen( x_dpy ); root = RootWindow( x_dpy, scrnum ); - if (!eglChooseConfig( egl_dpy, attribs, &config, 1, &num_configs)) { + if (!eglChooseConfig( egl_dpy, attribs, &config, 1, &num_configs) || + !num_configs) { printf("Error: couldn't get an EGL visual config\n"); exit(1); } assert(config); - assert(num_configs > 0); if (!eglGetConfigAttrib(egl_dpy, config, EGL_NATIVE_VISUAL_ID, &vid)) { printf("Error: eglGetConfigAttrib() failed\n");