Skip to content
Snippets Groups Projects
Commit 9949d2a2 authored by Lina Versace's avatar Lina Versace
Browse files

i965: Remove unnecessary release/reference of brw_context.state.depth_region


Release the old depth region and reference the new one *only* if it has
changed.

Reviewed-by: Kenneth Graunke's avatarKenneth Graunke <kenneth@whitecape.org>
Signed-off-by: default avatarChad Versace <chad.versace@intel.com>
parent 3f7318c1
No related branches found
No related tags found
No related merge requests found
......@@ -115,13 +115,11 @@ static void brw_set_draw_region( struct intel_context *intel,
{
struct brw_context *brw = brw_context(&intel->ctx);
/* release old color/depth regions */
if (brw->state.depth_region != depth_region)
if (brw->state.depth_region != depth_region) {
brw->state.dirty.brw |= BRW_NEW_DEPTH_BUFFER;
intel_region_release(&brw->state.depth_region);
/* reference new color/depth regions */
intel_region_reference(&brw->state.depth_region, depth_region);
intel_region_release(&brw->state.depth_region);
intel_region_reference(&brw->state.depth_region, depth_region);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment