summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorTopi Pohjolainen <[email protected]>2017-06-22 21:50:18 +0300
committerTopi Pohjolainen <[email protected]>2017-07-20 11:32:21 +0300
commit066dc9335e7afd1060bbec0f108abfc994eed514 (patch)
treee7b1735bb5265066d189a478c9dc835399867818 /src/mesa
parent76a3ce8fa583262d8650667390e53900e7799453 (diff)
i965: Prepare image setup from miptree for isl based
Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Topi Pohjolainen <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/intel_screen.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c
index 47354b82c42..44ea6a4562c 100644
--- a/src/mesa/drivers/dri/i965/intel_screen.c
+++ b/src/mesa/drivers/dri/i965/intel_screen.c
@@ -410,8 +410,15 @@ intel_setup_image_from_mipmap_tree(struct brw_context *brw, __DRIimage *image,
intel_miptree_check_level_layer(mt, level, zoffset);
- image->width = minify(mt->physical_width0, level - mt->first_level);
- image->height = minify(mt->physical_height0, level - mt->first_level);
+ if (mt->surf.size > 0) {
+ image->width = minify(mt->surf.phys_level0_sa.width,
+ level - mt->first_level);
+ image->height = minify(mt->surf.phys_level0_sa.height,
+ level - mt->first_level);
+ } else {
+ image->width = minify(mt->physical_width0, level - mt->first_level);
+ image->height = minify(mt->physical_height0, level - mt->first_level);
+ }
image->pitch = mt->surf.row_pitch;
image->offset = intel_miptree_get_tile_offsets(mt, level, zoffset,