From bc6cafa045d8de839090fe2d82716b3afbd54701 Mon Sep 17 00:00:00 2001 From: Paul Berry Date: Mon, 10 Sep 2012 11:30:14 -0700 Subject: [PATCH] i965/blorp: Don't create a dummy renderbuffer just to fetch image offsets. This is unnecessary--the image offsets can be read directly out of the miptree using intel_miptree_get_image_offset. --- src/mesa/drivers/dri/i965/brw_blorp.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_blorp.cpp b/src/mesa/drivers/dri/i965/brw_blorp.cpp index 6acc59187d4..af1156c39b1 100644 --- a/src/mesa/drivers/dri/i965/brw_blorp.cpp +++ b/src/mesa/drivers/dri/i965/brw_blorp.cpp @@ -53,14 +53,7 @@ brw_blorp_mip_info::set(struct intel_mipmap_tree *mt, this->width = mt->level[level].width; this->height = mt->level[level].height; - /* Construct a dummy renderbuffer just to extract tile offsets. */ - struct intel_renderbuffer rb; - rb.mt = mt; - rb.mt_level = level; - rb.mt_layer = layer; - intel_renderbuffer_set_draw_offset(&rb); - x_offset = rb.draw_x; - y_offset = rb.draw_y; + intel_miptree_get_image_offset(mt, level, 0, layer, &x_offset, &y_offset); } void -- 2.30.2