array->Format.Type, array->Format.Size,
binding->Stride);
printf(" Address/offset %p in Buffer Object %u\n",
- array->Ptr, bo->Name);
+ array->Ptr, bo ? bo->Name : 0);
f[k] = 1.0F; /* XXX replace the bad value! */
}
/*assert(!IS_INF_OR_NAN(f[k])); */
"ptr %p Bufobj %u\n",
gl_vert_attrib_name((gl_vert_attrib) i),
array->Format.Size, binding->Stride,
- array->Ptr, bufObj->Name);
+ array->Ptr, bufObj ? bufObj->Name : 0);
if (_mesa_is_bufferobj(bufObj)) {
GLubyte *p = bufObj->Mappings[MAP_INTERNAL].Pointer;
}
}
- /* If the index buffer isn't in a VBO, then treating the application's
- * subranges of the index buffer as one large index buffer may lead to
- * us reading unmapped memory.
- */
- if (!_mesa_is_bufferobj(ctx->Array.VAO->IndexBufferObj))
- fallback = GL_TRUE;
+ if (ctx->Const.MultiDrawWithUserIndices) {
+ /* Check whether prim[i].start would overflow. */
+ if (((max_index_ptr - min_index_ptr) >> ib.index_size_shift) > UINT_MAX)
+ fallback = GL_TRUE;
+ } else {
+ /* If the index buffer isn't in a VBO, then treating the application's
+ * subranges of the index buffer as one large index buffer may lead to
+ * us reading unmapped memory.
+ */
+ if (!_mesa_is_bufferobj(ctx->Array.VAO->IndexBufferObj))
+ fallback = GL_TRUE;
+ }
if (!fallback) {
struct _mesa_prim *prim;