Hi gents, On 10 June 2015 at 23:20, Zach Reizner <za...@google.com> wrote: > From: Haixia Shi <h...@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: egl/dri2: change platform_null to platform_surfaceless > Normal approach in mesa is to list the changes in each version either in the commit message or after the --- line. Resending revised patch while keeping the same version tag is confusing/misleading.
> Signed-off-by: Haixia Shi <h...@chromium.org> > Signed-off-by: Zach Reizner <za...@google.com> > --- > configure.ac | 3 +- > src/egl/drivers/dri2/Makefile.am | 5 + > src/egl/drivers/dri2/egl_dri2.c | 13 ++- > src/egl/drivers/dri2/egl_dri2.h | 3 + > src/egl/drivers/dri2/platform_surfaceless.c | 167 > ++++++++++++++++++++++++++++ > src/egl/main/Makefile.am | 4 + > src/egl/main/egldisplay.c | 3 +- > src/egl/main/egldisplay.h | 1 + > 8 files changed, 194 insertions(+), 5 deletions(-) > create mode 100644 src/egl/drivers/dri2/platform_surfaceless.c > > diff --git a/configure.ac b/configure.ac > index 4ed4b74..c91c616 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -1789,7 +1789,7 @@ for plat in $egl_platforms; do > AC_MSG_ERROR([EGL platform drm requires libdrm >= > $LIBDRM_REQUIRED]) > ;; > > - android|gdi|null) > + android|gdi|surfaceless|null) Afaict surfaceless does require libdrm. Would be nice to check if the LIBDRM_REQUIRED provides all the requirements, and bump it otherwise. > diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c > index a428f28..b7ec811 100644 > --- a/src/egl/drivers/dri2/egl_dri2.c > +++ b/src/egl/drivers/dri2/egl_dri2.c > @@ -541,7 +541,7 @@ dri2_setup_screen(_EGLDisplay *disp) > disp->Extensions.KHR_gl_texture_2D_image = EGL_TRUE; > disp->Extensions.KHR_gl_texture_cubemap_image = EGL_TRUE; > } > -#ifdef HAVE_LIBDRM > +#if defined(HAVE_DRM_PLATFORM) || defined(HAVE_SURFACELESS_PLATFORM) Why change HAVE_LIBDRM to HAVE_DRM_PLATFORM - rebase slip ? If so we can drop these changes altogether. > --- /dev/null > +++ b/src/egl/drivers/dri2/platform_surfaceless.c > +EGLBoolean > +dri2_initialize_surfaceless(_EGLDriver *drv, _EGLDisplay *disp) > +{ > + for (i = 0; dri2_dpy->driver_configs[i]; i++) { > + EGLint attr_list[1]; > + attr_list[0] = EGL_NONE; Bikeshed: Please add an empty line between variable declaration and code + initialise the variable on declaration. Just like you've already done in other parts of the patch. > + dri2_add_config(disp, dri2_dpy->driver_configs[i], > + i + 1, EGL_WINDOW_BIT, attr_list, NULL); > + } > + > + disp->Extensions.KHR_image_base = EGL_TRUE; > + > + /* we're supporting EGL 1.4 */ > + disp->VersionMajor = 1; > + disp->VersionMinor = 4; > + Marek had a patch that drops these from the platform backends yet it seems like it never landed :'-( Cheers, Emil _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev