Mesa (master): r600g: fix warning: assignment discards qualifiers from pointer target type

2011-06-19 Thread Marek Olšák
Module: Mesa
Branch: master
Commit: 8623c68aec95e0883308051068b3496a85e8b9ea
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=8623c68aec95e0883308051068b3496a85e8b9ea

Author: Marek Olšák mar...@gmail.com
Date:   Sun Jun 19 19:42:22 2011 +0200

r600g: fix warning: assignment discards qualifiers from pointer target type

---

 src/gallium/drivers/r600/r600_blit.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/gallium/drivers/r600/r600_blit.c 
b/src/gallium/drivers/r600/r600_blit.c
index e858ea2..6171d28 100644
--- a/src/gallium/drivers/r600/r600_blit.c
+++ b/src/gallium/drivers/r600/r600_blit.c
@@ -294,7 +294,8 @@ static void r600_resource_copy_region(struct pipe_context 
*ctx,
 {
struct r600_resource_texture *rsrc = (struct r600_resource_texture*)src;
struct texture_orig_info orig_info[2];
-   struct pipe_box sbox, *psbox;
+   struct pipe_box sbox;
+   const struct pipe_box *psbox;
boolean restore_orig[2];
 
/* Fallback for buffers. */

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): u_vbuf_mgr: make u_vbuf_mgr_draw_begin return flags in a bitmask

2011-06-19 Thread Marek Olšák
Module: Mesa
Branch: master
Commit: d1f66a9424d087f81d0040aafde033bd5cb1ca72
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=d1f66a9424d087f81d0040aafde033bd5cb1ca72

Author: Marek Olšák mar...@gmail.com
Date:   Sun Jun 19 21:02:42 2011 +0200

u_vbuf_mgr: make u_vbuf_mgr_draw_begin return flags in a bitmask

---

 src/gallium/auxiliary/util/u_vbuf_mgr.c  |   53 +-
 src/gallium/auxiliary/util/u_vbuf_mgr.h  |   12 --
 src/gallium/drivers/r300/r300_render.c   |5 +--
 src/gallium/drivers/r600/r600_state_common.c |2 +-
 4 files changed, 36 insertions(+), 36 deletions(-)

diff --git a/src/gallium/auxiliary/util/u_vbuf_mgr.c 
b/src/gallium/auxiliary/util/u_vbuf_mgr.c
index fdfa9fc..374fc33 100644
--- a/src/gallium/auxiliary/util/u_vbuf_mgr.c
+++ b/src/gallium/auxiliary/util/u_vbuf_mgr.c
@@ -152,9 +152,9 @@ void u_vbuf_mgr_destroy(struct u_vbuf_mgr *mgrb)
 }
 
 
-static void u_vbuf_translate_begin(struct u_vbuf_mgr_priv *mgr,
-   int min_index, int max_index,
-   boolean *upload_flushed)
+static enum u_vbuf_return_flags
+u_vbuf_translate_begin(struct u_vbuf_mgr_priv *mgr,
+   int min_index, int max_index)
 {
struct translate_key key;
struct translate_element *te;
@@ -166,6 +166,7 @@ static void u_vbuf_translate_begin(struct u_vbuf_mgr_priv 
*mgr,
struct pipe_resource *out_buffer = NULL;
unsigned i, num_verts, out_offset;
struct pipe_vertex_element new_velems[PIPE_MAX_ATTRIBS];
+   boolean upload_flushed = FALSE;
 
memset(key, 0, sizeof(key));
memset(tr_elem_index, 0xff, sizeof(tr_elem_index));
@@ -248,7 +249,7 @@ static void u_vbuf_translate_begin(struct u_vbuf_mgr_priv 
*mgr,
u_upload_alloc(mgr-b.uploader,
   key.output_stride * min_index,
   key.output_stride * num_verts,
-  out_offset, out_buffer, upload_flushed,
+  out_offset, out_buffer, upload_flushed,
   (void**)out_map);
 
out_offset -= key.output_stride * min_index;
@@ -308,6 +309,8 @@ static void u_vbuf_translate_begin(struct u_vbuf_mgr_priv 
*mgr,
}
 
pipe_resource_reference(out_buffer, NULL);
+
+   return upload_flushed ? U_VBUF_UPLOAD_FLUSHED : 0;
 }
 
 static void u_vbuf_translate_end(struct u_vbuf_mgr_priv *mgr)
@@ -510,14 +513,15 @@ void u_vbuf_mgr_set_vertex_buffers(struct u_vbuf_mgr 
*mgrb,
mgr-b.nr_real_vertex_buffers = count;
 }
 
-static void u_vbuf_upload_buffers(struct u_vbuf_mgr_priv *mgr,
-  int min_index, int max_index,
-  unsigned instance_count,
-  boolean *upload_flushed)
+static enum u_vbuf_return_flags
+u_vbuf_upload_buffers(struct u_vbuf_mgr_priv *mgr,
+  int min_index, int max_index,
+  unsigned instance_count)
 {
unsigned i, nr = mgr-ve-count;
unsigned count = max_index + 1 - min_index;
boolean uploaded[PIPE_MAX_ATTRIBS] = {0};
+   enum u_vbuf_return_flags retval = 0;
 
for (i = 0; i  nr; i++) {
   unsigned index = mgr-ve-ve[i].vertex_buffer_index;
@@ -556,11 +560,14 @@ static void u_vbuf_upload_buffers(struct u_vbuf_mgr_priv 
*mgr,
  vb-buffer_offset -= first;
 
  uploaded[index] = TRUE;
- *upload_flushed = *upload_flushed || flushed;
+ if (flushed)
+retval |= U_VBUF_UPLOAD_FLUSHED;
   } else {
  assert(mgr-b.real_vertex_buffer[index]);
   }
}
+
+   return retval;
 }
 
 static void u_vbuf_mgr_compute_max_index(struct u_vbuf_mgr_priv *mgr)
@@ -602,14 +609,13 @@ static void u_vbuf_mgr_compute_max_index(struct 
u_vbuf_mgr_priv *mgr)
}
 }
 
