Merge branch 'master' of ssh://git.freedesktop.org/git/mesa/mesa into pipe-video
authorChristian König <deathsimple@vodafone.de>
Tue, 12 Oct 2010 21:05:25 +0000 (23:05 +0200)
committerChristian König <deathsimple@vodafone.de>
Tue, 12 Oct 2010 21:07:29 +0000 (23:07 +0200)
Conflicts:
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/winsys/nouveau/drm/nouveau_drm_api.c

14 files changed:
1  2 
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

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 libXvMC?
 +            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"
 +            ;;
          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"
      ;;
  dnl Gallium helper functions
  dnl
  gallium_check_st() {
-     if test "x$HAVE_ST_DRI" = xyes || test "x$HAVE_ST_EGL" = xyes || test "x$HAVE_ST_XORG" = xyes || test "x$HAVE_ST_XVMC" = xyes; then
 -    if test "x$HAVE_ST_DRI" = xyes || test "x$HAVE_ST_XORG" = xyes; then
++    if test "x$HAVE_ST_DRI" = xyes || test "x$HAVE_ST_XORG" = xyes || test "x$HAVE_ST_XVMC" = xyes; then
           GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS $1"
      fi
      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
  }
  
  
@@@ -1440,26 -1576,7 +1586,26 @@@ AC_ARG_ENABLE([gallium-nouveau]
      [enable_gallium_nouveau=no])
  if test "x$enable_gallium_nouveau" = xyes; then
      GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS nouveau nvfx nv50"
-     gallium_check_st "nouveau/drm" "dri-nouveau" "egl-nouveau" "xorg-nouveau" "xvmc-nouveau"
 -    gallium_check_st "nouveau/drm" "dri-nouveau" "xorg-nouveau"
++    gallium_check_st "nouveau/drm" "dri-nouveau" "xorg-nouveau" "xvmc-nouveau"
 +fi
 +
 +dnl
 +dnl Gallium G3DVL configuration
 +dnl
 +AC_ARG_ENABLE([gallium-g3dvl],
 +    [AS_HELP_STRING([--enable-gallium-g3dvl],
 +        [build gallium g3dvl @<:@default=disabled@:>@])],
 +    [enable_gallium_g3dvl="$enableval"],
 +    [enable_gallium_g3dvl=no])
 +if test "x$enable_gallium_g3dvl" = xyes; then
 +    case "$mesa_driver" in
 +    xlib)
 +        GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS xvmc-softpipe"
 +        ;;
 +    dri)
 +        GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS g3dvl/dri"
 +        ;;
 +    esac
  fi
  
  dnl
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,30 -492,19 +492,43 @@@ 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_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
  }
Simple merge
@@@ -85,15 -84,16 +84,21 @@@ 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 );
+    /**
+     * 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 );
 +                                            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
@@@ -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 = \