summaryrefslogtreecommitdiffstats
path: root/src/gallium/targets/egl-static
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/targets/egl-static')
-rw-r--r--src/gallium/targets/egl-static/Makefile.am9
-rw-r--r--src/gallium/targets/egl-static/egl_pipe.c22
2 files changed, 31 insertions, 0 deletions
diff --git a/src/gallium/targets/egl-static/Makefile.am b/src/gallium/targets/egl-static/Makefile.am
index 5c40ae8e145..31dbc791ddc 100644
--- a/src/gallium/targets/egl-static/Makefile.am
+++ b/src/gallium/targets/egl-static/Makefile.am
@@ -191,6 +191,15 @@ egl_gallium_la_LIBADD += \
$(top_builddir)/src/gallium/drivers/svga/libsvga.la
endif
+if HAVE_GALLIUM_FREEDRENO
+AM_CPPFLAGS += -D_EGL_PIPE_FREEDRENO=1
+egl_gallium_la_LIBADD += \
+ $(top_builddir)/src/gallium/winsys/freedreno/drm/libfreedrenodrm.la \
+ $(top_builddir)/src/gallium/drivers/freedreno/libfreedreno.la \
+ $(FREEDRENO_LIBS)
+
+endif
+
if HAVE_GALLIUM_SOFTPIPE
AM_CPPFLAGS += -DGALLIUM_SOFTPIPE -DGALLIUM_RBUG -DGALLIUM_TRACE
egl_gallium_la_LIBADD += \
diff --git a/src/gallium/targets/egl-static/egl_pipe.c b/src/gallium/targets/egl-static/egl_pipe.c
index 407c6a8f236..e05490b5580 100644
--- a/src/gallium/targets/egl-static/egl_pipe.c
+++ b/src/gallium/targets/egl-static/egl_pipe.c
@@ -45,6 +45,8 @@
/* for vmwgfx */
#include "svga/drm/svga_drm_public.h"
#include "svga/svga_public.h"
+/* for freedreno */
+#include "freedreno/drm/freedreno_drm_public.h"
static struct pipe_screen *
pipe_i915_create_screen(int fd)
@@ -179,6 +181,24 @@ pipe_vmwgfx_create_screen(int fd)
#endif
}
+static struct pipe_screen *
+pipe_freedreno_create_screen(int fd)
+{
+#if _EGL_PIPE_FREEDRENO
+ struct pipe_screen *screen;
+
+ screen = fd_drm_screen_create(fd);
+ if (!screen)
+ return NULL;
+
+ screen = debug_screen_wrap(screen);
+
+ return screen;
+#else
+ return NULL;
+#endif
+}
+
struct pipe_screen *
egl_pipe_create_drm_screen(const char *name, int fd)
{
@@ -194,6 +214,8 @@ egl_pipe_create_drm_screen(const char *name, int fd)
return pipe_radeonsi_create_screen(fd);
else if (strcmp(name, "vmwgfx") == 0)
return pipe_vmwgfx_create_screen(fd);
+ else if (strcmp(name, "kgsl") == 0)
+ return pipe_freedreno_create_screen(fd);
else
return NULL;
}