summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texstore.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/texstore.c')
-rw-r--r--src/mesa/main/texstore.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c
index ab9fdf26d3e..52eef3ebab3 100644
--- a/src/mesa/main/texstore.c
+++ b/src/mesa/main/texstore.c
@@ -4336,25 +4336,24 @@ 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)) {
+ texImage->Width, texImage->Height,
+ texImage->Depth)) {
_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");
}