From: Chris Forbes Date: Wed, 1 Oct 2014 06:29:25 +0000 (+1300) Subject: i965: Dirty state in BO reallocation based on usage history X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1655f6fc61a2502d8c1fb87344f5e8b25bff8081;p=mesa.git i965: Dirty state in BO reallocation based on usage history Signed-off-by: Chris Forbes Reviewed-by: Anuj Phogat --- 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); }