diff options
author | marha <marha@users.sourceforge.net> | 2012-08-13 10:11:17 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-08-13 10:11:17 +0200 |
commit | f5a4fa87e844b3ea2658a2355a4c4ac3393a65a1 (patch) | |
tree | 921a5a742930124e7bd7e9a7e73f6029bd74338d /mesalib/src/mesa/main/texstore.c | |
parent | ec4051f308e8e84146e0ecc39b6d228e500e9636 (diff) | |
parent | 9ddf44af81782451cee798e06749ce3067a14a41 (diff) | |
download | vcxsrv-f5a4fa87e844b3ea2658a2355a4c4ac3393a65a1.tar.gz vcxsrv-f5a4fa87e844b3ea2658a2355a4c4ac3393a65a1.tar.bz2 vcxsrv-f5a4fa87e844b3ea2658a2355a4c4ac3393a65a1.zip |
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/mesa/main/texstore.c')
-rw-r--r-- | mesalib/src/mesa/main/texstore.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/mesalib/src/mesa/main/texstore.c b/mesalib/src/mesa/main/texstore.c index ab9fdf26d..544c08d73 100644 --- a/mesalib/src/mesa/main/texstore.c +++ b/mesalib/src/mesa/main/texstore.c @@ -4336,25 +4336,22 @@ void _mesa_store_teximage(struct gl_context *ctx, GLuint dims, struct gl_texture_image *texImage, - GLint internalFormat, - GLint width, GLint height, GLint depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels, const struct gl_pixelstore_attrib *packing) { assert(dims == 1 || dims == 2 || dims == 3); - if (width == 0 || height == 0 || depth == 0) + if (texImage->Width == 0 || texImage->Height == 0 || texImage->Depth == 0) return; /* allocate storage for texture data */ - if (!ctx->Driver.AllocTextureImageBuffer(ctx, texImage, texImage->TexFormat, - width, height, depth)) { + if (!ctx->Driver.AllocTextureImageBuffer(ctx, texImage)) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage%uD", dims); return; } store_texsubimage(ctx, texImage, - 0, 0, 0, width, height, depth, + 0, 0, 0, texImage->Width, texImage->Height, texImage->Depth, format, type, pixels, packing, "glTexImage"); } @@ -4382,9 +4379,6 @@ _mesa_store_texsubimage(struct gl_context *ctx, GLuint dims, void _mesa_store_compressed_teximage(struct gl_context *ctx, GLuint dims, struct gl_texture_image *texImage, - GLint internalFormat, - GLint width, GLint height, GLint depth, - GLint border, GLsizei imageSize, const GLvoid *data) { /* only 2D compressed images are supported at this time */ @@ -4403,15 +4397,14 @@ _mesa_store_compressed_teximage(struct gl_context *ctx, GLuint dims, ASSERT(texImage->Depth == 1); /* allocate storage for texture data */ - if (!ctx->Driver.AllocTextureImageBuffer(ctx, texImage, texImage->TexFormat, - width, height, 1)) { + if (!ctx->Driver.AllocTextureImageBuffer(ctx, texImage)) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage2D"); return; } _mesa_store_compressed_texsubimage(ctx, dims, texImage, 0, 0, 0, - width, height, depth, + texImage->Width, texImage->Height, texImage->Depth, texImage->TexFormat, imageSize, data); } |