OSDN Git Service

Merge branch 'master' into pipe-video
authorThomas Balling Sørensen <tball@tball-laptop.(none)>
Tue, 5 Oct 2010 10:04:08 +0000 (12:04 +0200)
committerThomas Balling Sørensen <tball@tball-laptop.(none)>
Tue, 5 Oct 2010 10:04:08 +0000 (12:04 +0200)
Conflicts:
configs/linux-dri
configure.ac
src/gallium/drivers/nvfx/Makefile
src/gallium/include/pipe/p_defines.h
src/gallium/include/pipe/p_screen.h
src/gallium/include/state_tracker/dri1_api.h
src/gallium/include/state_tracker/drm_api.h
src/gallium/tests/python/samples/tri.py
src/gallium/tests/trivial/Makefile
src/gallium/tests/unit/Makefile
src/gallium/tests/unit/SConscript
src/gallium/tests/unit/u_format_test.c
src/gallium/winsys/nouveau/drm/nouveau_drm_api.c

16 files changed:
1  2 
configs/autoconf.in
configs/linux-dri
configure.ac
src/gallium/auxiliary/Makefile
src/gallium/auxiliary/SConscript
src/gallium/drivers/nvfx/Makefile
src/gallium/drivers/nvfx/nvfx_screen.c
src/gallium/drivers/nvfx/nvfx_state.h
src/gallium/drivers/softpipe/Makefile
src/gallium/drivers/softpipe/SConscript
src/gallium/drivers/softpipe/sp_screen.c
src/gallium/include/pipe/p_defines.h
src/gallium/include/pipe/p_format.h
src/gallium/include/pipe/p_screen.h
src/gallium/targets/dri-nouveau/Makefile
src/gallium/winsys/g3dvl/dri/XF86dri.c

Simple merge
@@@ -58,11 -57,12 +57,12 @@@ SRC_DIRS := glx egl $(SRC_DIRS
  EGL_DRIVERS_DIRS = glx
  
  DRIVER_DIRS = dri
- GALLIUM_WINSYS_DIRS = sw sw/xlib
++
+ GALLIUM_WINSYS_DIRS = sw sw/xlib drm/vmware drm/intel drm/i965
 -GALLIUM_TARGET_DIRS = 
 -GALLIUM_STATE_TRACKERS_DIRS = egl
 +GALLIUM_TARGET_DIRS = egl-swrast
 +GALLIUM_STATE_TRACKERS_DIRS = egl vdpau
  
 -DRI_DIRS = i810 i915 i965 mach64 mga r128 r200 r300 radeon \
 -      savage sis tdfx unichrome swrast
 +DRI_DIRS = r300 radeon swrast
  
  INTEL_LIBS = `pkg-config --libs libdrm_intel`
  INTEL_CFLAGS = `pkg-config --cflags libdrm_intel`
diff --cc configure.ac
              HAVE_ST_XORG="yes"
              ;;
          es)
-             # mesa/es is required to build es state tracker
-             CORE_DIRS="$CORE_DIRS mesa/es"
+             AC_MSG_WARN([state tracker 'es' has been replaced by --enable-gles-overlay])
+             if test "x$enable_gles_overlay" != xyes; then
+                 if test "x$enable_gles1" != xyes -a "x$enable_gles2" != xyes; then
+                     CORE_DIRS="mapi/es1api mapi/es2api $CORE_DIRS"
+                 fi
+                 GLES_OVERLAY=1
+                 EGL_CLIENT_APIS="$EGL_CLIENT_APIS "'$(GLESv1_CM_LIB) $(GLESv2_LIB)'
+             fi
+           tracker=""
+             ;;
+         vega)
+             CORE_DIRS="$CORE_DIRS mapi/vgapi"
+             VG_LIB_DEPS="$VG_LIB_DEPS -lpthread"
+             EGL_CLIENT_APIS="$EGL_CLIENT_APIS "'$(VG_LIB)'
              ;;
 +      xorg/xvmc)
 +            # Check for xvmc?
 +            if test "x$enable_gallium_g3dvl" != xyes; then
 +                AC_MSG_ERROR([cannot build XvMC state tracker without --enable-gallium-g3dvl])
 +            fi
 +            HAVE_ST_XVMC="yes"
 +            ;;
 +        vdpau)
 +            # Check for libvdpau?
 +            if test "x$enable_gallium_g3dvl" != xyes; then
 +                AC_MSG_ERROR([cannot build vdpau state tracker without --enable-gallium-g3dvl])
 +            fi
 +            HAVE_ST_VDPAU="yes"
 +            ;;
          esac
