summaryrefslogtreecommitdiffstats
path: root/src/gallium/targets
diff options
context:
space:
mode:
authorThomas Hellstrom <[email protected]>2011-07-04 10:21:35 +0200
committerThomas Hellstrom <[email protected]>2011-07-04 10:21:35 +0200
commit424b1210d951c206e7c2fb8f2778acbd384eb247 (patch)
tree964884074e08de8072ef535ff5f2ee5f2c416b61 /src/gallium/targets
parenta221807dc5d69598afd1d0e0a4e715fb82a9f30d (diff)
parentf81ac1840a25ad39a9d7e46e4951e5eb45a05971 (diff)
Merge branch 'xa_branch'
Conflicts: configure.ac Signed-off-by: Thomas Hellstrom <[email protected]>
Diffstat (limited to 'src/gallium/targets')
-rw-r--r--src/gallium/targets/dri-vmwgfx/target.c1
-rw-r--r--src/gallium/targets/xa-vmwgfx/Makefile101
-rw-r--r--src/gallium/targets/xa-vmwgfx/vmw_target.c26
-rw-r--r--src/gallium/targets/xa-vmwgfx/xatracker.pc.in13
4 files changed, 141 insertions, 0 deletions
diff --git a/src/gallium/targets/dri-vmwgfx/target.c b/src/gallium/targets/dri-vmwgfx/target.c
index 1362851d6be..da50b8b8bda 100644
--- a/src/gallium/targets/dri-vmwgfx/target.c
+++ b/src/gallium/targets/dri-vmwgfx/target.c
@@ -19,6 +19,7 @@ create_screen(int fd)
if (!screen)
return NULL;
+ vmw_winsys_screen_set_throttling(screen, 10);
screen = sw_screen_wrap(screen);
screen = debug_screen_wrap(screen);
diff --git a/src/gallium/targets/xa-vmwgfx/Makefile b/src/gallium/targets/xa-vmwgfx/Makefile
new file mode 100644
index 00000000000..fecdba695c7
--- /dev/null
+++ b/src/gallium/targets/xa-vmwgfx/Makefile
@@ -0,0 +1,101 @@
+TOP = ../../../..
+include $(TOP)/configs/current
+
+##### MACROS #####
+
+XA_MAJOR = 0
+XA_MINOR = 4
+XA_TINY = 0
+XA_CFLAGS = -g -fPIC
+
+XA_INCLUDES= -I$(TOP)/src/gallium/ \
+ -I$(TOP)/src/gallium/auxiliary \
+ -I$(TOP)/src/gallium/include \
+ -I$(TOP)/src/gallium/winsys \
+ -I$(TOP)/src/gallium/drivers
+
+XA_LIB = xatracker
+XA_LIB_NAME = lib$(XA_LIB).so
+XA_LIB_GLOB = lib$(XA_LIB)*.so*
+XA_LIB_DEPS = \
+ $(TOP)/src/gallium/state_trackers/xa/libxatracker.o \
+ $(TOP)/src/gallium/winsys/svga/drm/libsvgadrm.a \
+ $(TOP)/src/gallium/drivers/svga/libsvga.a \
+ $(TOP)/src/gallium/drivers/trace/libtrace.a \
+ $(TOP)/src/gallium/drivers/rbug/librbug.a
+
+
+COMMON_GALLIUM_SOURCES=
+
+SOURCES = vmw_target.c
+OBJECTS = $(SOURCES:.c=.o)
+
+ifeq ($(MESA_LLVM),1)
+LDFLAGS += $(LLVM_LDFLAGS)
+GALLIUM_AUXILIARIES += $(LLVM_LIBS)
+else
+LDFLAGS += -lstdc++
+endif
+
+##### RULES #####
+
+.c.o:
+ $(CC) -c $(XA_CFLAGS) $(XA_INCLUDES) $<
+
+
+##### TARGETS #####
+
+default: $(TOP)/$(LIB_DIR)/gallium/$(XA_LIB_NAME)
+
+
+# Make the library
+$(TOP)/$(LIB_DIR)/gallium/$(XA_LIB_NAME): depend $(OBJECTS) $(XA_LIB_DEPS)
+ $(MKLIB) -o $(XA_LIB) -linker $(CC) -ldflags '$(LDFLAGS)' \
+ -major $(XA_MAJOR) -minor $(XA_MINOR) -patch $(XA_TINY) \
+ $(MKLIB_OPTIONS) \
+ -exports $(TOP)/src/gallium/state_trackers/xa/xa_symbols\
+ -install $(TOP)/$(LIB_DIR)/gallium \
+ $(OBJECTS) $(XA_LIB_DEPS) $(GALLIUM_AUXILIARIES)
+
+# xa pkgconfig file
+pcedit = sed \
+ -e 's,@INSTALL_DIR@,$(INSTALL_DIR),g' \
+ -e 's,@INSTALL_LIB_DIR@,$(INSTALL_LIB_DIR),g' \
+ -e 's,@INSTALL_INC_DIR@,$(INSTALL_INC_DIR),g' \
+ -e 's,@VERSION@,$(XA_MAJOR).$(XA_MINOR).$(XA_TINY),g' \
+ -e 's,@XA_PC_REQ_PRIV@,$(XA_PC_REQ_PRIV),g' \
+ -e 's,@XA_PC_LIB_PRIV@,$(XA_PC_LIB_PRIV),g' \
+ -e 's,@XA_PC_CFLAGS@,$(XA_PC_CFLAGS),g' \
+ -e 's,@XA_LIB@,$(XA_LIB),g'
+xatracker.pc: xatracker.pc.in
+ $(pcedit) $< > $@
+
+install: xatracker.pc
+ $(INSTALL) -d $(DESTDIR)$(INSTALL_INC_DIR)
+ $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
+ $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
+ $(INSTALL) -m 644 $(TOP)/src/gallium/state_trackers/xa/xa_tracker.h $(DESTDIR)$(INSTALL_INC_DIR)
+ $(INSTALL) -m 644 $(TOP)/src/gallium/state_trackers/xa/xa_context.h $(DESTDIR)$(INSTALL_INC_DIR)
+ $(INSTALL) -m 644 $(TOP)/src/gallium/state_trackers/xa/xa_composite.h $(DESTDIR)$(INSTALL_INC_DIR)
+ $(MINSTALL) -m 755 $(TOP)/$(LIB_DIR)/gallium/$(XA_LIB_GLOB) $(DESTDIR)$(INSTALL_LIB_DIR)
+ $(INSTALL) -m 644 xatracker.pc $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
+
+clean:
+ -rm -f *.o *~
+ -rm -f *.lo
+ -rm -f *.la
+ -rm -f *.pc
+ -rm -rf .libs
+ -rm -f depend depend.bak exptmp
+
+
+depend: $(SOURCES)
+ @ echo "running $(MKDEP)"
+ @ rm -f depend
+ @ touch depend
+ @ $(MKDEP) $(MKDEP_OPTIONS) -I$(TOP)/include $(XA_INCLUDES) $(SOURCES) \
+ > /dev/null
+
+-include depend
+
+FORCE:
diff --git a/src/gallium/targets/xa-vmwgfx/vmw_target.c b/src/gallium/targets/xa-vmwgfx/vmw_target.c
new file mode 100644
index 00000000000..15089d6db26
--- /dev/null
+++ b/src/gallium/targets/xa-vmwgfx/vmw_target.c
@@ -0,0 +1,26 @@
+
+#include "target-helpers/inline_debug_helper.h"
+#include "state_tracker/drm_driver.h"
+#include "svga/drm/svga_drm_public.h"
+#include "svga/svga_public.h"
+
+static struct pipe_screen *
+create_screen(int fd)
+{
+ struct svga_winsys_screen *sws;
+ struct pipe_screen *screen;
+
+ sws = svga_drm_winsys_screen_create(fd);
+ if (!sws)
+ return NULL;
+
+ screen = svga_screen_create(sws);
+ if (!screen)
+ return NULL;
+
+ screen = debug_screen_wrap(screen);
+
+ return screen;
+}
+
+DRM_DRIVER_DESCRIPTOR("vmwgfx", "vmwgfx", create_screen)
diff --git a/src/gallium/targets/xa-vmwgfx/xatracker.pc.in b/src/gallium/targets/xa-vmwgfx/xatracker.pc.in
new file mode 100644
index 00000000000..4ea2f4057d7
--- /dev/null
+++ b/src/gallium/targets/xa-vmwgfx/xatracker.pc.in
@@ -0,0 +1,13 @@
+prefix=@INSTALL_DIR@
+exec_prefix=${prefix}
+libdir=@INSTALL_LIB_DIR@
+includedir=@INSTALL_INC_DIR@
+
+Name: xatracker
+Description: Xorg Gallium3D acceleration library
+Requires:
+Requires.private: @XA_PC_REQ_PRIV@
+Version: @VERSION@
+Libs: -L${libdir} -l@XA_LIB@
+Libs.private: @XA_PC_LIB_PRIV@
+Cflags: -I${includedir} @XA_PC_CFLAGS@