aboutsummaryrefslogtreecommitdiff
path: root/mesalib
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-02-25 08:27:07 +0000
committermarha <marha@users.sourceforge.net>2011-02-25 08:27:07 +0000
commit27b0ed125725f09242054563bb65ac20cfaa17ff (patch)
tree6fe92374761ae87d8541d117605db27f3486aee1 /mesalib
parente8d899178e9ebe174e6b4a53297d3dfced8003f0 (diff)
parent8268836508edd4ba2a3045c9ba937397df7bf2c5 (diff)
downloadvcxsrv-27b0ed125725f09242054563bb65ac20cfaa17ff.tar.gz
vcxsrv-27b0ed125725f09242054563bb65ac20cfaa17ff.tar.bz2
vcxsrv-27b0ed125725f09242054563bb65ac20cfaa17ff.zip
svn merge ^/branches/released .
Diffstat (limited to 'mesalib')
-rw-r--r--mesalib/common.py2
-rw-r--r--mesalib/configure.ac8
-rw-r--r--mesalib/scons/gallium.py2
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_texture.c12
-rw-r--r--mesalib/src/mesa/state_tracker/st_draw.c9
5 files changed, 25 insertions, 8 deletions
diff --git a/mesalib/common.py b/mesalib/common.py
index 6130e6110..157873f66 100644
--- a/mesalib/common.py
+++ b/mesalib/common.py
@@ -15,6 +15,8 @@ import SCons.Script.SConscript
# Defaults
host_platform = _platform.system().lower()
+if host_platform.startswith('cygwin'):
+ host_platform = 'cygwin'
# Search sys.argv[] for a "platform=foo" argument since we don't have
# an 'env' variable at this point.
diff --git a/mesalib/configure.ac b/mesalib/configure.ac
index 9764a0638..dfea8d9d1 100644
--- a/mesalib/configure.ac
+++ b/mesalib/configure.ac
@@ -890,6 +890,9 @@ AC_ARG_ENABLE([glx-tls],
[GLX_USE_TLS=no])
AC_SUBST(GLX_TLS, ${GLX_USE_TLS})
+AS_IF([test "x$GLX_USE_TLS" = xyes],
+ [DEFINES="${DEFINES} -DGLX_USE_TLS -DPTHREADS"])
+
dnl
dnl More DRI setup
dnl
@@ -945,11 +948,6 @@ esac
dnl Set DRI_DIRS, DEFINES and LIB_DEPS
if test "$mesa_driver" = dri -o "$mesa_driver" = no; then
- # Use TLS in GLX?
- if test "x$GLX_USE_TLS" = xyes; then
- DEFINES="$DEFINES -DGLX_USE_TLS -DPTHREADS"
- fi
-
# Platform specific settings and drivers to build
case "$host_os" in
linux*)
diff --git a/mesalib/scons/gallium.py b/mesalib/scons/gallium.py
index 46df7a899..c9c8856b2 100644
--- a/mesalib/scons/gallium.py
+++ b/mesalib/scons/gallium.py
@@ -195,6 +195,8 @@ def generate(env):
# Determine whether we are cross compiling; in particular, whether we need
# to compile code generators with a different compiler as the target code.
host_platform = _platform.system().lower()
+ if host_platform.startswith('cygwin'):
+ host_platform = 'cygwin'
host_machine = os.environ.get('PROCESSOR_ARCHITEW6432', os.environ.get('PROCESSOR_ARCHITECTURE', _platform.machine()))
host_machine = {
'x86': 'x86',
diff --git a/mesalib/src/mesa/state_tracker/st_cb_texture.c b/mesalib/src/mesa/state_tracker/st_cb_texture.c
index 708aa1290..5438968b7 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_texture.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_texture.c
@@ -579,6 +579,12 @@ st_TexImage(struct gl_context * ctx,
pixels, unpack, "glTexImage");
}
+ /* for a 1D array upload the image as a series of layer with height = 1 */
+ if (target == GL_TEXTURE_1D_ARRAY) {
+ depth = height;
+ height = 1;
+ }
+
/*
* Prepare to store the texture data. Either map the gallium texture buffer
* memory or malloc space for it.
@@ -986,6 +992,12 @@ st_TexSubimage(struct gl_context *ctx, GLint dims, GLenum target, GLint level,
if (!pixels)
return;
+ /* for a 1D array upload the image as a series of layer with height = 1 */
+ if (target == GL_TEXTURE_1D_ARRAY) {
+ depth = height;
+ height = 1;
+ }
+
/* Map buffer if necessary. Need to lock to prevent other contexts
* from uploading the buffer under us.
*/
diff --git a/mesalib/src/mesa/state_tracker/st_draw.c b/mesalib/src/mesa/state_tracker/st_draw.c
index 7f661d529..16cd92c6b 100644
--- a/mesalib/src/mesa/state_tracker/st_draw.c
+++ b/mesalib/src/mesa/state_tracker/st_draw.c
@@ -315,10 +315,13 @@ setup_interleaved_attribs(struct gl_context *ctx,
const GLubyte *low_addr = NULL;
/* Find the lowest address. */
- for (attr = 0; attr < vpv->num_inputs; attr++) {
- const GLubyte *start = arrays[vp->index_to_input[attr]]->Ptr;
+ if(vpv->num_inputs) {
+ low_addr = arrays[vp->index_to_input[0]]->Ptr;
- low_addr = !low_addr ? start : MIN2(low_addr, start);
+ for (attr = 1; attr < vpv->num_inputs; attr++) {
+ const GLubyte *start = arrays[vp->index_to_input[attr]]->Ptr;
+ low_addr = MIN2(low_addr, start);
+ }
}
for (attr = 0; attr < vpv->num_inputs; attr++) {