+       if test -n "$tracker"; then
+             test -d "$srcdir/src/gallium/state_trackers/$tracker" || \
+                 AC_MSG_ERROR([state tracker '$tracker' doesn't exist])
+             if test -n "$state_trackers"; then
+                 state_trackers="$state_trackers $tracker"
+             else
+                 state_trackers="$tracker"
+             fi
+         fi
      done
      GALLIUM_STATE_TRACKERS_DIRS="$state_trackers"
      ;;
@@@ -1378,18 -1471,9 +1485,18 @@@ gallium_check_st() 
      if test "x$HAVE_ST_DRI" = xyes && test "x$2" != x; then
           GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $2"
      fi
-     if test "x$HAVE_ST_EGL" = xyes && test "x$3" != x; then
+     if test "x$HAVE_ST_XORG" = xyes && test "x$3" != x; then
           GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $3"
      fi
 +    if test "x$HAVE_ST_XORG" = xyes && test "x$4" != x; then
 +         GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $4"
 +    fi
 +    if test "x$HAVE_ST_XVMC" = xyes && test "x$5" != x; then
 +         GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $5"
 +    fi
 +    if test "x$HAVE_ST_VDPAU" = xyes && test "x$6" != x; then
 +         GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $6"
 +    fi
  }
  
  
Simple merge
Simple merge
Simple merge
@@@ -3,28 -4,16 +4,17 @@@
  #include "util/u_simple_screen.h"
  
  #include "nouveau/nouveau_screen.h"
+ #include "nouveau/nv_object.xml.h"
  #include "nvfx_context.h"
 +#include "nvfx_video_context.h"
  #include "nvfx_screen.h"
  #include "nvfx_resource.h"
+ #include "nvfx_tex.h"
  
- #define NV30TCL_CHIPSET_3X_MASK 0x00000003
- #define NV34TCL_CHIPSET_3X_MASK 0x00000010
- #define NV35TCL_CHIPSET_3X_MASK 0x000001e0
- /* FIXME: It seems I should not include directly ../../winsys/drm/nouveau/drm/nouveau_drm_api.h
- * to get the pointer to the context front buffer, so I copied nouveau_winsys here.
- * nv30_screen_surface_format_supported() can then use it to enforce creating fbo
- * with same number of bits everywhere.
- */
- struct nouveau_winsys {
-       struct pipe_winsys base;
+ #define NV30_3D_CHIPSET_3X_MASK 0x00000003
+ #define NV34_3D_CHIPSET_3X_MASK 0x00000010
+ #define NV35_3D_CHIPSET_3X_MASK 0x000001e0
  
-       struct pipe_screen *pscreen;
-       struct pipe_surface *front;
- };
  #define NV4X_GRCLASS4097_CHIPSETS 0x00000baf
  #define NV4X_GRCLASS4497_CHIPSETS 0x00005450
  #define NV6X_GRCLASS4497_CHIPSETS 0x00000088
@@@ -339,10 -430,10 +431,11 @@@ nvfx_screen_create(struct pipe_winsys *
        pscreen->winsys = ws;
        pscreen->destroy = nvfx_screen_destroy;
        pscreen->get_param = nvfx_screen_get_param;
+       pscreen->get_shader_param = nvfx_screen_get_shader_param;
        pscreen->get_paramf = nvfx_screen_get_paramf;
-       pscreen->is_format_supported = nvfx_screen_surface_format_supported;
+       pscreen->is_format_supported = nvfx_screen_is_format_supported;
        pscreen->context_create = nvfx_create;
 +      pscreen->video_context_create = nvfx_video_create;
  
        switch (dev->chipset & 0xf0) {
        case 0x30:
@@@ -2,9 -2,10 +2,11 @@@
  #define __NVFX_STATE_H__
  
  #include "pipe/p_state.h"
 +#include "pipe/p_video_state.h"
  #include "tgsi/tgsi_scan.h"
  #include "nouveau/nouveau_statebuf.h"
+ #include "util/u_dynarray.h"
+ #include "util/u_linkage.h"
  
  struct nvfx_vertex_program_exec {
        uint32_t data[4];
Simple merge
@@@ -463,32 -492,20 +492,48 @@@ enum pipe_shader_ca
  #define PIPE_REFERENCED_FOR_READ  (1 << 0)
  #define PIPE_REFERENCED_FOR_WRITE (1 << 1)
  
++
 +enum pipe_video_codec
 +{
 +   PIPE_VIDEO_CODEC_UNKNOWN = 0,
 +   PIPE_VIDEO_CODEC_MPEG12,   /**< MPEG1, MPEG2 */
 +   PIPE_VIDEO_CODEC_MPEG4,    /**< DIVX, XVID */
 +   PIPE_VIDEO_CODEC_VC1,      /**< WMV */
 +   PIPE_VIDEO_CODEC_MPEG4_AVC /**< H.264 */
 +};
 +
 +enum pipe_video_profile
 +{
 +   PIPE_VIDEO_PROFILE_UNKNOWN,
 +   PIPE_VIDEO_PROFILE_MPEG1,
 +   PIPE_VIDEO_PROFILE_MPEG2_SIMPLE,
 +   PIPE_VIDEO_PROFILE_MPEG2_MAIN,
 +   PIPE_VIDEO_PROFILE_MPEG4_SIMPLE,
 +   PIPE_VIDEO_PROFILE_MPEG4_ADVANCED_SIMPLE,
 +   PIPE_VIDEO_PROFILE_VC1_SIMPLE,
 +   PIPE_VIDEO_PROFILE_VC1_MAIN,
 +   PIPE_VIDEO_PROFILE_VC1_ADVANCED,
 +   PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE,
 +   PIPE_VIDEO_PROFILE_MPEG4_AVC_MAIN,
 +   PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH
 +};
 +
 +
+ /**
+  * Composite query types
+  */
+ struct pipe_query_data_so_statistics
+ {
+    uint64_t num_primitives_written;
+    uint64_t primitives_storage_needed;
+ };
+ struct pipe_query_data_timestamp_disjoint
+ {
+    uint64_t frequency;
+    boolean  disjoint;
+ };
++
  #ifdef __cplusplus
  }
  #endif
Simple merge
@@@ -85,16 -84,17 +84,22 @@@ struct pipe_screen 
      * Query a float-valued capability/parameter/limit
      * \param param  one of PIPE_CAP_x
      */
-    float (*get_paramf)( struct pipe_screen *, int param );
+    float (*get_paramf)( struct pipe_screen *, enum pipe_cap param );
  
-    struct pipe_context * (*context_create)( struct pipe_screen *,
-                                             void *priv );
+    /**
+     * Query a per-shader-stage integer-valued capability/parameter/limit
+     * \param param  one of PIPE_CAP_x
+     */
+    int (*get_shader_param)( struct pipe_screen *, unsigned shader, enum pipe_shader_cap param );
 -   struct pipe_context * (*context_create)( struct pipe_screen *,
 -                                          void *priv );
++   struct pipe_context * (*context_create)( struct pipe_screen *, void *priv );
 +
 +   struct pipe_video_context * (*video_context_create)( struct pipe_screen *screen,
 +                                                        enum pipe_video_profile profile,
 +                                                        enum pipe_video_chroma_format chroma_format,
 +                                                        unsigned width, unsigned height, void *priv );
 +
     /**
      * Check if the given pipe_format is supported as a texture or
      * drawing surface.
@@@ -6,9 -6,10 +6,11 @@@ LIBNAME = nouveau_dri.s
  PIPE_DRIVERS = \
        $(TOP)/src/gallium/state_trackers/dri/drm/libdridrm.a \
        $(TOP)/src/gallium/winsys/nouveau/drm/libnouveaudrm.a \
+       $(TOP)/src/gallium/drivers/trace/libtrace.a \
+       $(TOP)/src/gallium/drivers/rbug/librbug.a \
        $(TOP)/src/gallium/drivers/nvfx/libnvfx.a \
        $(TOP)/src/gallium/drivers/nv50/libnv50.a \
 +      $(TOP)/src/gallium/drivers/softpipe/libsoftpipe.a \
        $(TOP)/src/gallium/drivers/nouveau/libnouveau.a
  
  C_SOURCES = \