On 9 June 2017 at 01:26, gurchetansi...@chromium.org <gurchetansi...@chromium.org> wrote: > From: Gurchetan Singh <gurchetansi...@chromium.org> > > This image extension is is needed by the Android studio emulator > when using the host's GLES implementation. > > This patch moves the extension code from dri2.c to dri_extensions.c. > Since some functions in this extension are initialized at runtime by > dri2.c, we need to expose them in dri_extensions.h. > --- > src/gallium/state_trackers/dri/dri2.c | 756 ----------------------- > src/gallium/state_trackers/dri/dri_extensions.c | 770 > +++++++++++++++++++++++- > src/gallium/state_trackers/dri/dri_extensions.h | 17 + > 3 files changed, 784 insertions(+), 759 deletions(-) > > diff --git a/src/gallium/state_trackers/dri/dri2.c > b/src/gallium/state_trackers/dri/dri2.c
> +/* The extension is modified during runtime if DRI_PRIME is detected */ > +__DRIimageExtension dri2ImageExtension = { > + .base = { __DRI_IMAGE, 12 }, > + > + .createImageFromName = dri2_create_image_from_name, > + .createImageFromRenderbuffer = dri2_create_image_from_renderbuffer, > + .destroyImage = dri2_destroy_image, > + .createImage = dri2_create_image, > + .queryImage = dri2_query_image, > + .dupImage = dri2_dup_image, > + .validateUsage = dri2_validate_usage, > + .createImageFromNames = dri2_from_names, > + .fromPlanar = dri2_from_planar, > + .createImageFromTexture = dri2_create_from_texture, > + .createImageFromFds = NULL, > + .createImageFromDmaBufs = NULL, > + .blitImage = dri2_blit_image, > + .getCapabilities = dri2_get_capabilities, > + .mapImage = dri2_map_image, > + .unmapImage = dri2_unmap_image, > +}; > + From the above only .createImageFromNames, .createImageFromRenderbuffer and .destroyImage are needed for EGL_KHR_gl_image. Although a bit strange to keep separate, we don't want to bring drm_driver.h, drm.h, xf86drm.h and alike when building drisw. I.e. I'd move only those - be that to dri_extensions.c or other file. -Emil _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev