diff options
author | Eric Anholt <[email protected]> | 2014-04-25 11:26:27 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2014-05-01 15:12:26 -0700 |
commit | 6db640da221539dd7e564717665b664f6ee913b2 (patch) | |
tree | 8846ae33816a3089539ad05c90bcdde99d9499c6 /src/mesa/drivers/dri/i965 | |
parent | 5ec1adeb1020c719c5bd72263f1d2719c276f1a7 (diff) |
i965: Reuse intel_miptree_get_tile_offsets().
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Kristian Høgsberg <[email protected]>
Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_screen.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c index 2c8069d3c2d..4e1747f476f 100644 --- a/src/mesa/drivers/dri/i965/intel_screen.c +++ b/src/mesa/drivers/dri/i965/intel_screen.c @@ -320,25 +320,16 @@ intel_setup_image_from_mipmap_tree(struct brw_context *brw, __DRIimage *image, struct intel_mipmap_tree *mt, GLuint level, GLuint zoffset) { - unsigned int draw_x, draw_y; - uint32_t mask_x, mask_y; - intel_miptree_make_shareable(brw, mt); intel_miptree_check_level_layer(mt, level, zoffset); - intel_region_get_tile_masks(mt->region, &mask_x, &mask_y, false); - intel_miptree_get_image_offset(mt, level, zoffset, &draw_x, &draw_y); - image->width = minify(mt->physical_width0, level - mt->first_level); image->height = minify(mt->physical_height0, level - mt->first_level); - image->tile_x = draw_x & mask_x; - image->tile_y = draw_y & mask_y; - image->offset = intel_region_get_aligned_offset(mt->region, - draw_x & ~mask_x, - draw_y & ~mask_y, - false); + image->offset = intel_miptree_get_tile_offsets(mt, level, zoffset, + &image->tile_x, + &image->tile_y); intel_region_reference(&image->region, mt->region); } |