[Mesa-dev] [PATCH v3] egl/dri2: implement platform_surfaceless (v3)
Chad Versace
chad.versace at intel.com
Wed Jun 10 10:21:35 PDT 2015
On Mon 08 Jun 2015, Zach Reizner wrote:
> From: Haixia Shi <hshi at chromium.org>
>
> The surfaceless platform is for off-screen rendering only. Render node support
> is required.
>
> Only consider the render nodes. Do not use normal nodes as they require
> auth hooks.
>
> v3: change platform_null to platform_surfaceless
>
> Signed-off-by: Haixia Shi <hshi at chromium.org>
> Signed-off-by: Zach Reizner <zachr at google.com>
> ---
Thanks for fixing up the patch and resubmitting.
I found three small problems. After fixing them, I think this patch will
be ready for merging.
> +static __DRIbuffer *
> +surfaceless_get_buffers_with_format(__DRIdrawable * driDrawable,
> + int *width, int *height,
> + unsigned int *attachments, int count,
> + int *out_count, void *loaderPrivate)
> +{
> + struct dri2_egl_surface *dri2_surf = loaderPrivate;
> + struct dri2_egl_display *dri2_dpy =
> + dri2_egl_display(dri2_surf->base.Resource.Display);
dri2_dpy is unused.
src/egl/drivers/dri2/platform_surfaceless.c|65 col 29| warning: unused variable 'dri2_dpy' [-Wunused-variable]
struct dri2_egl_display *dri2_dpy =
^
[...]
> +EGLBoolean
> +dri2_initialize_surfaceless(_EGLDriver *drv, _EGLDisplay *disp)
> +{
> + struct dri2_egl_display *dri2_dpy;
> + const char* err;
> + int i, render_node;
render_node is unused.
src/egl/drivers/dri2/platform_surfaceless.c|84 col 11| warning: unused variable 'render_node' [-Wunused-variable]
int i, render_node;
^
[...]
> +cleanup_driver:
> + dlclose(dri2_dpy->driver);
> + free(dri2_dpy->driver_name);
> + close(dri2_dpy->fd);
> +cleanup_display:
> + free(dri2_dpy);
I think `close(dri2_dpy->fd)` should be moved to the cleanup_display
label.
> +
> + return _eglError(EGL_NOT_INITIALIZED, err);
> +}
More information about the mesa-dev
mailing list