summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers/dri2/egl_dri2.c
diff options
context:
space:
mode:
authorHaixia Shi <[email protected]>2015-06-12 10:10:58 -0700
committerChad Versace <[email protected]>2015-06-16 13:55:26 -0700
commit6b8accb36b541f77774109ea42533c02bb90bc68 (patch)
treec30855c85059124e6564165010ba610d9c991b5a /src/egl/drivers/dri2/egl_dri2.c
parentc753866cc4ae15313430f9b6edba1b82e44b003a (diff)
egl/dri2: implement platform_surfaceless
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 v4: make libdrm required for surfaceless v5: remove modified include guards with defined(HAVE_SURFACELESS_PLATFORM) v6: use O_CLOEXEC for drm fd Signed-off-by: Haixia Shi <[email protected]> Signed-off-by: Zach Reizner <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/egl/drivers/dri2/egl_dri2.c')
-rw-r--r--src/egl/drivers/dri2/egl_dri2.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index dceb9a011d9..a1cbd437f53 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -667,6 +667,13 @@ dri2_initialize(_EGLDriver *drv, _EGLDisplay *disp)
return EGL_FALSE;
switch (disp->Platform) {
+#ifdef HAVE_SURFACELESS_PLATFORM
+ case _EGL_PLATFORM_SURFACELESS:
+ if (disp->Options.TestOnly)
+ return EGL_TRUE;
+ return dri2_initialize_surfaceless(drv, disp);
+#endif
+
#ifdef HAVE_X11_PLATFORM
case _EGL_PLATFORM_X11:
if (disp->Options.TestOnly)