Mesa (master): pipe-loader: add pipe loader for freedreno/msm

Rob Clark robclark at kemper.freedesktop.org
Sun Feb 16 13:50:52 UTC 2014


Module: Mesa
Branch: master
Commit: 8b5f894e13c0e290b2d3218ed8305e7428f2242f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8b5f894e13c0e290b2d3218ed8305e7428f2242f

Author: Rob Clark <robclark at freedesktop.org>
Date:   Mon Feb 10 10:45:36 2014 -0500

pipe-loader: add pipe loader for freedreno/msm

Signed-off-by: Rob Clark <robclark at freedesktop.org>

---

 src/gallium/targets/pipe-loader/Makefile.am |   17 +++++++++++++++++
 src/gallium/targets/pipe-loader/pipe_msm.c  |   21 +++++++++++++++++++++
 2 files changed, 38 insertions(+)

diff --git a/src/gallium/targets/pipe-loader/Makefile.am b/src/gallium/targets/pipe-loader/Makefile.am
index 97733c1..72faee3 100644
--- a/src/gallium/targets/pipe-loader/Makefile.am
+++ b/src/gallium/targets/pipe-loader/Makefile.am
@@ -132,6 +132,23 @@ pipe_radeonsi_la_LDFLAGS += $(LLVM_LDFLAGS)
 endif
 endif
 
+if HAVE_GALLIUM_FREEDRENO
+pipe_LTLIBRARIES += pipe_msm.la
+pipe_msm_la_SOURCES = pipe_msm.c
+nodist_EXTRA_pipe_msm_la_SOURCES = dummy.cpp
+pipe_msm_la_LIBADD = \
+	$(PIPE_LIBS) \
+	$(top_builddir)/src/gallium/winsys/freedreno/drm/libfreedrenodrm.la \
+	$(top_builddir)/src/gallium/drivers/freedreno/libfreedreno.la \
+	$(LIBDRM_LIBS) \
+	$(FREEDRENO_LIBS)
+pipe_msm_la_LDFLAGS = -no-undefined -avoid-version -module
+if HAVE_MESA_LLVM
+pipe_msm_la_LIBADD += $(LLVM_LIBS)
+pipe_msm_la_LDFLAGS += $(LLVM_LDFLAGS)
+endif
+endif
+
 if HAVE_GALLIUM_SVGA
 pipe_LTLIBRARIES += pipe_vmwgfx.la
 pipe_vmwgfx_la_SOURCES = pipe_vmwgfx.c
diff --git a/src/gallium/targets/pipe-loader/pipe_msm.c b/src/gallium/targets/pipe-loader/pipe_msm.c
new file mode 100644
index 0000000..76e4023
--- /dev/null
+++ b/src/gallium/targets/pipe-loader/pipe_msm.c
@@ -0,0 +1,21 @@
+
+#include "target-helpers/inline_debug_helper.h"
+#include "state_tracker/drm_driver.h"
+#include "freedreno/drm/freedreno_drm_public.h"
+
+static struct pipe_screen *
+create_screen(int fd)
+{
+   struct pipe_screen *screen;
+
+   screen = fd_drm_screen_create(fd);
+   if (!screen)
+      return NULL;
+
+   screen = debug_screen_wrap(screen);
+
+   return screen;
+}
+
+PUBLIC
+DRM_DRIVER_DESCRIPTOR("msm", "freedreno", create_screen, NULL)




More information about the mesa-commit mailing list