From 1655f6fc61a2502d8c1fb87344f5e8b25bff8081 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Wed, 1 Oct 2014 19:29:25 +1300 Subject: [PATCH] i965: Dirty state in BO reallocation based on usage history Signed-off-by: Chris Forbes Reviewed-by: Anuj Phogat --- src/mesa/drivers/dri/i965/intel_buffer_objects.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/intel_buffer_objects.c b/src/mesa/drivers/dri/i965/intel_buffer_objects.c index 82e07444550..9298e247b34 100644 --- a/src/mesa/drivers/dri/i965/intel_buffer_objects.c +++ b/src/mesa/drivers/dri/i965/intel_buffer_objects.c @@ -110,7 +110,10 @@ intel_bufferobj_alloc_buffer(struct brw_context *brw, /* the buffer might be bound as a uniform buffer, need to update it */ - brw->state.dirty.brw |= BRW_NEW_UNIFORM_BUFFER; + if (intel_obj->Base.UsageHistory & USAGE_UNIFORM_BUFFER) + brw->state.dirty.brw |= BRW_NEW_UNIFORM_BUFFER; + if (intel_obj->Base.UsageHistory & USAGE_TEXTURE_BUFFER) + brw->state.dirty.brw |= BRW_NEW_TEXTURE_BUFFER; intel_bufferobj_mark_inactive(intel_obj); } -- 2.30.2