diff options
Diffstat (limited to 'src/gallium/state_trackers/egl/common/egl_g3d_image.c')
-rw-r--r-- | src/gallium/state_trackers/egl/common/egl_g3d_image.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/gallium/state_trackers/egl/common/egl_g3d_image.c b/src/gallium/state_trackers/egl/common/egl_g3d_image.c index b53b121005..1d23305402 100644 --- a/src/gallium/state_trackers/egl/common/egl_g3d_image.c +++ b/src/gallium/state_trackers/egl/common/egl_g3d_image.c @@ -35,7 +35,6 @@ #include "native.h" #include "egl_g3d.h" -#include "egl_g3d_api.h" #include "egl_g3d_image.h" /* for struct winsys_handle */ @@ -53,17 +52,11 @@ static struct pipe_resource * egl_g3d_reference_native_pixmap(_EGLDisplay *dpy, EGLNativePixmapType pix) { struct egl_g3d_display *gdpy = egl_g3d_display(dpy); - struct egl_g3d_config *gconf; struct native_surface *nsurf; struct pipe_resource *textures[NUM_NATIVE_ATTACHMENTS]; enum native_attachment natt; - gconf = egl_g3d_config(egl_g3d_find_pixmap_config(dpy, pix)); - if (!gconf) - return NULL; - - nsurf = gdpy->native->create_pixmap_surface(gdpy->native, - pix, gconf->native); + nsurf = gdpy->native->create_pixmap_surface(gdpy->native, pix, NULL); if (!nsurf) return NULL; @@ -123,6 +116,7 @@ egl_g3d_create_drm_buffer(_EGLDisplay *dpy, _EGLImage *img, templ.width0 = attrs.Width; templ.height0 = attrs.Height; templ.depth0 = 1; + templ.array_size = 1; /* * XXX fix apps (e.g. wayland) and pipe drivers (e.g. i915) and remove the @@ -147,7 +141,7 @@ egl_g3d_reference_drm_buffer(_EGLDisplay *dpy, EGLint name, _EGLImageAttribs attrs; EGLint format; - if (dpy->Platform != _EGL_PLATFORM_DRM) + if (!dpy->Extensions.MESA_drm_image) return NULL; if (_eglParseImageAttribList(&attrs, dpy, attribs) != EGL_SUCCESS) @@ -236,10 +230,12 @@ egl_g3d_reference_android_native_buffer(_EGLDisplay *dpy, memset(&templ, 0, sizeof(templ)); templ.target = PIPE_TEXTURE_2D; templ.format = format; - templ.bind = PIPE_BIND_RENDER_TARGET | PIPE_BIND_SAMPLER_VIEW; + /* assume for texturing only */ + templ.bind = PIPE_BIND_SAMPLER_VIEW; templ.width0 = buf->width; templ.height0 = buf->height; templ.depth0 = 1; + templ.array_size = 1; res = gdpy->native->buffer->import_buffer(gdpy->native, &templ, (void *) buf); @@ -385,7 +381,7 @@ egl_g3d_export_drm_image(_EGLDriver *drv, _EGLDisplay *dpy, _EGLImage *img, struct egl_g3d_image *gimg = egl_g3d_image(img); struct winsys_handle wsh; - if (dpy->Platform != _EGL_PLATFORM_DRM) + if (!dpy->Extensions.MESA_drm_image) return EGL_FALSE; /* get shared handle */ |