vl: enable target va-r600
authorThomas Balling Sørensen <tball@tball-laptop.(none)>
Thu, 28 Oct 2010 11:40:59 +0000 (13:40 +0200)
committerThomas Balling Sørensen <tball@tball-laptop.(none)>
Thu, 28 Oct 2010 11:40:59 +0000 (13:40 +0200)
configure.ac
src/gallium/state_trackers/va/va_subpicture.c
src/gallium/targets/Makefile.va [new file with mode: 0644]
src/gallium/targets/va-softpipe/Makefile [new file with mode: 0644]

index eac293f56aa4503766f63084dffbe717a511cbcb..8544c5f0a910e8409c60e195c7ea458142aff65e 100644 (file)
@@ -1590,7 +1590,7 @@ AC_ARG_ENABLE([gallium-r600],
 if test "x$enable_gallium_r600" = xyes; then
     if test "x$HAVE_LIBDRM_RADEON" = xyes; then
        GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r600"
-       gallium_check_st "r600/drm" "dri-r600" "xvmc-r600"
+       gallium_check_st "r600/drm" "dri-r600" "xvmc-r600" "va-r600"
     else
        AC_MSG_ERROR([libdrm_radeon is missing, cannot build gallium-r600])
     fi
index 442b1acea5a773bad43edf1ae7c56ff5899d0a8f..a6d2960e7e55cd1eaf99d74be58f5aa0755c8809 100644 (file)
@@ -30,7 +30,7 @@
 #include <pipe/p_format.h>
 #include "va_private.h"
 
-#define NUM_FORMAT_SUPPORTED 2
+#define NUM_FORMATS_SUPPORTED 2
 
 typedef struct  {
        enum pipe_format;
@@ -38,7 +38,7 @@ typedef struct  {
     unsigned int        va_flags;
 } va_subpicture_formats_supported_t;
 
-static const va_subpicture_formats_supported_t va_subpicture_formats_supported[NUM_FORMAT_SUPPORTED] = 
+static const va_subpicture_formats_supported_t va_subpicture_formats_supported[NUM_FORMATS_SUPPORTED] = 
 {
        { PIPE_FORMAT_B8G8R8A8_UNORM,
       { VA_FOURCC('B','G','R','A'), VA_LSB_FIRST, 32,
@@ -64,7 +64,7 @@ vlVaQuerySubpictureFormats(           VADriverContextP ctx,
                
        int n = 0;
        /* Query supported formats */
-       for (n = 0; n < NUM_FORMAT_SUPPORTED; n++)
+       for (n = 0; n < NUM_FORMATS_SUPPORTED; n++)
        {
                flags[n] = va_subpicture_formats_supported[n].va_flags;
                format_list[n] = va_subpicture_formats_supported[n].va_format;
diff --git a/src/gallium/targets/Makefile.va b/src/gallium/targets/Makefile.va
new file mode 100644 (file)
index 0000000..efb0a59
--- /dev/null
@@ -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/va-softpipe/Makefile b/src/gallium/targets/va-softpipe/Makefile
new file mode 100644 (file)
index 0000000..a58df36
--- /dev/null
@@ -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: