#include "pipe/p_compiler.h"
#include "pipe/p_format.h"
#include "pipe/p_state.h"
-#include "pipe/p_util.h"
#include "pipe/p_winsys.h"
+#include "util/u_memory.h"
#include "softpipe/sp_winsys.h"
#include "eglconfig.h"
static void
create_configs(_EGLDriver *drv, EGLDisplay dpy)
{
+ static const EGLint all_apis = (EGL_OPENGL_ES_BIT |
+ EGL_OPENGL_ES2_BIT |
+ EGL_OPENVG_BIT |
+ EGL_OPENGL_BIT);
_EGLDisplay *disp = _eglLookupDisplay(dpy);
XVisualInfo *visInfo, visTemplate;
int num_visuals, i;
SET_CONFIG_ATTRIB(config, EGL_STENCIL_SIZE, sbits);
SET_CONFIG_ATTRIB(config, EGL_NATIVE_VISUAL_ID, visid);
SET_CONFIG_ATTRIB(config, EGL_NATIVE_VISUAL_TYPE, vistype);
+ SET_CONFIG_ATTRIB(config, EGL_NATIVE_RENDERABLE, EGL_FALSE);
+ SET_CONFIG_ATTRIB(config, EGL_CONFORMANT, all_apis);
+ SET_CONFIG_ATTRIB(config, EGL_RENDERABLE_TYPE, all_apis);
+ SET_CONFIG_ATTRIB(config, EGL_SURFACE_TYPE, EGL_WINDOW_BIT);
_eglAddConfig(disp, config);
}
ximage->data = data;
ximage->width = psurf->width;
ximage->height = psurf->height;
- ximage->bytes_per_line = psurf->pitch * psurf->cpp;
+ ximage->bytes_per_line = psurf->stride;
XPutImage(xsurf->Dpy, xsurf->Win, xsurf->Gc,
ximage, 0, 0, 0, 0, psurf->width, psurf->height);
/* API-dependent context creation */
switch (ctx->Base.ClientAPI) {
+ case EGL_OPENVG_API:
case EGL_OPENGL_ES_API:
_eglLog(_EGL_DEBUG, "Create Context for ES version %d\n",
ctx->Base.ClientVersion);
surf->Base.DeletePending = EGL_TRUE;
}
else {
+ XFreeGC(surf->Dpy, surf->Gc);
st_unreference_framebuffer(&surf->Framebuffer);
free(surf);
}