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 | |
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')
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_cb_texture.c | 12 | ||||
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_draw.c | 9 |
2 files changed, 18 insertions, 3 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. */ diff --git a/mesalib/src/mesa/state_tracker/st_draw.c b/mesalib/src/mesa/state_tracker/st_draw.c index 11ebd067e..6530a06ad 100644 --- a/mesalib/src/mesa/state_tracker/st_draw.c +++ b/mesalib/src/mesa/state_tracker/st_draw.c @@ -315,10 +315,13 @@ setup_interleaved_attribs(struct gl_context *ctx, const GLubyte *low_addr = NULL; /* Find the lowest address. */ - for (attr = 0; attr < vpv->num_inputs; attr++) { - const GLubyte *start = arrays[vp->index_to_input[attr]]->Ptr; + if(vpv->num_inputs) { + low_addr = arrays[vp->index_to_input[0]]->Ptr; - low_addr = !low_addr ? start : MIN2(low_addr, start); + for (attr = 1; attr < vpv->num_inputs; attr++) { + const GLubyte *start = arrays[vp->index_to_input[attr]]->Ptr; + low_addr = MIN2(low_addr, start); + } } for (attr = 0; attr < vpv->num_inputs; attr++) { |