-void u_vbuf_mgr_draw_begin(struct u_vbuf_mgr *mgrb,
-   const struct pipe_draw_info *info,
-   boolean *buffers_updated,
-   boolean *uploader_flushed)
+enum u_vbuf_return_flags
+u_vbuf_mgr_draw_begin(struct u_vbuf_mgr *mgrb,
+  const struct pipe_draw_info *info)
 {
struct u_vbuf_mgr_priv *mgr = (struct u_vbuf_mgr_priv*)mgrb;
-   boolean bufs_updated = FALSE, upload_flushed = FALSE;
int min_index, max_index;
+   enum u_vbuf_return_flags retval = 0;
 
u_vbuf_mgr_compute_max_index(mgr);
 
@@ -622,27 +628,20 @@ void u_vbuf_mgr_draw_begin(struct u_vbuf_mgr *mgrb,
 
/* Translate vertices with non-native layouts or formats. */
if (mgr-incompatible_vb_layout || mgr-ve-incompatible_layout) {
-  u_vbuf_translate_begin(mgr, min_index, max_index, upload_flushed);
+  retval |= u_vbuf_translate_begin(mgr, min_index, max_index);
 
   if (mgr-fallback_ve) {
- bufs_updated = TRUE;
+ retval |= U_VBUF_BUFFERS_UPDATED;
   }
}
 
/* Upload user buffers. */
if (mgr-any_user_vbs) {
-  u_vbuf_upload_buffers(mgr, min_index, max_index, info-instance_count,
-   

Mesa (master): configure.ac: remove redundant option --enable-gallium-egl

2011-06-19 Thread Marek Olšák
Module: Mesa
Branch: master
Commit: ad50abbac9b166b0fd10b3cf3c24eec32b366f6b
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=ad50abbac9b166b0fd10b3cf3c24eec32b366f6b

Author: Marek Olšák mar...@gmail.com
Date:   Tue Jun 14 05:14:27 2011 +0200

configure.ac: remove redundant option --enable-gallium-egl

We already have --enable-gallium, --enable-egl, and --with-state-trackers=egl.

Reviewed-by: Alex Deucher alexdeuc...@gmail.com

---

 configure.ac |   30 --
 1 files changed, 4 insertions(+), 26 deletions(-)

diff --git a/configure.ac b/configure.ac
index 69513c1..90171fa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1201,6 +1201,9 @@ if test x$enable_egl = xyes; then
 SRC_DIRS=$SRC_DIRS egl
 EGL_LIB_DEPS=$DLOPEN_LIBS $SELINUX_LIBS -lpthread
 EGL_DRIVERS_DIRS=
+GALLIUM_STATE_TRACKERS_DIRS=$GALLIUM_STATE_TRACKERS_DIRS egl
+HAVE_ST_EGL=yes
+
 if test $enable_static != yes; then
 # build egl_glx when libGL is built
 if test $mesa_driver = xlib -o $mesa_driver = dri; then
@@ -1470,26 +1473,6 @@ dnl
 dnl Gallium state trackers configuration
 dnl
 
-AC_ARG_ENABLE([gallium-egl],
-[AS_HELP_STRING([--enable-gallium-egl],
-[enable gallium EGL state tracker @:@default=auto@:@])],
-[enable_gallium_egl=$enableval],
-[enable_gallium_egl=auto])
-if test x$enable_gallium_egl = xauto; then
-case $mesa_driver in
-dri|no)
-enable_gallium_egl=$enable_egl
-;;
-*)
-enable_gallium_egl=$enable_openvg
-;;
-esac
-fi
-case x$enable_egl$enable_gallium_egl in
-xnoyes)
-AC_MSG_ERROR([cannot build Gallium EGL state tracker without EGL])
-esac
-
 AC_ARG_WITH([state-trackers],
 [AS_HELP_STRING([--with-state-trackers@:@=DIRS...@:@],
 [comma delimited state_trackers list, e.g.
@@ -1522,11 +1505,6 @@ yes)
 GALLIUM_STATE_TRACKERS_DIRS=$GALLIUM_STATE_TRACKERS_DIRS vega
 st_egl=yes
 fi
-
-if test $enable_gallium_egl = yes; then
-GALLIUM_STATE_TRACKERS_DIRS=$GALLIUM_STATE_TRACKERS_DIRS egl
-HAVE_ST_EGL=yes
-fi
 fi
 ;;
 *)
@@ -1577,7 +1555,7 @@ yes)
 if test x$have_st_vega != xyes -a x$enable_openvg = xyes; then
 AC_MSG_ERROR([--with-state-trackers specified but vega is missing])
 fi
-if test x$HAVE_ST_EGL != xyes -a x$enable_gallium_egl = xyes; then
+if test x$HAVE_ST_EGL != xyes; then
 AC_MSG_ERROR([--with-state-trackers specified but egl is missing])
 fi
 ;;

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): configure.ac: remove --with-state-trackers

2011-06-19 Thread Marek Olšák
Module: Mesa
Branch: master
Commit: 440d71db7853fa81821b36a99e360fb72dbdccab
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=440d71db7853fa81821b36a99e360fb72dbdccab

Author: Marek Olšák mar...@gmail.com
Date:   Tue Jun 14 05:38:58 2011 +0200

configure.ac: remove --with-state-trackers

There is an obvious redundancy:

--with-driver=dri VS --with-state-trackers=dri
--with-driver=xlib VS --with-state-trackers=glx
--enable-openvg VS --with-state-trackers=vega
--enable-egl VS --with-state-trackers=egl

This patch adds two new options for the remaining state trackers:
--enable-xorg
--enable-d3d1x

Reviewed-by: Alex Deucher alexdeuc...@gmail.com

---

 configure.ac |  217 --
 1 files changed, 75 insertions(+), 142 deletions(-)

diff --git a/configure.ac b/configure.ac
index 90171fa..5d045f0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -507,7 +507,7 @@ if test x$enable_selinux = xyes; then
 DEFINES=$DEFINES -DMESA_SELINUX
 fi
 
-dnl Determine which APIs to support
+dnl Options for APIs
 AC_ARG_ENABLE([opengl],
 [AS_HELP_STRING([--disable-opengl],
 [disable support for standard OpenGL API @:@default=no@:@])],
@@ -528,27 +528,40 @@ AC_ARG_ENABLE([gles-overlay],
 [DEPRECATED.  Same as --enable-gles1 and --enable-gles2])],
 [enable_gles1=$enableval; enable_gles2=$enableval],
 [])
-
 AC_ARG_ENABLE([openvg],
 [AS_HELP_STRING([--enable-openvg],
 [enable support for OpenVG API @:@default=no@:@])],
 [enable_openvg=$enableval],
 [enable_openvg=no])
+AC_ARG_ENABLE([xorg],
+[AS_HELP_STRING([--enable-xorg],
+[enable support for X.Org DDX API @:@default=no@:@])],
+[enable_xorg=$enableval],
+[enable_xorg=no])
+AC_ARG_ENABLE([d3d1x],
+[AS_HELP_STRING([--enable-d3d1x],
+[enable support for Direct3D 10  11 low-level API 
@:@default=no@:@])],
+[enable_d3d1x=$enableval],
+[enable_d3d1x=no])
+AC_ARG_ENABLE([egl],
+[AS_HELP_STRING([--disable-egl],
+[disable EGL library @:@default=enabled@:@])],
+[enable_egl=$enableval],
+[enable_egl=yes])
 
-dnl smooth the transition; should be removed eventually
-if test x$enable_openvg = xno; then
-case x$with_state_trackers in
-x*vega*)
-AC_MSG_WARN([vega state tracker is enabled without --enable-openvg])
-enable_openvg=yes
-;;
-esac
-fi
+# Option for Gallium
+AC_ARG_ENABLE([gallium],
+[AS_HELP_STRING([--disable-gallium],
+[build gallium @:@default=enabled@:@])],
+[enable_gallium=$enableval],
+[enable_gallium=yes])
 
 if test x$enable_opengl = xno -a \
 x$enable_gles1 = xno -a \
 x$enable_gles2 = xno -a \
-x$enable_openvg = xno; then
+x$enable_openvg = xno -a \
+x$enable_xorg = xno -a \
+x$enable_d3d1x = xno; then
 AC_MSG_ERROR([at least one API should be enabled])
 fi
 
@@ -657,11 +670,6 @@ if test x$enable_gles2 = xyes; then
 CORE_DIRS=$CORE_DIRS mapi/es2api
 fi
 
-# build vgapi if OpenVG is enabled
-if test x$enable_openvg = xyes; then
-CORE_DIRS=$CORE_DIRS mapi/vgapi
-fi
-
 # build glsl and mesa if OpenGL or OpenGL ES is enabled
 case x$enable_opengl$enable_gles1$enable_gles2 in
 x*yes*)
@@ -674,11 +682,14 @@ xlib)
 DRIVER_DIRS=x11
 GALLIUM_WINSYS_DIRS=$GALLIUM_WINSYS_DIRS sw/xlib
 GALLIUM_TARGET_DIRS=$GALLIUM_TARGET_DIRS libgl-xlib
+GALLIUM_STATE_TRACKERS_DIRS=glx $GALLIUM_STATE_TRACKERS_DIRS
 ;;
 dri)
 SRC_DIRS=$SRC_DIRS glx
 DRIVER_DIRS=dri
 GALLIUM_WINSYS_DIRS=$GALLIUM_WINSYS_DIRS sw/xlib sw/dri
+GALLIUM_STATE_TRACKERS_DIRS=dri $GALLIUM_STATE_TRACKERS_DIRS
+HAVE_ST_DRI=yes
 ;;
 osmesa)
 DRIVER_DIRS=osmesa
