diff options
author | marha <marha@users.sourceforge.net> | 2011-02-22 15:03:18 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-02-22 15:03:18 +0000 |
commit | aa5b2e956fcc17b27d0f20ba7af65c52b34ef135 (patch) | |
tree | 6117dbd9745f6fa241d5ca19af20d1c3adb6e859 /mesalib/src/mesa/state_tracker/st_draw.c | |
parent | 2d47702332ee534cda7f913e8d7892e53e4e23dc (diff) | |
parent | 9273afeeb4499a0493f120b7525e17b6ae51113e (diff) | |
download | vcxsrv-aa5b2e956fcc17b27d0f20ba7af65c52b34ef135.tar.gz vcxsrv-aa5b2e956fcc17b27d0f20ba7af65c52b34ef135.tar.bz2 vcxsrv-aa5b2e956fcc17b27d0f20ba7af65c52b34ef135.zip |
svn merge ^/branches/released .
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_draw.c')
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_draw.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_draw.c b/mesalib/src/mesa/state_tracker/st_draw.c index 564d63483..7f661d529 100644 --- a/mesalib/src/mesa/state_tracker/st_draw.c +++ b/mesalib/src/mesa/state_tracker/st_draw.c @@ -249,6 +249,7 @@ is_interleaved_arrays(const struct st_vertex_program *vp, const struct gl_buffer_object *firstBufObj = NULL;
GLint firstStride = -1;
const GLubyte *client_addr = NULL;
+ GLboolean user_memory;
for (attr = 0; attr < vpv->num_inputs; attr++) {
const GLuint mesaAttr = vp->index_to_input[attr];
@@ -257,6 +258,7 @@ is_interleaved_arrays(const struct st_vertex_program *vp, if (firstStride < 0) {
firstStride = stride;
+ user_memory = !bufObj || !bufObj->Name;
}
else if (firstStride != stride) {
return GL_FALSE;
@@ -266,6 +268,9 @@ is_interleaved_arrays(const struct st_vertex_program *vp, /* Try to detect if the client-space arrays are
* "close" to each other.
*/
+ if (!user_memory) {
+ return GL_FALSE;
+ }
if (!client_addr) {
client_addr = arrays[mesaAttr]->Ptr;
}
@@ -275,6 +280,9 @@ is_interleaved_arrays(const struct st_vertex_program *vp, }
}
else if (!firstBufObj) {
+ if (user_memory) {
+ return GL_FALSE;
+ }
firstBufObj = bufObj;
}
else if (bufObj != firstBufObj) {
|