aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/targets
diff options
context:
space:
mode:
authorChristian König <[email protected]>2011-01-10 23:41:08 +0100
committerChristian König <[email protected]>2011-01-10 23:41:08 +0100
commit9032d2a13ecd019206a48767d9205c0aafa7cca2 (patch)
tree5bd816287ab7ace941a455e02b1da7bd94571cf9 /src/gallium/targets
parentb725bbebae19890ceaaa31c1d7fb7f155ac3b6ef (diff)
parent2b296ec77c2b95e7632b45100de5a0878ac2a294 (diff)
Merge remote branch 'vdpau/pipe-video' into pipe-video
Conflicts: src/gallium/auxiliary/vl/vl_mpeg12_mc_renderer.c src/gallium/drivers/softpipe/sp_video_context.c src/gallium/include/pipe/p_format.h src/gallium/state_trackers/xorg/xvmc/context.c src/gallium/tests/unit/SConscript
Diffstat (limited to 'src/gallium/targets')
-rw-r--r--src/gallium/targets/Makefile.va62
-rw-r--r--src/gallium/targets/Makefile.vdpau9
-rw-r--r--src/gallium/targets/Makefile.xvmc10
-rw-r--r--src/gallium/targets/va-r600/Makefile26
-rw-r--r--src/gallium/targets/va-r600/target.c24
-rw-r--r--src/gallium/targets/va-softpipe/Makefile21
-rw-r--r--src/gallium/targets/xvmc-nouveau/Makefile2
-rw-r--r--src/gallium/targets/xvmc-r600/Makefile2
-rw-r--r--src/gallium/targets/xvmc-softpipe/Makefile2
9 files changed, 147 insertions, 11 deletions
diff --git a/src/gallium/targets/Makefile.va b/src/gallium/targets/Makefile.va
new file mode 100644
index 00000000000..efb0a59522a
--- /dev/null
+++ b/src/gallium/targets/Makefile.va
@@ -0,0 +1,62 @@
+# This makefile template is used to build "driver"_drv_video.so
+
+LIBNAME = lib$(LIBBASENAME).so
+VA_LIB_GLOB= lib$(LIBBASENAME).*so*
+VA_MAJOR = 0
+VA_MINOR = 3
+INCLUDES = -I$(TOP)/src/gallium/include \
+ -I$(TOP)/src/gallium/drivers \
+ -I$(TOP)/src/gallium/auxiliary \
+ -I$(TOP)/src/gallium/winsys \
+ -I$(TOP)/src/gallium/winsys/g3dvl \
+ $(DRIVER_INCLUDES)
+DEFINES = -DGALLIUM_TRACE -DVER_MAJOR=$(VA_MAJOR) -DVER_MINOR=$(VA_MINOR) $(DRIVER_DEFINES)
+LIBS = $(EXTRA_LIB_PATH) $(DRIVER_LIBS) -lva -lXext -lX11 -lm
+STATE_TRACKER_LIB = $(TOP)/src/gallium/state_trackers/va/libvatracker.a
+
+# XXX: Hack, VA public funcs aren't exported
+OBJECTS = $(C_SOURCES:.c=.o) \
+ $(ASM_SOURCES:.S=.o) \
+ $(TOP)/src/gallium/state_trackers/va/*.o
+
+##### RULES #####
+
+.c.o:
+ $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
+
+.S.o:
+ $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
+
+##### TARGETS #####
+
+default: depend symlinks $(TOP)/$(LIB_DIR)/gallium/$(LIBNAME)
+
+$(TOP)/$(LIB_DIR)/gallium/$(LIBNAME): $(OBJECTS) $(PIPE_DRIVERS) $(STATE_TRACKER_LIB) $(TOP)/$(LIB_DIR)/gallium Makefile
+ $(MKLIB) -o $(LIBBASENAME) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
+ -major $(VA_MAJOR) -minor $(VA_MINOR) $(MKLIB_OPTIONS) \
+ -install $(TOP)/$(LIB_DIR)/gallium \
+ $(OBJECTS) $(STATE_TRACKER_LIB) $(PIPE_DRIVERS) $(LIBS)
+
+$(TOP)/$(LIB_DIR)/gallium:
+ mkdir -p $@
+
+depend: $(C_SOURCES) $(ASM_SOURCES) $(SYMLINKS)
+ rm -f depend
+ touch depend
+ $(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDES) $(C_SOURCES) \
+ $(ASM_SOURCES) 2> /dev/null
+
+# Emacs tags
+tags:
+ etags `find . -name \*.[ch]` `find ../include`
+
+# Remove .o and backup files
+clean:
+ -rm -f *.o *~ *.so $(SYMLINKS)
+ -rm -f depend depend.bak
+
+install: default
+ $(INSTALL) -d $(DESTDIR)$(VA_LIB_INSTALL_DIR)
+ $(MINSTALL) -m 755 $(TOP)/$(LIB_DIR)/gallium/$(VA_LIB_GLOB) $(DESTDIR)$(VA_LIB_INSTALL_DIR)
+
+include depend
diff --git a/src/gallium/targets/Makefile.vdpau b/src/gallium/targets/Makefile.vdpau
index e5c3dad7dad..2accbeb702e 100644
--- a/src/gallium/targets/Makefile.vdpau
+++ b/src/gallium/targets/Makefile.vdpau
@@ -2,6 +2,7 @@
LIBBASENAME = vdpau_g3dvl
LIBNAME = lib$(LIBBASENAME).so
+VDPAU_LIB_GLOB=lib$(LIBBASENAME).*so*
VDPAU_MAJOR = 1
VDPAU_MINOR = 0
INCLUDES = -I$(TOP)/src/gallium/include \
@@ -9,7 +10,7 @@ INCLUDES = -I$(TOP)/src/gallium/include \
-I$(TOP)/src/gallium/auxiliary \
-I$(TOP)/src/gallium/winsys/g3dvl \
$(DRIVER_INCLUDES)
-DEFINES = -DGALLIUM_TRACE $(DRIVER_DEFINES)
+DEFINES = -DGALLIUM_TRACE -DVER_MAJOR=$(VDPAU_MAJOR) -DVER_MINOR=$(VDPAU_MINOR) $(DRIVER_DEFINES)
LIBS = $(EXTRA_LIB_PATH) $(DRIVER_LIBS) -lvdpau -lXext -lX11 -lm
STATE_TRACKER_LIB = $(TOP)/src/gallium/state_trackers/vdpau/libvdpautracker.a
@@ -54,8 +55,8 @@ clean:
-rm -f *.o *~ *.so $(SYMLINKS)
-rm -f depend depend.bak
-#install: $(LIBNAME)
-# $(INSTALL) -d $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR)
-# $(MINSTALL) -m 755 $(LIBNAME) $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR)
+install: default
+ $(INSTALL) -d $(DESTDIR)$(VDPAU_LIB_INSTALL_DIR)
+ $(MINSTALL) -m 755 $(TOP)/$(LIB_DIR)/gallium/$(VDPAU_LIB_GLOB) $(DESTDIR)$(VDPAU_LIB_INSTALL_DIR)
include depend
diff --git a/src/gallium/targets/Makefile.xvmc b/src/gallium/targets/Makefile.xvmc
index 08529b38b70..6abe7f6b062 100644
--- a/src/gallium/targets/Makefile.xvmc
+++ b/src/gallium/targets/Makefile.xvmc
@@ -1,7 +1,7 @@
# This makefile template is used to build libXvMCg3dvl.so
-LIBBASENAME = XvMCg3dvl
LIBNAME = lib$(LIBBASENAME).so
+LIB_GLOB=lib$(LIBBASENAME).*so*
XVMC_MAJOR = 1
XVMC_MINOR = 0
INCLUDES = -I$(TOP)/src/gallium/include \
@@ -11,7 +11,7 @@ INCLUDES = -I$(TOP)/src/gallium/include \
-I$(TOP)/src/gallium/winsys/g3dvl \
$(DRIVER_INCLUDES)
DEFINES = -DGALLIUM_TRACE $(DRIVER_DEFINES)
-LIBS = $(EXTRA_LIB_PATH) $(DRIVER_LIBS) -lXvMC -lXv -lX11 -lm
+LIBS = $(EXTRA_LIB_PATH) $(DRIVER_LIBS) -lXv -lX11 -lm
STATE_TRACKER_LIB = $(TOP)/src/gallium/state_trackers/xorg/xvmc/libxvmctracker.a
# XXX: Hack, XvMC public funcs aren't exported if we link to libxvmctracker.a :(
@@ -55,8 +55,8 @@ clean:
-rm -f *.o *~ *.so $(SYMLINKS)
-rm -f depend depend.bak
-#install: $(LIBNAME)
-# $(INSTALL) -d $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR)
-# $(MINSTALL) -m 755 $(LIBNAME) $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR)
+install: default
+ $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
+ $(MINSTALL) -m 755 $(TOP)/$(LIB_DIR)/gallium/$(LIB_GLOB) $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
include depend
diff --git a/src/gallium/targets/va-r600/Makefile b/src/gallium/targets/va-r600/Makefile
new file mode 100644
index 00000000000..03ca8edaf25
--- /dev/null
+++ b/src/gallium/targets/va-r600/Makefile
@@ -0,0 +1,26 @@
+TOP = ../../../..
+include $(TOP)/configs/current
+
+LIBBASENAME = r600_drv_video
+
+DRIVER_DEFINES = -DGALLIUM_SOFTPIPE
+DRIVER_INCLUDES =
+
+PIPE_DRIVERS = \
+ $(TOP)/src/gallium/drivers/r600/libr600.a \
+ $(TOP)/src/gallium/winsys/g3dvl/dri/libvldri.a \
+ $(TOP)/src/gallium/winsys/r600/drm/libr600winsys.a \
+ $(TOP)/src/gallium/drivers/softpipe/libsoftpipe.a \
+ $(TOP)/src/gallium/drivers/trace/libtrace.a \
+ $(TOP)/src/gallium/auxiliary/libgallium.a
+
+C_SOURCES = \
+ target.c \
+ $(COMMON_GALLIUM_SOURCES) \
+ $(DRIVER_SOURCES)
+
+DRIVER_LIBS = $(shell pkg-config libdrm_radeon --libs) -lXfixes
+
+include ../Makefile.va
+
+symlinks:
diff --git a/src/gallium/targets/va-r600/target.c b/src/gallium/targets/va-r600/target.c
new file mode 100644
index 00000000000..8753e2bab17
--- /dev/null
+++ b/src/gallium/targets/va-r600/target.c
@@ -0,0 +1,24 @@
+#include "state_tracker/drm_driver.h"
+#include "target-helpers/inline_debug_helper.h"
+#include "r600/drm/r600_drm_public.h"
+#include "r600/r600_public.h"
+
+static struct pipe_screen *create_screen(int fd)
+{
+ struct radeon *radeon;
+ struct pipe_screen *screen;
+
+ radeon = r600_drm_winsys_create(fd);
+ if (!radeon)
+ return NULL;
+
+ screen = r600_screen_create(radeon);
+ if (!screen)
+ return NULL;
+
+ screen = debug_screen_wrap(screen);
+
+ return screen;
+}
+
+DRM_DRIVER_DESCRIPTOR("r600", "radeon", create_screen)
diff --git a/src/gallium/targets/va-softpipe/Makefile b/src/gallium/targets/va-softpipe/Makefile
new file mode 100644
index 00000000000..a58df36a966
--- /dev/null
+++ b/src/gallium/targets/va-softpipe/Makefile
@@ -0,0 +1,21 @@
+TOP = ../../../..
+include $(TOP)/configs/current
+
+LIBBASENAME = softpipe_drv_video
+
+DRIVER_DEFINES = -DGALLIUM_SOFTPIPE
+DRIVER_INCLUDES =
+
+PIPE_DRIVERS = \
+ $(TOP)/src/gallium/winsys/sw/xlib/libws_xlib.a \
+ $(TOP)/src/gallium/drivers/softpipe/libsoftpipe.a \
+ $(TOP)/src/gallium/auxiliary/libgallium.a
+
+C_SOURCES = \
+ $(TOP)/src/gallium/winsys/g3dvl/xlib/xsp_winsys.c
+
+DRIVER_LIBS =
+
+include ../Makefile.va
+
+symlinks:
diff --git a/src/gallium/targets/xvmc-nouveau/Makefile b/src/gallium/targets/xvmc-nouveau/Makefile
index fe418b07681..4384eeaeadf 100644
--- a/src/gallium/targets/xvmc-nouveau/Makefile
+++ b/src/gallium/targets/xvmc-nouveau/Makefile
@@ -1,7 +1,7 @@
TOP = ../../../..
include $(TOP)/configs/current
-#LIBNAME =
+LIBBASENAME = XvMCnouveau
PIPE_DRIVERS = \
$(TOP)/src/gallium/winsys/g3dvl/dri/libvldri.a \
diff --git a/src/gallium/targets/xvmc-r600/Makefile b/src/gallium/targets/xvmc-r600/Makefile
index 25aeb65059f..62e47b53851 100644
--- a/src/gallium/targets/xvmc-r600/Makefile
+++ b/src/gallium/targets/xvmc-r600/Makefile
@@ -1,7 +1,7 @@
TOP = ../../../..
include $(TOP)/configs/current
-#LIBNAME =
+LIBBASENAME = XvMCr600
PIPE_DRIVERS = \
$(TOP)/src/gallium/drivers/r600/libr600.a \
diff --git a/src/gallium/targets/xvmc-softpipe/Makefile b/src/gallium/targets/xvmc-softpipe/Makefile
index 1e3ff8ac89c..5b60bede589 100644
--- a/src/gallium/targets/xvmc-softpipe/Makefile
+++ b/src/gallium/targets/xvmc-softpipe/Makefile
@@ -1,6 +1,8 @@
TOP = ../../../..
include $(TOP)/configs/current
+LIBBASENAME = XvMCsoftpipe
+
DRIVER_DEFINES = -DGALLIUM_SOFTPIPE
DRIVER_INCLUDES =