@@ -1184,24 +1195,19 @@ AC_SUBST([OSMESA_PC_LIB_PRIV])
 dnl
 dnl EGL configuration
 dnl
-AC_ARG_ENABLE([egl],
-[AS_HELP_STRING([--disable-egl],
-[disable EGL library @:@default=enabled@:@])],
-[enable_egl=$enableval],
-[enable_egl=yes])
+EGL_CLIENT_APIS=
+
 if test x$enable_egl = xno; then
 if test x$mesa_driver = xno; then
 AC_MSG_ERROR([cannot disable EGL when there is no mesa driver])
 fi
-if test x$enable_openvg = xyes; then
-AC_MSG_ERROR([cannot enable OpenVG without EGL])
-fi
 fi
 if test x$enable_egl = xyes; then
 SRC_DIRS=$SRC_DIRS egl
 EGL_LIB_DEPS=$DLOPEN_LIBS $SELINUX_LIBS -lpthread
 EGL_DRIVERS_DIRS=
-GALLIUM_STATE_TRACKERS_DIRS=$GALLIUM_STATE_TRACKERS_DIRS egl
+GALLIUM_STATE_TRACKERS_DIRS=egl $GALLIUM_STATE_TRACKERS_DIRS
+GALLIUM_TARGET_DIRS=$GALLIUM_TARGET_DIRS egl
 HAVE_ST_EGL=yes
 
 if test $enable_static != yes; then
@@ -1236,6 +1242,49 @@ AC_SUBST([EGL_LIB_DEPS])
 AC_SUBST([EGL_DRIVERS_DIRS])
 
 dnl
+dnl X.Org DDX configuration
+dnl
+if test x$enable_xorg = xyes; then
+PKG_CHECK_MODULES([XORG], [xorg-server = 1.6.0])
+PKG_CHECK_MODULES([LIBDRM_XORG], [libdrm = $LIBDRM_XORG_REQUIRED])
+PKG_CHECK_MODULES([LIBKMS_XORG], [libkms = 

Mesa (master): configure.ac: add option --with-gallium-drivers=DIRS

2011-06-19 Thread Marek Olšák
Module: Mesa
Branch: master
Commit: 58b6a19ea4a48abe6307cca74b4d24752a0aeb57
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=58b6a19ea4a48abe6307cca74b4d24752a0aeb57

Author: Marek Olšák mar...@gmail.com
Date:   Tue Jun 14 07:46:59 2011 +0200

configure.ac: add option --with-gallium-drivers=DIRS

This removes all the --enable-gallium-$driver options and --disable-gallium.

Gallium can be disabled by --with-gallium-drivers= (without parameters).

Default is:
--with-gallium-drivers=r300,swrast

Reviewed-by: Alex Deucher alexdeuc...@gmail.com

---

 configure.ac |  165 --
 1 files changed, 57 insertions(+), 108 deletions(-)

diff --git a/configure.ac b/configure.ac
index 5d045f0..804b8a7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -549,12 +549,16 @@ AC_ARG_ENABLE([egl],
 [enable_egl=$enableval],
 [enable_egl=yes])
 
-# Option for Gallium
-AC_ARG_ENABLE([gallium],
-[AS_HELP_STRING([--disable-gallium],
-[build gallium @:@default=enabled@:@])],
-[enable_gallium=$enableval],
-[enable_gallium=yes])
+# Option for Gallium drivers
+GALLIUM_DRIVERS_DEFAULT=r300,swrast
+
+AC_ARG_WITH([gallium-drivers],
+[AS_HELP_STRING([--with-gallium-drivers@:@=DIRS...@:@],
+[comma delimited Gallium drivers list, e.g.
+i915,i965,nouveau,r300,r600,svga,swrast
+@:@default=r300,swrast@:@])],
+[with_gallium_drivers=$withval],
+[with_gallium_drivers=$GALLIUM_DRIVERS_DEFAULT])
 
 if test x$enable_opengl = xno -a \
 x$enable_gles1 = xno -a \
@@ -1264,7 +1268,7 @@ if test x$enable_openvg = xyes; then
 if test x$enable_egl = xno; then
 AC_MSG_ERROR([cannot enable OpenVG without EGL])
 fi
-if test x$enable_gallium = xno; then
+if test x$with_gallium_drivers = x; then
 AC_MSG_ERROR([cannot enable OpenVG without Gallium])
 fi
 
@@ -1280,6 +1284,10 @@ dnl D3D1X configuration
 dnl
 
 if test x$enable_d3d1x = xyes; then
+if test x$with_gallium_drivers = x; then
+AC_MSG_ERROR([cannot enable D3D1X without Gallium])
+fi
+
 GALLIUM_STATE_TRACKERS_DIRS=d3d1x $GALLIUM_STATE_TRACKERS_DIRS
 HAVE_ST_D3D1X=yes
 fi
@@ -1500,7 +1508,7 @@ AC_SUBST([PROGRAM_DIRS])
 dnl
 dnl Gallium configuration
 dnl
-if test x$enable_gallium = xyes; then
+if test x$with_gallium_drivers != x; then
 SRC_DIRS=$SRC_DIRS gallium gallium/winsys gallium/targets
 AC_PATH_PROG([LLVM_CONFIG], [llvm-config], [no])
 fi
@@ -1615,6 +1623,9 @@ AC_ARG_ENABLE([gallium-llvm],
 [build gallium LLVM support @:@default=enabled on x86/x86_64@:@])],
 [enable_gallium_llvm=$enableval],
 [enable_gallium_llvm=auto])
+if test x$with_gallium_drivers = x; then
+enable_gallium_llvm=no
+fi
 if test x$enable_gallium_llvm = xauto; then
 case $host_cpu in
 i*86|x86_64) enable_gallium_llvm=yes;;
@@ -1660,108 +1671,46 @@ gallium_require_llvm() {
 fi
 }
 
-
-dnl
-dnl Gallium SVGA configuration
-dnl
-AC_ARG_ENABLE([gallium-svga],
-[AS_HELP_STRING([--enable-gallium-svga],
-[build gallium SVGA @:@default=disabled@:@])],
-[enable_gallium_svga=$enableval],
-[enable_gallium_svga=auto])
-if test x$enable_gallium_svga = xyes; then
-GALLIUM_DRIVERS_DIRS=$GALLIUM_DRIVERS_DIRS svga
-gallium_check_st svga/drm dri-vmwgfx xorg-vmwgfx
-elif test x$enable_gallium_svga = xauto; then
-GALLIUM_DRIVERS_DIRS=$GALLIUM_DRIVERS_DIRS svga
-fi
-
-dnl
-dnl Gallium i915 configuration
-dnl
-AC_ARG_ENABLE([gallium-i915],
-[AS_HELP_STRING([--enable-gallium-i915],
-[build gallium i915 @:@default=disabled@:@])],
-[enable_gallium_i915=$enableval],
-[enable_gallium_i915=auto])
-if test x$enable_gallium_i915 = xyes; then
-GALLIUM_WINSYS_DIRS=$GALLIUM_WINSYS_DIRS i915/sw
-GALLIUM_DRIVERS_DIRS=$GALLIUM_DRIVERS_DIRS i915
-gallium_check_st i915/drm dri-i915 xorg-i915
-elif test x$enable_gallium_i915 = xauto; then
+dnl Gallium drivers
+if test x$with_gallium_drivers != x; then
+# This is for compile-testing
+GALLIUM_DRIVERS_DIRS=$GALLIUM_DRIVERS_DIRS i915 i965 r300 svga
 GALLIUM_WINSYS_DIRS=$GALLIUM_WINSYS_DIRS i915/sw
