aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-03-26 14:34:38 +0200
committermarha <marha@users.sourceforge.net>2012-03-26 14:34:38 +0200
commit1d6d472342aee7b9c68e9f1d92762ef808d35ac2 (patch)
tree49700f649b4f4fedb3346ea7c58776925be11990 /mesalib/src
parent0f834b91a4768673833ab4917e87d86c237bb1a6 (diff)
downloadvcxsrv-1d6d472342aee7b9c68e9f1d92762ef808d35ac2.tar.gz
vcxsrv-1d6d472342aee7b9c68e9f1d92762ef808d35ac2.tar.bz2
vcxsrv-1d6d472342aee7b9c68e9f1d92762ef808d35ac2.zip
fontconfig libxcb mesa xkeyboard-config git update 26 Mar 2012
Diffstat (limited to 'mesalib/src')
-rw-r--r--mesalib/src/glsl/ir_validate.cpp2
-rw-r--r--mesalib/src/mesa/main/texobj.c3
-rw-r--r--mesalib/src/mesa/main/uniform_query.cpp4
-rw-r--r--mesalib/src/mesa/state_tracker/st_gen_mipmap.c18
4 files changed, 21 insertions, 6 deletions
diff --git a/mesalib/src/glsl/ir_validate.cpp b/mesalib/src/glsl/ir_validate.cpp
index 20a0377d4..101d9992d 100644
--- a/mesalib/src/glsl/ir_validate.cpp
+++ b/mesalib/src/glsl/ir_validate.cpp
@@ -455,7 +455,7 @@ ir_validate::visit_leave(ir_expression *ir)
ir_visitor_status
ir_validate::visit_leave(ir_swizzle *ir)
{
- int chans[4] = {ir->mask.x, ir->mask.y, ir->mask.z, ir->mask.w};
+ unsigned int chans[4] = {ir->mask.x, ir->mask.y, ir->mask.z, ir->mask.w};
for (unsigned int i = 0; i < ir->type->vector_elements; i++) {
if (chans[i] >= ir->val->type->vector_elements) {
diff --git a/mesalib/src/mesa/main/texobj.c b/mesalib/src/mesa/main/texobj.c
index cfaac64bf..97bef3543 100644
--- a/mesalib/src/mesa/main/texobj.c
+++ b/mesalib/src/mesa/main/texobj.c
@@ -567,7 +567,8 @@ _mesa_test_texobj_completeness( const struct gl_context *ctx,
GLint i;
const GLint minLevel = baseLevel;
const GLint maxLevel = t->_MaxLevel;
- GLuint width, height, depth, face, numFaces = 1;
+ const GLuint numFaces = t->Target == GL_TEXTURE_CUBE_MAP ? 6 : 1;
+ GLuint width, height, depth, face;
if (minLevel > maxLevel) {
incomplete(t, BASE, "minLevel > maxLevel");
diff --git a/mesalib/src/mesa/main/uniform_query.cpp b/mesalib/src/mesa/main/uniform_query.cpp
index 991df7896..da41ee84c 100644
--- a/mesalib/src/mesa/main/uniform_query.cpp
+++ b/mesalib/src/mesa/main/uniform_query.cpp
@@ -905,8 +905,10 @@ _mesa_get_uniform_location(struct gl_context *ctx,
name_copy[i-1] = '\0';
offset = strtol(&name[i], NULL, 10);
- if (offset < 0)
+ if (offset < 0) {
+ free(name_copy);
return -1;
+ }
array_lookup = true;
} else {
diff --git a/mesalib/src/mesa/state_tracker/st_gen_mipmap.c b/mesalib/src/mesa/state_tracker/st_gen_mipmap.c
index d3496642f..889200686 100644
--- a/mesalib/src/mesa/state_tracker/st_gen_mipmap.c
+++ b/mesalib/src/mesa/state_tracker/st_gen_mipmap.c
@@ -233,10 +233,22 @@ st_generate_mipmap(struct gl_context *ctx, GLenum target,
= _mesa_get_tex_image(ctx, texObj, target, srcLevel);
struct gl_texture_image *dstImage;
struct st_texture_image *stImage;
- uint dstWidth = u_minify(pt->width0, dstLevel);
- uint dstHeight = u_minify(pt->height0, dstLevel);
- uint dstDepth = u_minify(pt->depth0, dstLevel);
uint border = srcImage->Border;
+ uint dstWidth, dstHeight, dstDepth;
+
+ dstWidth = u_minify(pt->width0, dstLevel);
+ if (texObj->Target == GL_TEXTURE_1D_ARRAY) {
+ dstHeight = pt->array_size;
+ }
+ else {
+ dstHeight = u_minify(pt->height0, dstLevel);
+ }
+ if (texObj->Target == GL_TEXTURE_2D_ARRAY) {
+ dstDepth = pt->array_size;
+ }
+ else {
+ dstDepth = u_minify(pt->depth0, dstLevel);
+ }
dstImage = _mesa_get_tex_image(ctx, texObj, target, dstLevel);
if (!dstImage) {