summaryrefslogtreecommitdiff
path: root/lib/libGL/dri
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2012-07-13 12:54:21 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2012-07-13 12:54:21 +0000
commit1b5da2f821086d7f1dd6be73bc42047027927f2b (patch)
tree5498c177e6d2351a752aaccd75dd2402037ee7bf /lib/libGL/dri
parent7d3eb3cd29c542495050f7f2337fa879c1e77392 (diff)
Import swrastg the Gallium3D software rasterizer. It uses the softpipe
driver by default but can also use the llvmpipe driver that use LLVM for code generation if available. Not yet linked to the build as it depends on pthreads and we don't know yet how to handle the switch from the default 'swrast' driver, but having it in tree will help testing and debugging the remaining issues. Tested by ajacoutot@ and matthieu@, looks ok to matthieu@
Diffstat (limited to 'lib/libGL/dri')
-rw-r--r--lib/libGL/dri/swrastg/Makefile54
1 files changed, 54 insertions, 0 deletions
diff --git a/lib/libGL/dri/swrastg/Makefile b/lib/libGL/dri/swrastg/Makefile
new file mode 100644
index 000000000..8bac1d30b
--- /dev/null
+++ b/lib/libGL/dri/swrastg/Makefile
@@ -0,0 +1,54 @@
+# $OpenBSD: Makefile,v 1.1 2012/07/13 12:54:20 mpi Exp $
+
+LIB= swrast_dri.so
+
+GALLIUM= ${.CURDIR}/../../../../dist/Mesa/src/gallium
+
+CPPFLAGS= \
+ -I${GALLIUM}/include \
+ -I${GALLIUM}/auxiliary \
+ -I${GALLIUM}/drivers \
+ -I${GALLIUM}/winsys/sw/dri
+
+DRIVER_LIBS= \
+ ../../gallium/drivers/trace/libtrace_pic.a \
+ ../../gallium/drivers/rbug/librbug_pic.a \
+ ../../gallium/drivers/softpipe/libsoftpipe_pic.a
+
+.ifdef XENOCARA_HAVE_LLVM
+DRIVER_LIBS+= ../../gallium/drivers/llvmpipe/libllvmpipe_pic.a
+.endif
+
+DRIVER_DEFINES = \
+ -D__NOT_HAVE_DRM_H \
+ -DGALLIUM_SOFTPIPE \
+ -DGALLIUM_RBUG \
+ -DGALLIUM_TRACE
+
+SWRAST_COMMON_SOURCES = \
+ utils.c \
+ drisw_util.c \
+ xmlconfig.c
+
+DRIVER_SOURCES = \
+ swrast_drm_api.c
+
+SRCS = \
+ ${SWRAST_COMMON_SOURCES} \
+ ${DRIVER_SOURCES}
+
+LDADD= ../../gallium/libmesagallium/libmesagallium_pic.a \
+ ../../glsl/libglsl/libglsl_pic.a \
+ ${DRIVER_LIBS} \
+ ../../gallium/libgallium/libgallium_pic.a \
+ -L${X11BASE}/lib -lexpat -lm -lstdc++ -lc -pthread
+# XXX This is wrong but the gallium drivers depend on libpthread
+# and some bindings still fail even with the LD_PRELOAD hack when
+# starting X.
+#LDADD+= -lpthread
+DPADD= ../../gallium/libmesagallium/libmesagallium_pic.a
+
+.include "../../gallium/Makefile.inc"
+.include <bsd.xorg.mk>
+
+.PATH: ${GALLIUM}/targets/dri-swrast