-GALLIUM_DRIVERS_DIRS=$GALLIUM_DRIVERS_DIRS i915
-fi
-
-dnl
-dnl Gallium i965 configuration
-dnl
-AC_ARG_ENABLE([gallium-i965],
-[AS_HELP_STRING([--enable-gallium-i965],
-[build gallium i965 @:@default=disabled@:@])],
-[enable_gallium_i965=$enableval],
-[enable_gallium_i965=auto])
-if test x$enable_gallium_i965 = xyes; then
-GALLIUM_DRIVERS_DIRS=$GALLIUM_DRIVERS_DIRS i965
-gallium_check_st i965/drm dri-i965 xorg-i965
-elif test x$enable_gallium_i965 = xauto; then
-GALLIUM_DRIVERS_DIRS=$GALLIUM_DRIVERS_DIRS i965
-fi
-
-dnl
-dnl Gallium Radeon r300g configuration
-dnl
-AC_ARG_ENABLE([gallium-r300],
-[AS_HELP_STRING([--disable-gallium-r300],
-[build R300 driver @:@default=enabled@:@])],
-[enable_gallium_r300=$enableval],
-[enable_gallium_r300=yes])
-
-if test 

Mesa (master): configure.ac: build r600g by default

2011-06-19 Thread Marek Olšák
Module: Mesa
Branch: master
Commit: 0c7c5b68766a0d1d4da870fab0bcfd79fed1ed56
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=0c7c5b68766a0d1d4da870fab0bcfd79fed1ed56

Author: Marek Olšák mar...@gmail.com
Date:   Tue Jun 14 08:31:11 2011 +0200

configure.ac: build r600g by default

Reviewed-by: Alex Deucher alexdeuc...@gmail.com

---

 configure.ac |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 804b8a7..b2a0f66 100644
--- a/configure.ac
+++ b/configure.ac
@@ -550,13 +550,13 @@ AC_ARG_ENABLE([egl],
 [enable_egl=yes])
 
 # Option for Gallium drivers
-GALLIUM_DRIVERS_DEFAULT=r300,swrast
+GALLIUM_DRIVERS_DEFAULT=r300,r600,swrast
 
 AC_ARG_WITH([gallium-drivers],
 [AS_HELP_STRING([--with-gallium-drivers@:@=DIRS...@:@],
 [comma delimited Gallium drivers list, e.g.
 i915,i965,nouveau,r300,r600,svga,swrast
-@:@default=r300,swrast@:@])],
+@:@default=r300,r600,swrast@:@])],
 [with_gallium_drivers=$withval],
 [with_gallium_drivers=$GALLIUM_DRIVERS_DEFAULT])
 

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): configure.ac: add back --enable-gallium-egl

2011-06-19 Thread Marek Olšák
Module: Mesa
Branch: master
Commit: 1251e1df0f5d4bc81c80c4c2d61c0a5f9b8b759a
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=1251e1df0f5d4bc81c80c4c2d61c0a5f9b8b759a

Author: Marek Olšák mar...@gmail.com
Date:   Sat Jun 18 20:33:55 2011 +0200

configure.ac: add back --enable-gallium-egl

---

 configure.ac |   31 +++
 1 files changed, 27 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index 871b16e..70da9ee 100644
--- a/configure.ac
+++ b/configure.ac
@@ -548,6 +548,13 @@ AC_ARG_ENABLE([egl],
 [disable EGL library @:@default=enabled@:@])],
 [enable_egl=$enableval],
 [enable_egl=yes])
+AC_ARG_ENABLE([gallium_egl],
+[AS_HELP_STRING([--enable-gallium-egl],
+[enable optional EGL state tracker (not required
+ for EGL support in Gallium with OpenGL and OpenGL ES)
+ @:@default=disable@:@])],
+[enable_gallium_egl=$enableval],
+[enable_gallium_egl=no])
 
 # Option for Gallium drivers
 GALLIUM_DRIVERS_DEFAULT=r300,r600,swrast
@@ -1210,9 +1217,6 @@ if test x$enable_egl = xyes; then
 SRC_DIRS=$SRC_DIRS egl
 EGL_LIB_DEPS=$DLOPEN_LIBS $SELINUX_LIBS -lpthread
 EGL_DRIVERS_DIRS=
-GALLIUM_STATE_TRACKERS_DIRS=egl $GALLIUM_STATE_TRACKERS_DIRS
-GALLIUM_TARGET_DIRS=$GALLIUM_TARGET_DIRS egl
-HAVE_ST_EGL=yes
 
 if test $enable_static != yes; then
 # build egl_glx when libGL is built
@@ -1246,6 +1250,22 @@ AC_SUBST([EGL_LIB_DEPS])
 AC_SUBST([EGL_DRIVERS_DIRS])
 
 dnl
+dnl EGL Gallium configuration
+dnl
+if test x$enable_gallium_egl = xyes; then
+if test x$with_gallium_drivers = x; then
+AC_MSG_ERROR([cannot enable egl_gallium without Gallium])
+fi
+if test x$enable_egl = xno; then
+AC_MSG_ERROR([cannot enable egl_gallium without EGL])
+fi
+
+GALLIUM_STATE_TRACKERS_DIRS=egl $GALLIUM_STATE_TRACKERS_DIRS
+GALLIUM_TARGET_DIRS=$GALLIUM_TARGET_DIRS egl
+HAVE_ST_EGL=yes
+fi
+
+dnl
 dnl X.Org DDX configuration
 dnl
 if test x$enable_xorg = xyes; then
@@ -1271,6 +1291,9 @@ if test x$enable_openvg = xyes; then
 if test x$with_gallium_drivers = x; then
 AC_MSG_ERROR([cannot enable OpenVG without Gallium])
 fi
+if test x$enable_gallium_egl = xno; then
+AC_MSG_ERROR([cannot enable OpenVG without egl_gallium])
+fi
 
 EGL_CLIENT_APIS=$EGL_CLIENT_APIS '$(VG_LIB)'
 VG_LIB_DEPS=$VG_LIB_DEPS $SELINUX_LIBS -lpthread
@@ -1787,7 +1810,7 @@ if test $enable_egl = yes; then
 egl_drivers=$egl_drivers builtin:egl_$d
 done
 
-if test $enable_gallium = yes -a $HAVE_ST_EGL = yes; then
+if test x$HAVE_ST_EGL = xyes; then
 echo EGL drivers:${egl_drivers} egl_gallium
 echo EGL Gallium STs:$EGL_CLIENT_APIS
 else

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): configure.ac: Avoid running llvm-config when it hadn' t been checked for.

2011-06-19 Thread Marek Olšák
Module: Mesa
Branch: master
Commit: 9ba2907f2ed893da3da1345647e34a597dd6ed07
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=9ba2907f2ed893da3da1345647e34a597dd6ed07

Author: Cyril Brulebois k...@debian.org
Date:   Wed Jun 15 15:50:02 2011 +0200

configure.ac: Avoid running llvm-config when it hadn't been checked for.

If --disable-gallium is passed, llvm-config isn't checked for, so mark
it explicitly as absent, through LLVM_CONFIG=no.

Passing --disable-gallium would result in:
| ../configure: line 9739: --version: command not found
| ../configure: line 9740: --cppflags: command not found
| ../configure: line 9741: --libs: command not found
| ../configure: line 9743: --ldflags: command not found

With this commit, one gets that instead:
| configure: error: LLVM is required to build Gallium R300 on x86 and x86_64

Signed-off-by: Cyril Brulebois k...@debian.org

---

 configure.ac |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/configure.ac b/configure.ac
index b2a0f66..871b16e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1511,6 +1511,8 @@ dnl
 if test x$with_gallium_drivers != x; then
 SRC_DIRS=$SRC_DIRS gallium gallium/winsys gallium/targets
 AC_PATH_PROG([LLVM_CONFIG], [llvm-config], [no])
+else
+LLVM_CONFIG=no
 fi
 
 AC_SUBST([LLVM_CFLAGS])

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): r600g: remove some magic numbers

2011-06-19 Thread Marek Olšák
Module: Mesa
Branch: master
Commit: 9bcce02f47f721bfb8917fd5639756fb3456aab5
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=9bcce02f47f721bfb8917fd5639756fb3456aab5

