summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/varray.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/main/varray.h b/src/mesa/main/varray.h
index ecfc6b6c9b6..3b9f39a61df 100644
--- a/src/mesa/main/varray.h
+++ b/src/mesa/main/varray.h
@@ -76,9 +76,10 @@ static inline const GLubyte *
_mesa_vertex_attrib_address(const struct gl_vertex_attrib_array *array,
const struct gl_vertex_buffer_binding *binding)
{
- return (binding->BufferObj->Name == 0 ?
- array->Ptr :
- (const GLubyte *)(binding->Offset + array->RelativeOffset));
+ if (_mesa_is_bufferobj(binding->BufferObj))
+ return (const GLubyte *) (binding->Offset + array->RelativeOffset);
+ else
+ return array->Ptr;
}
/**