summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2007-12-07 16:05:40 -0800
committerEric Anholt <eric@anholt.net>2007-12-07 16:05:40 -0800
commit8e089ba58bddead76bbe6b374ffeb6e77ba9571c (patch)
tree6fadf576b904bb479936a355ed716ca305556848 /src
parent1885651976f8fbf93848ea829d5cbab98449b8f1 (diff)
[965] Add a performance note about intel_bufferobj_data implementation.965-ttm
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/intel_buffer_objects.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_buffer_objects.c b/src/mesa/drivers/dri/i965/intel_buffer_objects.c
index 631550a4a1..6ed31c9458 100644
--- a/src/mesa/drivers/dri/i965/intel_buffer_objects.c
+++ b/src/mesa/drivers/dri/i965/intel_buffer_objects.c
@@ -105,6 +105,12 @@ static void intel_bufferobj_data( GLcontext *ctx,
obj->Size = size;
obj->Usage = usage;
+ /* 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) {
dri_bo_unreference(intel_obj->buffer);
intel_obj->buffer = NULL;