Author: Marek Olšák mar...@gmail.com
Date:   Sun Jun 19 23:28:33 2011 +0200

r600g: remove some magic numbers

---

 src/gallium/drivers/r600/r600_state.c |   12 ++--
 src/gallium/drivers/r600/r600d.h  |3 +++
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/r600/r600_state.c 
b/src/gallium/drivers/r600/r600_state.c
index d927e4a..4ce1740 100644
--- a/src/gallium/drivers/r600/r600_state.c
+++ b/src/gallium/drivers/r600/r600_state.c
@@ -1290,14 +1290,22 @@ void r600_init_config(struct r600_pipe_context *rctx)
 
if (family = CHIP_RV770) {
r600_pipe_state_add_reg(rstate, 
R_008D8C_SQ_DYN_GPR_CNTL_PS_FLUSH_REQ, 0x4000, 0x, NULL);
-   r600_pipe_state_add_reg(rstate, R_009508_TA_CNTL_AUX, 
0x0702, 0x, NULL);
+   r600_pipe_state_add_reg(rstate, R_009508_TA_CNTL_AUX,
+   S_009508_DISABLE_CUBE_ANISO(1) |
+   S_009508_SYNC_GRADIENT(1) |
+   S_009508_SYNC_WALKER(1) |
+   S_009508_SYNC_ALIGNER(1), 0x, 
NULL);
r600_pipe_state_add_reg(rstate, R_009830_DB_DEBUG, 0x, 
0x, NULL);
r600_pipe_state_add_reg(rstate, R_009838_DB_WATERMARKS, 
0x00420204, 0x, NULL);
r600_pipe_state_add_reg(rstate, R_0286C8_SPI_THREAD_GROUPING, 
0x, 0x, NULL);
r600_pipe_state_add_reg(rstate, R_028A4C_PA_SC_MODE_CNTL, 
0x00514002, 0x, NULL);
} else {
r600_pipe_state_add_reg(rstate, 
R_008D8C_SQ_DYN_GPR_CNTL_PS_FLUSH_REQ, 0x, 0x, NULL);
-   r600_pipe_state_add_reg(rstate, R_009508_TA_CNTL_AUX, 
0x0703, 0x, NULL);
+   r600_pipe_state_add_reg(rstate, R_009508_TA_CNTL_AUX,
+   S_009508_DISABLE_CUBE_ANISO(1) |
+   S_009508_SYNC_GRADIENT(1) |
+   S_009508_SYNC_WALKER(1) |
+   S_009508_SYNC_ALIGNER(1), 0x, 
NULL);
r600_pipe_state_add_reg(rstate, R_009830_DB_DEBUG, 0x8200, 
0x, NULL);
r600_pipe_state_add_reg(rstate, R_009838_DB_WATERMARKS, 
0x01020204, 0x, NULL);
r600_pipe_state_add_reg(rstate, R_0286C8_SPI_THREAD_GROUPING, 
0x0001, 0x, NULL);
diff --git a/src/gallium/drivers/r600/r600d.h b/src/gallium/drivers/r600/r600d.h
index 6373572..f6eec24 100644
--- a/src/gallium/drivers/r600/r600d.h
+++ b/src/gallium/drivers/r600/r600d.h
@@ -2556,6 +2556,9 @@
 #define   S_009508_DISABLE_CUBE_WRAP(x)(((x)  0x1)  0)
 #define   G_009508_DISABLE_CUBE_WRAP(x)(((x)  0)  0x1)
 #define   C_009508_DISABLE_CUBE_WRAP   0xFFFE
+#define   S_009508_DISABLE_CUBE_ANISO(x)   (((x)  0x1)  1)
+#define   G_009508_DISABLE_CUBE_ANISO(x)   (((x)  1)  0x1)
+#define   C_009508_DISABLE_CUBE_ANISO  (~(1  1))
 #define   S_009508_SYNC_GRADIENT(x)(((x)  0x1)  24)
 #define   G_009508_SYNC_GRADIENT(x)(((x)  24)  0x1)
 #define   C_009508_SYNC_GRADIENT   0xFEFF

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): r600g: implement seamless_cube_map on r600-r700

2011-06-19 Thread Marek Olšák
Module: Mesa
Branch: master
Commit: badf0335ef70223204fbae3e8fdef718cdb3ad19
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=badf0335ef70223204fbae3e8fdef718cdb3ad19

Author: Marek Olšák mar...@gmail.com
Date:   Sun Jun 19 23:41:02 2011 +0200

r600g: implement seamless_cube_map on r600-r700

st/mesa guarantees that all bound sampler states have the same value
in seamless_cube_map.

---

 src/gallium/drivers/r600/r600_pipe.c  |2 +-
 src/gallium/drivers/r600/r600_pipe.h  |6 
 src/gallium/drivers/r600/r600_state.c |   45 
 3 files changed, 46 insertions(+), 7 deletions(-)

diff --git a/src/gallium/drivers/r600/r600_pipe.c 
b/src/gallium/drivers/r600/r600_pipe.c
index 16fe6c5..a0d145d 100644
--- a/src/gallium/drivers/r600/r600_pipe.c
+++ b/src/gallium/drivers/r600/r600_pipe.c
@@ -376,6 +376,7 @@ static int r600_get_param(struct pipe_screen* pscreen, enum 
pipe_cap param)
case PIPE_CAP_TGSI_FS_COORD_ORIGIN_UPPER_LEFT:
case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_HALF_INTEGER:
case PIPE_CAP_SM3:
+   case PIPE_CAP_SEAMLESS_CUBE_MAP:
return 1;
 
/* Supported except the original R600. */
@@ -385,7 +386,6 @@ static int r600_get_param(struct pipe_screen* pscreen, enum 
pipe_cap param)
return family == CHIP_R600 ? 0 : 1;
 
/* Supported on Evergreen. */
-   case PIPE_CAP_SEAMLESS_CUBE_MAP:
case PIPE_CAP_SEAMLESS_CUBE_MAP_PER_TEXTURE:
return family = CHIP_CEDAR ? 1 : 0;
 
