buffer->stride = dst_stride;
if (dst_stride == element->glarray->StrideB) {
- intel_upload_data(&brw->intel, element->glarray->Ptr, size,
+ intel_upload_data(&brw->intel, element->glarray->Ptr, size, dst_stride,
&buffer->bo, &buffer->offset);
} else {
const unsigned char *src = element->glarray->Ptr;
- char *dst = intel_upload_map(&brw->intel, size);
+ char *dst = intel_upload_map(&brw->intel, size, dst_stride);
int i;
for (i = 0; i < element->count; i++) {
src += element->glarray->StrideB;
dst += dst_stride;
}
- intel_upload_unmap(&brw->intel, dst, size,
+ intel_upload_unmap(&brw->intel, dst, size, dst_stride,
&buffer->bo, &buffer->offset);
}
}
int count = upload[0]->count, offset;
char *map;
- map = intel_upload_map(&brw->intel, total_size * count);
+ map = intel_upload_map(&brw->intel, total_size * count, total_size);
for (i = offset = 0; i < nr_uploads; i++) {
const unsigned char *src = upload[i]->glarray->Ptr;
int size = upload[i]->element_size;
offset += size;
}
- intel_upload_unmap(&brw->intel, map, total_size * count,
+ intel_upload_unmap(&brw->intel, map, total_size * count, total_size,
&buffer->bo, &buffer->offset);
buffer->stride = offset;
j++;
/* Get new bufferobj, offset:
*/
- intel_upload_data(&brw->intel, index_buffer->ptr, ib_size, &bo, &offset);
+ intel_upload_data(&brw->intel, index_buffer->ptr, ib_size, ib_type_size,
+ &bo, &offset);
brw->ib.start_vertex_offset = offset / ib_type_size;
offset = 0;
} else {
bufferobj);
map += offset;
- intel_upload_data(&brw->intel, map, ib_size, &bo, &offset);
+ intel_upload_data(&brw->intel, map, ib_size, ib_type_size,
+ &bo, &offset);
brw->ib.start_vertex_offset = offset / ib_type_size;
offset = 0;