aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-02-25 08:27:07 +0000
committermarha <marha@users.sourceforge.net>2011-02-25 08:27:07 +0000
commit27b0ed125725f09242054563bb65ac20cfaa17ff (patch)
tree6fe92374761ae87d8541d117605db27f3486aee1 /mesalib/src/mesa
parente8d899178e9ebe174e6b4a53297d3dfced8003f0 (diff)
parent8268836508edd4ba2a3045c9ba937397df7bf2c5 (diff)
downloadvcxsrv-27b0ed125725f09242054563bb65ac20cfaa17ff.tar.gz
vcxsrv-27b0ed125725f09242054563bb65ac20cfaa17ff.tar.bz2
vcxsrv-27b0ed125725f09242054563bb65ac20cfaa17ff.zip
svn merge ^/branches/released .
Diffstat (limited to 'mesalib/src/mesa')
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_texture.c12
-rw-r--r--mesalib/src/mesa/state_tracker/st_draw.c9
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 708aa1290..5438968b7 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 7f661d529..16cd92c6b 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++) {