diff --git a/src/gallium/drivers/r600/r600_pipe.h 
b/src/gallium/drivers/r600/r600_pipe.h
index 84a45be..9941bbf 100644
--- a/src/gallium/drivers/r600/r600_pipe.h
+++ b/src/gallium/drivers/r600/r600_pipe.h
@@ -50,6 +50,7 @@ enum r600_pipe_state_id {
R600_PIPE_STATE_BLEND = 0,
R600_PIPE_STATE_BLEND_COLOR,
R600_PIPE_STATE_CONFIG,
+   R600_PIPE_STATE_SEAMLESS_CUBEMAP,
R600_PIPE_STATE_CLIP,
R600_PIPE_STATE_SCISSOR,
R600_PIPE_STATE_VIEWPORT,
@@ -126,6 +127,11 @@ struct r600_pipe_shader {
struct r600_vertex_element  vertex_elements;
 };
 
+struct r600_pipe_sampler_state {
+   struct r600_pipe_state  rstate;
+   boolean seamless_cube_map;
+};
+
 /* needed for blitter save */
 #define NUM_TEX_UNITS 16
 
diff --git a/src/gallium/drivers/r600/r600_state.c 
b/src/gallium/drivers/r600/r600_state.c
index 4ce1740..91da7c5 100644
--- a/src/gallium/drivers/r600/r600_state.c
+++ b/src/gallium/drivers/r600/r600_state.c
@@ -369,14 +369,17 @@ static void *r600_create_rs_state(struct pipe_context 
*ctx,
 static void *r600_create_sampler_state(struct pipe_context *ctx,
const struct pipe_sampler_state *state)
 {
-   struct r600_pipe_state *rstate = CALLOC_STRUCT(r600_pipe_state);
+   struct r600_pipe_sampler_state *ss = 
CALLOC_STRUCT(r600_pipe_sampler_state);
+   struct r600_pipe_state *rstate;
union util_color uc;
unsigned aniso_flag_offset = state-max_anisotropy  1 ? 4 : 0;
 
-   if (rstate == NULL) {
+   if (ss == NULL) {
return NULL;
}
 
+   ss-seamless_cube_map = state-seamless_cube_map;
+   rstate = ss-rstate;
rstate-id = R600_PIPE_STATE_SAMPLER;
util_pack_color(state-border_color, PIPE_FORMAT_B8G8R8A8_UNORM, uc);
r600_pipe_state_add_reg_noblock(rstate, R_03C000_SQ_TEX_SAMPLER_WORD0_0,
@@ -559,27 +562,57 @@ static void r600_set_ps_sampler_view(struct pipe_context 
*ctx, unsigned count,
rctx-ps_samplers.n_views = count;
 }
 
+static void r600_set_seamless_cubemap(struct r600_pipe_context *rctx, boolean 
enable)
+{
+   struct r600_pipe_state *rstate = CALLOC_STRUCT(r600_pipe_state);
+   if (rstate == NULL)
+   return;
+
+   rstate-id = R600_PIPE_STATE_SEAMLESS_CUBEMAP;
+   r600_pipe_state_add_reg(rstate, R_009508_TA_CNTL_AUX,
+   (enable ? 0 : S_009508_DISABLE_CUBE_WRAP(1)),
+   1, NULL);
+
+   free(rctx-states[R600_PIPE_STATE_SEAMLESS_CUBEMAP]);
+   rctx-states[R600_PIPE_STATE_SEAMLESS_CUBEMAP] = rstate;
+   r600_context_pipe_state_set(rctx-ctx, rstate);
+}
+
 static void r600_bind_ps_sampler(struct pipe_context *ctx, unsigned count, 
void **states)
 {
struct r600_pipe_context *rctx = (struct r600_pipe_context *)ctx;
-   struct r600_pipe_state **rstates = (struct r600_pipe_state **)states;
+   struct r600_pipe_sampler_state **sstates = (struct 
r600_pipe_sampler_state **)states;
+   int seamless = -1;
 
memcpy(rctx-ps_samplers.samplers, states, sizeof(void*) * count);
rctx-ps_samplers.n_samplers = count;
 
for (int i = 0; i  count; i++) {
-   r600_context_pipe_state_set_ps_sampler(rctx-ctx, rstates[i], 
i);
+   r600_context_pipe_state_set_ps_sampler(rctx-ctx, 
sstates[i]-rstate, i);
+
+   if (sstates[i])
+   

Mesa (master): st/xorg: fix crash triggered by rendercheck -t blend -f a8r8g8b8 -o Clear

2011-06-19 Thread Marek Olšák
Module: Mesa
Branch: master
Commit: 54d1b718b897742bf424f61f911e4ca8bbffa689
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=54d1b718b897742bf424f61f911e4ca8bbffa689

Author: Marcin Slusarz marcin.slus...@gmail.com
Date:   Mon May 16 21:52:05 2011 +0200

st/xorg: fix crash triggered by rendercheck -t blend -f a8r8g8b8 -o Clear

---

 src/gallium/state_trackers/xorg/xorg_composite.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gallium/state_trackers/xorg/xorg_composite.c 
b/src/gallium/state_trackers/xorg/xorg_composite.c
index d4dc84a..b5dacd2 100644
--- a/src/gallium/state_trackers/xorg/xorg_composite.c
+++ b/src/gallium/state_trackers/xorg/xorg_composite.c
@@ -237,7 +237,7 @@ picture_format_fixups(struct exa_pixmap_priv *pSrc, 
PicturePtr pSrcPicture, bool
boolean swizzle = FALSE;
unsigned ret = 0;
 
-   if (pSrc-picture_format == pSrcPicture-format) {
+   if (pSrc  pSrc-picture_format == pSrcPicture-format) {
   if (pSrc-picture_format == PICT_a8) {
  if (mask)
 return FS_MASK_LUMINANCE;
@@ -252,7 +252,7 @@ picture_format_fixups(struct exa_pixmap_priv *pSrc, 
PicturePtr pSrcPicture, bool
   return 0;
}
 
-   if (pSrc-picture_format != PICT_a8r8g8b8) {
+   if (pSrc  pSrc-picture_format != PICT_a8r8g8b8) {
   assert(!can not handle formats);
   return 0;
}

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): st/xorg: fix crash triggered by rendercheck -t composite -f a8r8g8b8 -o Src, Saturate

2011-06-19 Thread Marek Olšák
Module: Mesa
Branch: master
Commit: fe20edf959c4ec565ef29f2556e03ce36e0c259f
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=fe20edf959c4ec565ef29f2556e03ce36e0c259f

Author: Marcin Slusarz marcin.slus...@gmail.com
Date:   Mon May 16 21:52:47 2011 +0200

st/xorg: fix crash triggered by rendercheck -t composite -f a8r8g8b8 -o Src, 
Saturate

samplers[0] may remain uninititialized if src picture/pixmap is null

---

 src/gallium/state_trackers/xorg/xorg_composite.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/gallium/state_trackers/xorg/xorg_composite.c 
b/src/gallium/state_trackers/xorg/xorg_composite.c
index b5dacd2..f696b72 100644
--- a/src/gallium/state_trackers/xorg/xorg_composite.c
+++ b/src/gallium/state_trackers/xorg/xorg_composite.c
@@ -355,7 +355,7 @@ bind_samplers(struct exa_context *exa, int op,
   struct exa_pixmap_priv *pMask,
   struct exa_pixmap_priv *pDst)
 {
-   struct pipe_sampler_state *samplers[PIPE_MAX_SAMPLERS];
+   struct pipe_sampler_state *samplers[PIPE_MAX_SAMPLERS] = {0};
struct pipe_sampler_state src_sampler, mask_sampler;
struct pipe_sampler_view view_templ;
struct pipe_sampler_view *src_view;

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): gallium/nouveau: remove unused nouveau_screen_bo_user

2011-06-19 Thread Marek Olšák
Module: Mesa
Branch: master
Commit: 2f6a9687cf83aea10225f4ec91206c500bc3df89
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=2f6a9687cf83aea10225f4ec91206c500bc3df89

Author: Marcin Slusarz marcin.slus...@gmail.com
Date:   Mon May  9 00:35:10 2011 +0200

gallium/nouveau: remove unused nouveau_screen_bo_user

---

 src/gallium/drivers/nouveau/nouveau_screen.c |   14 --
 src/gallium/drivers/nouveau/nouveau_screen.h |2 --
 2 files changed, 0 insertions(+), 16 deletions(-)

diff --git a/src/gallium/drivers/nouveau/nouveau_screen.c 
b/src/gallium/drivers/nouveau/nouveau_screen.c
index 401155b..223e768 100644
--- a/src/gallium/drivers/nouveau/nouveau_screen.c
+++ b/src/gallium/drivers/nouveau/nouveau_screen.c
@@ -81,20 +81,6 @@ nouveau_screen_bo_new(struct pipe_screen *pscreen, unsigned 
alignment,
return bo;
 }
 
-struct nouveau_bo *
-nouveau_screen_bo_user(struct pipe_screen *pscreen, void *ptr, unsigned bytes)
-{
-   struct nouveau_device *dev = nouveau_screen(pscreen)-device;
-   struct nouveau_bo *bo = NULL;
-   int ret;
-
-   ret = nouveau_bo_user(dev, ptr, bytes, bo);
-   if (ret)
-   return NULL;
-
-   return bo;
-}
-
 void *
 nouveau_screen_bo_map(struct pipe_screen *pscreen,
  struct nouveau_bo *bo,
diff --git a/src/gallium/drivers/nouveau/nouveau_screen.h 
b/src/gallium/drivers/nouveau/nouveau_screen.h
index 186ada3..d910809 100644
--- a/src/gallium/drivers/nouveau/nouveau_screen.h
+++ b/src/gallium/drivers/nouveau/nouveau_screen.h
@@ -47,8 +47,6 @@ nouveau_screen(struct pipe_screen *pscreen)
 struct nouveau_bo *
 nouveau_screen_bo_new(struct pipe_screen *pscreen, unsigned alignment,
  unsigned usage, unsigned bind, unsigned size);
-struct nouveau_bo *
-nouveau_screen_bo_user(struct pipe_screen *pscreen, void *ptr, unsigned bytes);
 void *
 nouveau_screen_bo_map(struct pipe_screen *pscreen,
  struct nouveau_bo *pb,

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): st/xorg: add GALLIUM_AUXILIARIES to target dependencies

2011-06-19 Thread Marek Olšák
Module: Mesa
Branch: master
Commit: 21c0556b61708878ce25879c994bba2f914115a6
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=21c0556b61708878ce25879c994bba2f914115a6

Author: Marcin Slusarz marcin.slus...@gmail.com
Date:   Sun Jun  5 21:04:49 2011 +0200

st/xorg: add GALLIUM_AUXILIARIES to target dependencies

Without it changes to GALLIUM_AUXILIARIES don't induce target rebuild

Signed-off-by: Marek Olšák mar...@gmail.com

---

 src/gallium/targets/Makefile.xorg |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/gallium/targets/Makefile.xorg 
b/src/gallium/targets/Makefile.xorg
index 47040bb..6fad710 100644
--- a/src/gallium/targets/Makefile.xorg
+++ b/src/gallium/targets/Makefile.xorg
@@ -41,7 +41,7 @@ endif
 
 default: depend $(TOP)/$(LIB_DIR)/gallium $(LIBNAME) $(LIBNAME_STAGING)
 
-$(LIBNAME): $(OBJECTS) Makefile ../Makefile.xorg $(LIBS) $(DRIVER_PIPES)
+$(LIBNAME): $(OBJECTS) Makefile ../Makefile.xorg $(LIBS) $(DRIVER_PIPES) 
$(GALLIUM_AUXILIARIES)
$(MKLIB) -linker '$(CC)' -noprefix -o $@ $(LDFLAGS) $(OBJECTS) 
$(DRIVER_PIPES) $(GALLIUM_AUXILIARIES) $(DRIVER_LINKS)
 
 depend: $(C_SOURCES) $(CPP_SOURCES) $(ASM_SOURCES) $(SYMLINKS) 
$(GENERATED_SOURCES)

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): st/xorg: initialize drm_mode.type

2011-06-19 Thread Marek Olšák
Module: Mesa
Branch: master
Commit: a97b40a886944a6aeb214e52028ff0e430b71dca
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=a97b40a886944a6aeb214e52028ff0e430b71dca

Author: Marcin Slusarz marcin.slus...@gmail.com
Date:   Sun Jun  5 21:05:24 2011 +0200

st/xorg: initialize drm_mode.type

it's uninitialized, but used by kernel (drm_mode_setcrtc - 
drm_mode_set_crtcinfo)

Signed-off-by: Marek Olšák mar...@gmail.com

---

 src/gallium/state_trackers/xorg/xorg_crtc.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/gallium/state_trackers/xorg/xorg_crtc.c 
b/src/gallium/state_trackers/xorg/xorg_crtc.c
index 0499ed1..22e61cf 100644
--- a/src/gallium/state_trackers/xorg/xorg_crtc.c
+++ b/src/gallium/state_trackers/xorg/xorg_crtc.c
@@ -122,6 +122,7 @@ crtc_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
 drm_mode.hskew = mode-HSkew;
 drm_mode.vscan = mode-VScan;
 drm_mode.vrefresh = mode-VRefresh;
+drm_mode.type = 0;
 if (!mode-name)
xf86SetModeDefaultName(mode);
 strncpy(drm_mode.name, mode-name, DRM_DISPLAY_MODE_LEN - 1);

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): xorg/nouveau: rename to nouveau2

2011-06-19 Thread Marek Olšák
Module: Mesa
Branch: master
Commit: c772d4e6f34f6f55a730fb17aaee7a3b0554db3e
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=c772d4e6f34f6f55a730fb17aaee7a3b0554db3e

Author: Marcin Slusarz marcin.slus...@gmail.com
Date:   Mon May 16 21:50:29 2011 +0200

xorg/nouveau: rename to nouveau2

Signed-off-by: Marek Olšák mar...@gmail.com

---

 src/gallium/targets/xorg-nouveau/Makefile   |2 +-
 src/gallium/targets/xorg-nouveau/nouveau_xorg.c |   14 +++---
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/gallium/targets/xorg-nouveau/Makefile 
b/src/gallium/targets/xorg-nouveau/Makefile
index 5a2cdb1..16ac954 100644
--- a/src/gallium/targets/xorg-nouveau/Makefile
+++ b/src/gallium/targets/xorg-nouveau/Makefile
@@ -1,7 +1,7 @@
 TOP = ../../../..
 include $(TOP)/configs/current
 
-LIBNAME = modesetting_drv.so
+LIBNAME = nouveau2_drv.so
 
 C_SOURCES = \
nouveau_target.c \
diff --git a/src/gallium/targets/xorg-nouveau/nouveau_xorg.c 
b/src/gallium/targets/xorg-nouveau/nouveau_xorg.c
index f0d6492..a25254a 100644
--- a/src/gallium/targets/xorg-nouveau/nouveau_xorg.c
+++ b/src/gallium/targets/xorg-nouveau/nouveau_xorg.c
@@ -54,7 +54,7 @@ static PciChipsets nouveau_xorg_pci_devices[] = {
 };
 
 static XF86ModuleVersionInfo nouveau_xorg_version = {
-modesetting,
+nouveau2,
 MODULEVENDORSTRING,
 MODINFOSTRING1,
 MODINFOSTRING2,
@@ -70,9 +70,9 @@ static XF86ModuleVersionInfo nouveau_xorg_version = {
  * Xorg driver exported structures
  */
 
-_X_EXPORT DriverRec modesetting = {
+_X_EXPORT DriverRec nouveau2 = {
 1,
-modesetting,
+nouveau2,
 nouveau_xorg_identify,
 NULL,
 xorg_tracker_available_options,
@@ -85,7 +85,7 @@ _X_EXPORT DriverRec modesetting = {
 
 static MODULESETUPPROTO(nouveau_xorg_setup);
 
-_X_EXPORT XF86ModuleData modesettingModuleData = {
+_X_EXPORT XF86ModuleData nouveau2ModuleData = {
 nouveau_xorg_version,
 nouveau_xorg_setup,
 NULL
@@ -104,7 +104,7 @@ nouveau_xorg_setup(pointer module, pointer opts, int 
*errmaj, int *errmin)
  */
 if (!setupDone) {
setupDone = 1;
-   xf86AddDriver(modesetting, module, HaveDriverFuncs);
+   xf86AddDriver(nouveau2, module, HaveDriverFuncs);
 
/*
 * The return value must be non-NULL on success even though there
@@ -121,7 +121,7 @@ nouveau_xorg_setup(pointer module, pointer opts, int 
*errmaj, int *errmin)
 static void
 nouveau_xorg_identify(int flags)
 {
-xf86PrintChipsets(modesetting, Driver for Modesetting Kernel Drivers,
+xf86PrintChipsets(nouveau2, Driver for Modesetting Kernel Drivers,
  nouveau_xorg_chipsets);
 }
 
@@ -137,7 +137,7 @@ nouveau_xorg_pci_probe(DriverPtr driver,
 if (scrn != NULL) {
scrn-driverVersion = 1;
scrn-driverName = nouveau;
-   scrn-name = modesetting;
+   scrn-name = nouveau2;
scrn-Probe = NULL;
 
entity = xf86GetEntityInfo(entity_num);

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): configure.ac: remove deprecated EGL options

2011-06-19 Thread Chia-I Wu
Module: Mesa
Branch: master
Commit: 66c71d150aed5fbecd49cb028332fdcc2c1feb70
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=66c71d150aed5fbecd49cb028332fdcc2c1feb70

Author: Chia-I Wu o...@lunarg.com
Date:   Mon Jun 20 08:05:04 2011 +0900

configure.ac: remove deprecated EGL options

---

 configure.ac |9 -
 1 files changed, 0 insertions(+), 9 deletions(-)

diff --git a/configure.ac b/configure.ac
index 70da9ee..c9dd8a7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -523,11 +523,6 @@ AC_ARG_ENABLE([gles2],
 [enable support for OpenGL ES 2.x API @:@default=no@:@])],
 [enable_gles2=$enableval],
 [enable_gles2=no])
-AC_ARG_ENABLE([gles-overlay],
-[AS_HELP_STRING([--enable-gles-overlay],
-[DEPRECATED.  Same as --enable-gles1 and --enable-gles2])],
-[enable_gles1=$enableval; enable_gles2=$enableval],
-[])
 AC_ARG_ENABLE([openvg],
 [AS_HELP_STRING([--enable-openvg],
 [enable support for OpenVG API @:@default=no@:@])],
@@ -1560,10 +1555,6 @@ AC_ARG_WITH([egl-platforms],
 x11,drm @:@default=auto@:@])],
 [with_egl_platforms=$withval],
 [with_egl_platforms=yes])
-AC_ARG_WITH([egl-displays],
-[AS_HELP_STRING([--with-egl-displays@:@=DIRS...@:@],
-[DEPRECATED.  Use --with-egl-platforms instead])],
-[with_egl_platforms=$withval])
 
 EGL_PLATFORMS=
 WAYLAND_EGL_LIB_DEPS=

___
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit


Mesa (master): docs: update EGL for changed configure options

2011-06-19 Thread Chia-I Wu
Module: Mesa
Branch: master
Commit: 8eea050f5aed6ad8aeb64105c0e2581f0fd0b10a
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=8eea050f5aed6ad8aeb64105c0e2581f0fd0b10a

Author: Chia-I Wu o...@lunarg.com
Date:   Mon Jun 20 11:14:56 2011 +0900

docs: update EGL for changed configure options

---

 docs/egl.html  |   45 +
 docs/opengles.html |   19 +--
 docs/openvg.html   |   10 +-
 3 files changed, 27 insertions(+), 47 deletions(-)

diff --git a/docs/egl.html b/docs/egl.html
index fb15086..5b75007 100644
--- a/docs/egl.html
+++ b/docs/egl.html
@@ -29,12 +29,14 @@ directly dispatched to the drivers./p
 the driver for your hardware.  For example/p
 
 pre
-  $ ./configure --enable-gles2 --enable-openvg --enable-gallium-nouveau
+  $ ./configure --enable-gles1 --enable-gles2 \
+--with-dri-drivers=... \
+--with-gallium-drivers=...
 /pre
 
-pThe main library and OpenGL is enabled by default.  The first option above
-enables a href=opengles.htmlOpenGL ES 2.x/a.  The second option enables
-a href=openvg.htmlOpenVG/a./p
+pThe main library and OpenGL is enabled by default.  The first two options
+above enables a href=opengles.htmlOpenGL ES 1.x and 2.x/a.  The last two
+options enables the listed classic and and Gallium drivers respectively./p
 
 /li
 
@@ -42,8 +44,8 @@ enables a href=opengles.htmlOpenGL ES 2.x/a.  The 
second option enables
 /ol
 
 pIn the given example, it will build and install codelibEGL/code,
-codelibGL/code, codelibGLESv1_CM/code, codelibGLESv2/code,
-codelibOpenVG/code, and one or more EGL drivers./p
+codelibGL/code, codelibGLESv1_CM/code, codelibGLESv2/code, and one
+or more EGL drivers./p
 
 h3Configure Options/h3
 
@@ -65,6 +67,12 @@ drivers will be installed to code${libdir}/egl/code./p
 
 /li
 
+licode--enable-gallium-egl/code
+
+pEnable the optional codeegl_gallium/code driver./p
+
+/li
+
 licode--with-egl-platforms/code
 
 pList the platforms (window systems) to support.  Its argument is a comma
@@ -88,15 +96,17 @@ internal library that supports multiple APIs./p
 
 /li
 
-licode--enable-openvg/code
+licode--enable-shared-glapi/code
 
-pOpenVG must be explicitly enabled by this option./p
+pBy default, codelibGL/code has its own copy of codelibglapi/code.
+This options makes codelibGL/code use the shared codelibglapi/code.  
This
+is required if applications mix OpenGL and OpenGL ES./p
 
 /li
 
-licode--enable-gallium-egl/code
+licode--enable-openvg/code
 
-pExplicitly enable or disable codeegl_gallium/code./p
+pOpenVG must be explicitly enabled by this option./p
 
 /li
 
@@ -220,8 +230,7 @@ distribution./p
 pGenerally, codeegl_dri2/code is preferred over codeegl_gallium/code
 when the system already has DRI drivers.  As codeegl_gallium/code is loaded
 before codeegl_dri2/code when both are available, codeegl_gallium/code
-may either be disabled with code--disable-gallium-egl/code or packaged
-separately./p
+is disabled by default./p
 
 h2Developers/h2
 
@@ -307,17 +316,5 @@ not be called with the sample display at the same time.  
If a driver has access
 to an codeEGLDisplay/code without going through the EGL APIs, the driver
 should as well lock the display before using it.
 
-h3TODOs/h3
-
-ul
-liPass the conformance tests/li
-liMixed use of OpenGL, OpenGL ES 1.1, and OpenGL ES 2.0 is supported.  But
-which one of codelibGL.so/code, codelibGLESv1_CM.so/code, and
-codelibGLESv2.so/code should an application link to?  Bad things may happen
-when, say, an application is linked to codelibGLESv2.so/code and
-codelibcairo/code, which is linked to codelibGL.so/code instead./li
-
-/ul
-
 /body
 /html
diff --git a/docs/opengles.html b/docs/opengles.html
index 742182e..0fee488 100644
--- a/docs/opengles.html
+++ b/docs/opengles.html
@@ -34,27 +34,10 @@ EGL drivers for your hardware./p
 
 h2Run the Demos/h2
 
-pThere are some demos in codeprogs/egl//code.  You can use them to test
-your build.  For example,/p
-
-pre
-  $ cd progs/egl/eglut
-  $ make
-  $ cd ../opengles1
-  $ make
-  $ ./torus_x11
-/pre
+pThere are some demos in codemesa/demos/code repository./p
 
 h2Developers/h2
 
-h3Internal Libraries/h3
-
-table border=1 style=text-align: center;
-   trtdLibrary Name/tdtdUsed 
By/tdtdEnabled/tdtdOpenGL/tdtdOpenGL ES 1.x/tdtdOpenGL ES 
2.x/td/tr
-   trtdcodelibmesa.a/tdtdClassic DRI 
drivers/tdtdy/tdtdy/tdtd--enable-gles1/tdtd--enable-gles2/td/tr
-   trtdcodelibmesagallium.a/tdtdGallium EGL and DRI 
drivers/tdtdy/tdtdy/tdtd--enable-gles1/tdtd--enable-gles2/td/tr
-/table
-
 h3Dispatch Table/h3
 
 pOpenGL ES has an additional indirection when dispatching fucntions/p
diff --git a/docs/openvg.html b/docs/openvg.html
index eff8c58..81e50b6 100644
--- a/docs/openvg.html
+++ b/docs/openvg.html
@@ -11,7 +11,7 @@
 H1OpenVG State Tracker/H1
 
 p
-The current version of the OpenVG state tracker implements OpenVG 1.0.
+The current version of the OpenVG state tracker implements OpenVG