From a7971771a8ab6f6f76a2a8e482dbb3a30901af1c Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 25 Feb 2011 07:31:13 +0000 Subject: xserver randrproto mesa xkeyboard-config git update 25 Feb 2011 --- mesalib/src/mesa/state_tracker/st_cb_texture.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'mesalib/src/mesa/state_tracker/st_cb_texture.c') diff --git a/mesalib/src/mesa/state_tracker/st_cb_texture.c b/mesalib/src/mesa/state_tracker/st_cb_texture.c index a40a79bb8..08c498b14 100644 --- a/mesalib/src/mesa/state_tracker/st_cb_texture.c +++ b/mesalib/src/mesa/state_tracker/st_cb_texture.c @@ -579,6 +579,12 @@ st_TexImage(struct gl_context * ctx, pixels, unpack, "glTexImage"); } + /* for a 1D array upload the image as a series of layer with height = 1 */ + if (target == GL_TEXTURE_1D_ARRAY) { + depth = height; + height = 1; + } + /* * Prepare to store the texture data. Either map the gallium texture buffer * memory or malloc space for it. @@ -986,6 +992,12 @@ st_TexSubimage(struct gl_context *ctx, GLint dims, GLenum target, GLint level, if (!pixels) return; + /* for a 1D array upload the image as a series of layer with height = 1 */ + if (target == GL_TEXTURE_1D_ARRAY) { + depth = height; + height = 1; + } + /* Map buffer if necessary. Need to lock to prevent other contexts * from uploading the buffer under us. */ -- cgit v1.2.3