diff options
author | marha <marha@users.sourceforge.net> | 2011-01-16 16:08:57 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-01-16 16:08:57 +0000 |
commit | 367c91bebcdc1f5ba4278b68eb8715218d9640ad (patch) | |
tree | 7ddef803c402f1b84e293793c5fd3d0e95d3de0a /mesalib/src/mesa/state_tracker/st_draw.c | |
parent | 6feea7e6cdde235d7e3727c4155ca9f8d90df3ca (diff) | |
download | vcxsrv-367c91bebcdc1f5ba4278b68eb8715218d9640ad.tar.gz vcxsrv-367c91bebcdc1f5ba4278b68eb8715218d9640ad.tar.bz2 vcxsrv-367c91bebcdc1f5ba4278b68eb8715218d9640ad.zip |
mesalib git update 16/1/2011
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_draw.c')
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_draw.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_draw.c b/mesalib/src/mesa/state_tracker/st_draw.c index ece051fc8..19466ea44 100644 --- a/mesalib/src/mesa/state_tracker/st_draw.c +++ b/mesalib/src/mesa/state_tracker/st_draw.c @@ -387,9 +387,16 @@ setup_interleaved_attribs(struct gl_context *ctx, vbuffer->max_index = max_index;
}
+ /*
+ if (arrays[mesaAttr]->InstanceDivisor)
+ vbuffer[attr].max_index = arrays[mesaAttr]->_MaxElement;
+ else
+ vbuffer[attr].max_index = max_index;
+ */
+
velements[attr].src_offset =
(unsigned) (arrays[mesaAttr]->Ptr - offset0);
- velements[attr].instance_divisor = 0;
+ velements[attr].instance_divisor = arrays[mesaAttr]->InstanceDivisor;
velements[attr].vertex_buffer_index = 0;
velements[attr].src_format =
st_pipe_vertex_format(arrays[mesaAttr]->Type,
@@ -440,7 +447,6 @@ setup_non_interleaved_attribs(struct gl_context *ctx, vbuffer[attr].buffer = NULL;
pipe_resource_reference(&vbuffer[attr].buffer, stobj->buffer);
vbuffer[attr].buffer_offset = pointer_to_offset(arrays[mesaAttr]->Ptr);
- velements[attr].src_offset = 0;
}
else {
/* attribute data is in user-space memory, not a VBO */
@@ -476,15 +482,19 @@ setup_non_interleaved_attribs(struct gl_context *ctx, }
vbuffer[attr].buffer_offset = 0;
- velements[attr].src_offset = 0;
}
assert(velements[attr].src_offset <= 2048); /* 11-bit field */
/* common-case setup */
vbuffer[attr].stride = stride; /* in bytes */
- vbuffer[attr].max_index = max_index;
- velements[attr].instance_divisor = 0;
+ if (arrays[mesaAttr]->InstanceDivisor)
+ vbuffer[attr].max_index = arrays[mesaAttr]->_MaxElement;
+ else
+ vbuffer[attr].max_index = max_index;
+
+ velements[attr].src_offset = 0;
+ velements[attr].instance_divisor = arrays[mesaAttr]->InstanceDivisor;
velements[attr].vertex_buffer_index = attr;
velements[attr].src_format
= st_pipe_vertex_format(arrays[mesaAttr]->Type,
|