if (intel_obj->region)
intel_bufferobj_release_region(intel, intel_obj);
- /* While it would seem to make sense to always reallocate the buffer here,
- * since it should allow us better concurrency between rendering and
- * map-cpu write-unmap, doing so was a minor (~10%) performance loss
- * for both classic and TTM mode with openarena. That may change with
- * improved buffer manager algorithms.
- */
- if (intel_obj->buffer != NULL && intel_obj->buffer->size != size) {
+ if (intel_obj->buffer != NULL) {
dri_bo_unreference(intel_obj->buffer);
intel_obj->buffer = NULL;
}
if (size != 0) {
- if (intel_obj->buffer == NULL)
- intel_bufferobj_alloc_buffer(intel, intel_obj);
+ intel_bufferobj_alloc_buffer(intel, intel_obj);
if (data != NULL)
dri_bo_subdata(intel_obj->buffer, 0, size, data);