aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-10-18 11:23:37 +0200
committermarha <marha@users.sourceforge.net>2013-10-18 11:23:37 +0200
commitb8a77c943fa53005b6cdb1ab792acf5ff0a131be (patch)
treee10b1a509f6773de3e547ac5332cf6e0a4e07617 /mesalib/src/mesa/main
parent9e23b44bfe1e6e85231b1c07d945cadf0c868648 (diff)
downloadvcxsrv-b8a77c943fa53005b6cdb1ab792acf5ff0a131be.tar.gz
vcxsrv-b8a77c943fa53005b6cdb1ab792acf5ff0a131be.tar.bz2
vcxsrv-b8a77c943fa53005b6cdb1ab792acf5ff0a131be.zip
mesa pixman git update 18 okt 2013
pixman commit 3c2f4b651747c1ac484c39d5128cae5483094342 mesa commit 9aad1ba70fad7bfa45778faa5a91235f8302264f
Diffstat (limited to 'mesalib/src/mesa/main')
-rw-r--r--mesalib/src/mesa/main/teximage.c47
-rw-r--r--mesalib/src/mesa/main/teximage.h4
2 files changed, 9 insertions, 42 deletions
diff --git a/mesalib/src/mesa/main/teximage.c b/mesalib/src/mesa/main/teximage.c
index e6cae0034..793c5d382 100644
--- a/mesalib/src/mesa/main/teximage.c
+++ b/mesalib/src/mesa/main/teximage.c
@@ -1112,7 +1112,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:
@@ -1447,6 +1446,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)
@@ -1500,7 +1501,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;
@@ -1991,27 +1994,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,
@@ -2243,14 +2225,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 [...]
@@ -2596,13 +2570,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,
@@ -4388,7 +4355,7 @@ teximagemultisample(GLuint dims, GLenum target, GLsizei samples,
void GLAPIENTRY
_mesa_TexImage2DMultisample(GLenum target, GLsizei samples,
- GLint internalformat, GLsizei width,
+ GLenum internalformat, GLsizei width,
GLsizei height, GLboolean fixedsamplelocations)
{
teximagemultisample(2, target, samples, internalformat,
@@ -4399,7 +4366,7 @@ _mesa_TexImage2DMultisample(GLenum target, GLsizei samples,
void GLAPIENTRY
_mesa_TexImage3DMultisample(GLenum target, GLsizei samples,
- GLint internalformat, GLsizei width,
+ GLenum internalformat, GLsizei width,
GLsizei height, GLsizei depth,
GLboolean fixedsamplelocations)
{
diff --git a/mesalib/src/mesa/main/teximage.h b/mesalib/src/mesa/main/teximage.h
index 889524718..792383d2f 100644
--- a/mesalib/src/mesa/main/teximage.h
+++ b/mesalib/src/mesa/main/teximage.h
@@ -296,12 +296,12 @@ _mesa_TexBufferRange(GLenum target, GLenum internalFormat, GLuint buffer,
extern void GLAPIENTRY
_mesa_TexImage2DMultisample(GLenum target, GLsizei samples,
- GLint internalformat, GLsizei width,
+ GLenum internalformat, GLsizei width,
GLsizei height, GLboolean fixedsamplelocations);
extern void GLAPIENTRY
_mesa_TexImage3DMultisample(GLenum target, GLsizei samples,
- GLint internalformat, GLsizei width,
+ GLenum internalformat, GLsizei width,
GLsizei height, GLsizei depth,
GLboolean fixedsamplelocations);