[Mesa-dev] [PATCH 2/6] gallium/targets: build freedreno pipe
Lucas Stach
l.stach at pengutronix.de
Wed Nov 6 08:22:52 PST 2013
Signed-off-by: Lucas Stach <l.stach at pengutronix.de>
---
src/gallium/targets/pipe-loader/Makefile.am | 16 ++++++++++++++++
src/gallium/targets/pipe-loader/pipe_freedreno.c | 21 +++++++++++++++++++++
2 files changed, 37 insertions(+)
create mode 100644 src/gallium/targets/pipe-loader/pipe_freedreno.c
diff --git a/src/gallium/targets/pipe-loader/Makefile.am b/src/gallium/targets/pipe-loader/Makefile.am
index e6772b8e3083..234da336a8f8 100644
--- a/src/gallium/targets/pipe-loader/Makefile.am
+++ b/src/gallium/targets/pipe-loader/Makefile.am
@@ -45,6 +45,22 @@ PIPE_LIBS = \
-lpthread \
-lm
+if HAVE_GALLIUM_FREEDRENO
+pipe_LTLIBRARIES += pipe_freedreno.la
+pipe_freedreno_la_SOURCES = pipe_freedreno.c
+nodist_EXTRA_pipe_freedreno_la_SOURCES = dummy.cpp
+pipe_freedreno_la_LIBADD = \
+ $(PIPE_LIBS) \
+ $(top_builddir)/src/gallium/winsys/freedreno/drm/libfreedrenodrm.la \
+ $(top_builddir)/src/gallium/drivers/freedreno/libfreedreno.la \
+ $(FREEDRENO_LIBS)
+pipe_freedreno_la_LDFLAGS = -no-undefined -avoid-version -module
+if HAVE_MESA_LLVM
+pipe_freedreno_la_LIBADD += $(LLVM_LIBS)
+pipe_freedreno_la_LDFLAGS += $(LLVM_LDFLAGS)
+endif
+endif
+
if HAVE_GALLIUM_I915
pipe_LTLIBRARIES += pipe_i915.la
pipe_i915_la_SOURCES = pipe_i915.c
diff --git a/src/gallium/targets/pipe-loader/pipe_freedreno.c b/src/gallium/targets/pipe-loader/pipe_freedreno.c
new file mode 100644
index 000000000000..72d24ba4428b
--- /dev/null
+++ b/src/gallium/targets/pipe-loader/pipe_freedreno.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("freedreno", "freedreno", create_screen, NULL)
--
1.8.4.rc3
More information about the mesa-dev
mailing list