diff options
author | marha <marha@users.sourceforge.net> | 2011-02-25 07:31:13 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-02-25 07:31:13 +0000 |
commit | a7971771a8ab6f6f76a2a8e482dbb3a30901af1c (patch) | |
tree | 97daee18ddace6f04744d7f4fa6b00aa5a59f4b7 /mesalib/src/mesa/state_tracker/st_cb_texture.c | |
parent | fbb8c9a149047ccb27e749053c83acf94dedcbf9 (diff) | |
download | vcxsrv-a7971771a8ab6f6f76a2a8e482dbb3a30901af1c.tar.gz vcxsrv-a7971771a8ab6f6f76a2a8e482dbb3a30901af1c.tar.bz2 vcxsrv-a7971771a8ab6f6f76a2a8e482dbb3a30901af1c.zip |
xserver randrproto mesa xkeyboard-config git update 25 Feb 2011
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_cb_texture.c')
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_cb_texture.c | 12 |
1 files changed, 12 insertions, 0 deletions
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. */ |