summaryrefslogtreecommitdiff
path: root/dist
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2013-11-09 02:46:55 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2013-11-09 02:46:55 +0000
commit7496ae94ac7ae371126d765341a8dda0d1e36271 (patch)
tree7f8b8608b4474152bb97d4d0df33ed45cf0d6a3a /dist
parent8450d38d54932628c2d6a905408c8feb2163901c (diff)
Merge Mesa 9.2.2
Diffstat (limited to 'dist')
-rw-r--r--dist/Mesa/SConstruct2
-rwxr-xr-xdist/Mesa/bin/config.guess8
-rwxr-xr-xdist/Mesa/bin/config.sub13
-rw-r--r--dist/Mesa/configure.ac2
-rw-r--r--dist/Mesa/src/gallium/drivers/svga/svga_resource_buffer_upload.c2
-rw-r--r--dist/Mesa/src/mesa/drivers/dri/i965/brw_tex_layout.c97
-rw-r--r--dist/Mesa/src/mesa/main/fbobject.c1
-rw-r--r--dist/Mesa/src/mesa/main/macros.h2
-rw-r--r--dist/Mesa/src/mesa/main/teximage.c43
9 files changed, 60 insertions, 110 deletions
diff --git a/dist/Mesa/SConstruct b/dist/Mesa/SConstruct
index 2e09d707b..fcd97f31d 100644
--- a/dist/Mesa/SConstruct
+++ b/dist/Mesa/SConstruct
@@ -70,7 +70,7 @@ if env['gles']:
# Environment setup
env.Append(CPPDEFINES = [
- ('PACKAGE_VERSION', '\\"9.2.1\\"'),
+ ('PACKAGE_VERSION', '\\"9.2.2\\"'),
('PACKAGE_BUGREPORT', '\\"https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\\"'),
])
diff --git a/dist/Mesa/bin/config.guess b/dist/Mesa/bin/config.guess
index 120cc0d23..b79252d6b 100755
--- a/dist/Mesa/bin/config.guess
+++ b/dist/Mesa/bin/config.guess
@@ -2,7 +2,7 @@
# Attempt to guess a canonical system name.
# Copyright 1992-2013 Free Software Foundation, Inc.
-timestamp='2013-05-16'
+timestamp='2013-06-10'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -995,6 +995,12 @@ EOF
ppc:Linux:*:*)
echo powerpc-unknown-linux-${LIBC}
exit ;;
+ ppc64le:Linux:*:*)
+ echo powerpc64le-unknown-linux-${LIBC}
+ exit ;;
+ ppcle:Linux:*:*)
+ echo powerpcle-unknown-linux-${LIBC}
+ exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
exit ;;
diff --git a/dist/Mesa/bin/config.sub b/dist/Mesa/bin/config.sub
index 8b612ab89..9633db704 100755
--- a/dist/Mesa/bin/config.sub
+++ b/dist/Mesa/bin/config.sub
@@ -2,7 +2,7 @@
# Configuration validation subroutine script.
# Copyright 1992-2013 Free Software Foundation, Inc.
-timestamp='2013-04-24'
+timestamp='2013-08-10'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -257,7 +257,7 @@ case $basic_machine in
| avr | avr32 \
| be32 | be64 \
| bfin \
- | c4x | clipper \
+ | c4x | c8051 | clipper \
| d10v | d30v | dlx | dsp16xx \
| epiphany \
| fido | fr30 | frv \
@@ -372,7 +372,7 @@ case $basic_machine in
| be32-* | be64-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* \
- | clipper-* | craynv-* | cydra-* \
+ | c8051-* | clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
@@ -794,7 +794,7 @@ case $basic_machine in
os=-mingw64
;;
mingw32)
- basic_machine=i386-pc
+ basic_machine=i686-pc
os=-mingw32
;;
mingw32ce)
@@ -830,7 +830,7 @@ case $basic_machine in
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
;;
msys)
- basic_machine=i386-pc
+ basic_machine=i686-pc
os=-msys
;;
mvs)
@@ -1546,6 +1546,9 @@ case $basic_machine in
c4x-* | tic4x-*)
os=-coff
;;
+ c8051-*)
+ os=-elf
+ ;;
hexagon-*)
os=-elf
;;
diff --git a/dist/Mesa/configure.ac b/dist/Mesa/configure.ac
index 1384224a6..f701ccc51 100644
--- a/dist/Mesa/configure.ac
+++ b/dist/Mesa/configure.ac
@@ -6,7 +6,7 @@ dnl Tell the user about autoconf.html in the --help output
m4_divert_once([HELP_END], [
See docs/autoconf.html for more details on the options for Mesa.])
-AC_INIT([Mesa], [9.2.1],
+AC_INIT([Mesa], [9.2.2],
[https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa])
AC_CONFIG_AUX_DIR([bin])
AC_CONFIG_MACRO_DIR([m4])
diff --git a/dist/Mesa/src/gallium/drivers/svga/svga_resource_buffer_upload.c b/dist/Mesa/src/gallium/drivers/svga/svga_resource_buffer_upload.c
index 55e66134f..e6bbc0077 100644
--- a/dist/Mesa/src/gallium/drivers/svga/svga_resource_buffer_upload.c
+++ b/dist/Mesa/src/gallium/drivers/svga/svga_resource_buffer_upload.c
@@ -502,7 +502,7 @@ svga_buffer_upload_piecewise(struct svga_screen *ss,
PIPE_TRANSFER_DISCARD_RANGE);
assert(map);
if (map) {
- memcpy(map, sbuf->swbuf, size);
+ memcpy(map, (const char *) sbuf->swbuf + offset, size);
sws->buffer_unmap(sws, hwbuf);
}
diff --git a/dist/Mesa/src/mesa/drivers/dri/i965/brw_tex_layout.c b/dist/Mesa/src/mesa/drivers/dri/i965/brw_tex_layout.c
index ebc67b1d9..1191c3cfb 100644
--- a/dist/Mesa/src/mesa/drivers/dri/i965/brw_tex_layout.c
+++ b/dist/Mesa/src/mesa/drivers/dri/i965/brw_tex_layout.c
@@ -205,6 +205,18 @@ brw_miptree_layout_2d(struct intel_mipmap_tree *mt)
}
static void
+align_cube(struct intel_mipmap_tree *mt)
+{
+ /* The 965's sampler lays cachelines out according to how accesses
+ * in the texture surfaces run, so they may be "vertical" through
+ * memory. As a result, the docs say in Surface Padding Requirements:
+ * Sampling Engine Surfaces that two extra rows of padding are required.
+ */
+ if (mt->target == GL_TEXTURE_CUBE_MAP)
+ mt->total_height += 2;
+}
+
+static void
brw_miptree_layout_texture_array(struct brw_context *brw,
struct intel_mipmap_tree *mt)
{
@@ -228,84 +240,45 @@ brw_miptree_layout_texture_array(struct brw_context *brw,
}
}
mt->total_height = qpitch * mt->physical_depth0;
+
+ align_cube(mt);
}
static void
brw_miptree_layout_texture_3d(struct brw_context *brw,
struct intel_mipmap_tree *mt)
{
- unsigned width = mt->physical_width0;
- unsigned height = mt->physical_height0;
- unsigned depth = mt->physical_depth0;
- unsigned pack_x_pitch, pack_x_nr;
- unsigned pack_y_pitch;
+ unsigned yscale = mt->compressed ? 4 : 1;
+ mt->total_width = 0;
mt->total_height = 0;
- if (mt->compressed) {
- mt->total_width = ALIGN(width, mt->align_w);
- pack_y_pitch = (height + 3) / 4;
- } else {
- mt->total_width = mt->physical_width0;
- pack_y_pitch = ALIGN(mt->physical_height0, mt->align_h);
- }
-
- pack_x_pitch = width;
- pack_x_nr = 1;
-
+ unsigned ysum = 0;
for (unsigned level = mt->first_level; level <= mt->last_level; level++) {
- int x = 0;
- int y = 0;
-
- intel_miptree_set_level_info(mt, level,
- 0, mt->total_height,
- width, height, depth);
-
- for (int q = 0; q < depth; /* empty */) {
- for (int j = 0; j < pack_x_nr && q < depth; j++, q++) {
- intel_miptree_set_image_offset(mt, level, q, x, y);
- x += pack_x_pitch;
- }
- if (x > mt->total_width)
- mt->total_width = x;
-
- x = 0;
- y += pack_y_pitch;
- }
+ unsigned WL = MAX2(mt->physical_width0 >> level, 1);
+ unsigned HL = MAX2(mt->physical_height0 >> level, 1);
+ unsigned DL = MAX2(mt->physical_depth0 >> level, 1);
+ unsigned wL = ALIGN(WL, mt->align_w);
+ unsigned hL = ALIGN(HL, mt->align_h);
- mt->total_height += y;
- width = minify(width, 1);
- height = minify(height, 1);
- if (mt->target == GL_TEXTURE_3D)
- depth = minify(depth, 1);
+ if (mt->target == GL_TEXTURE_CUBE_MAP)
+ DL = 6;
- if (mt->compressed) {
- pack_y_pitch = (height + 3) / 4;
+ intel_miptree_set_level_info(mt, level, 0, 0, WL, HL, DL);
- if (pack_x_pitch > ALIGN(width, mt->align_w)) {
- pack_x_pitch = ALIGN(width, mt->align_w);
- pack_x_nr <<= 1;
- }
- } else {
- pack_x_nr <<= 1;
- if (pack_x_pitch > 4) {
- pack_x_pitch >>= 1;
- }
-
- if (pack_y_pitch > 2) {
- pack_y_pitch >>= 1;
- pack_y_pitch = ALIGN(pack_y_pitch, mt->align_h);
- }
+ for (unsigned q = 0; q < DL; q++) {
+ unsigned x = (q % (1 << level)) * wL;
+ unsigned y = ysum + (q >> level) * hL;
+
+ intel_miptree_set_image_offset(mt, level, q, x, y / yscale);
+ mt->total_width = MAX2(mt->total_width, x + wL);
+ mt->total_height = MAX2(mt->total_height, (y + hL) / yscale);
}
+
+ ysum += ALIGN(DL, 1 << level) / (1 << level) * hL;
}
- /* The 965's sampler lays cachelines out according to how accesses
- * in the texture surfaces run, so they may be "vertical" through
- * memory. As a result, the docs say in Surface Padding Requirements:
- * Sampling Engine Surfaces that two extra rows of padding are required.
- */
- if (mt->target == GL_TEXTURE_CUBE_MAP)
- mt->total_height += 2;
+ align_cube(mt);
}
void
diff --git a/dist/Mesa/src/mesa/main/fbobject.c b/dist/Mesa/src/mesa/main/fbobject.c
index 53e2ab7c8..359518d3f 100644
--- a/dist/Mesa/src/mesa/main/fbobject.c
+++ b/dist/Mesa/src/mesa/main/fbobject.c
@@ -3581,6 +3581,7 @@ invalidate_framebuffer_storage(GLenum target, GLsizei numAttachments,
"%s(attachment >= max. color attachments)", name);
return;
}
+ break;
}
default:
goto invalid_enum;
diff --git a/dist/Mesa/src/mesa/main/macros.h b/dist/Mesa/src/mesa/main/macros.h
index ddfeee226..f6466e8f5 100644
--- a/dist/Mesa/src/mesa/main/macros.h
+++ b/dist/Mesa/src/mesa/main/macros.h
@@ -672,7 +672,7 @@ minify(unsigned value, unsigned levels)
*
* \sa ROUND_DOWN_TO()
*/
-#define ALIGN(value, alignment) (((value) + alignment - 1) & ~(alignment - 1))
+#define ALIGN(value, alignment) (((value) + (alignment) - 1) & ~((alignment) - 1))
diff --git a/dist/Mesa/src/mesa/main/teximage.c b/dist/Mesa/src/mesa/main/teximage.c
index b719fc856..d2acb5bb7 100644
--- a/dist/Mesa/src/mesa/main/teximage.c
+++ b/dist/Mesa/src/mesa/main/teximage.c
@@ -1105,7 +1105,6 @@ _mesa_get_tex_max_num_levels(GLenum target, GLsizei width, GLsizei height,
case GL_TEXTURE_CUBE_MAP_ARRAY:
case GL_PROXY_TEXTURE_CUBE_MAP:
case GL_PROXY_TEXTURE_CUBE_MAP_ARRAY:
- ASSERT(width == height);
size = width;
break;
case GL_TEXTURE_2D:
@@ -1440,6 +1439,8 @@ _mesa_legal_texture_dimensions(struct gl_context *ctx, GLenum target,
case GL_PROXY_TEXTURE_CUBE_MAP_ARB:
maxSize = 1 << (ctx->Const.MaxCubeTextureLevels - 1);
maxSize >>= level;
+ if (width != height)
+ return GL_FALSE;
if (width < 2 * border || width > 2 * border + maxSize)
return GL_FALSE;
if (height < 2 * border || height > 2 * border + maxSize)
@@ -1493,7 +1494,9 @@ _mesa_legal_texture_dimensions(struct gl_context *ctx, GLenum target,
return GL_FALSE;
if (height < 2 * border || height > 2 * border + maxSize)
return GL_FALSE;
- if (depth < 1 || depth > ctx->Const.MaxArrayTextureLayers)
+ if (depth < 1 || depth > ctx->Const.MaxArrayTextureLayers || depth % 6)
+ return GL_FALSE;
+ if (width != height)
return GL_FALSE;
if (level >= ctx->Const.MaxCubeTextureLevels)
return GL_FALSE;
@@ -1984,27 +1987,6 @@ texture_error_check( struct gl_context *ctx,
}
}
- if ((target == GL_PROXY_TEXTURE_CUBE_MAP_ARB ||
- _mesa_is_cube_face(target)) && width != height) {
- _mesa_error(ctx, GL_INVALID_VALUE,
- "glTexImage2D(cube width != height)");
- return GL_TRUE;
- }
-
- if ((target == GL_PROXY_TEXTURE_CUBE_MAP_ARRAY ||
- target == GL_TEXTURE_CUBE_MAP_ARRAY) && width != height) {
- _mesa_error(ctx, GL_INVALID_VALUE,
- "glTexImage3D(cube array width != height)");
- return GL_TRUE;
- }
-
- if ((target == GL_PROXY_TEXTURE_CUBE_MAP_ARRAY ||
- target == GL_TEXTURE_CUBE_MAP_ARRAY) && (depth % 6)) {
- _mesa_error(ctx, GL_INVALID_VALUE,
- "glTexImage3D(cube array depth not multiple of 6)");
- return GL_TRUE;
- }
-
/* Check internalFormat */
if (_mesa_base_tex_format(ctx, internalFormat) < 0) {
_mesa_error(ctx, GL_INVALID_VALUE,
@@ -2236,14 +2218,6 @@ compressed_texture_error_check(struct gl_context *ctx, GLint dimensions,
goto error;
}
- /* For cube map, width must equal height */
- if ((target == GL_PROXY_TEXTURE_CUBE_MAP_ARB ||
- _mesa_is_cube_face(target)) && width != height) {
- reason = "width != height";
- error = GL_INVALID_VALUE;
- goto error;
- }
-
/* check image size in bytes */
if (expectedSize != imageSize) {
/* Per GL_ARB_texture_compression: GL_INVALID_VALUE is generated [...]
@@ -2589,13 +2563,6 @@ copytexture_error_check( struct gl_context *ctx, GLuint dimensions,
}
}
- if ((target == GL_PROXY_TEXTURE_CUBE_MAP_ARB ||
- _mesa_is_cube_face(target)) && width != height) {
- _mesa_error(ctx, GL_INVALID_VALUE,
- "glTexImage2D(cube width != height)");
- return GL_TRUE;
- }
-
if (_mesa_is_compressed_format(ctx, internalFormat)) {
if (!target_can_be_compressed(ctx, target, internalFormat)) {
_mesa_error(ctx, GL_INVALID_ENUM,