From: Topi Pohjolainen Date: Sat, 22 Apr 2017 06:37:10 +0000 (+0300) Subject: i965/blorp: Prepare for isl based miptrees X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7294cde750cc5dcad0a24e826440fdb00da53eae;p=mesa.git i965/blorp: Prepare for isl based miptrees Reviewed-by: Jason Ekstrand Signed-off-by: Topi Pohjolainen --- diff --git a/src/mesa/drivers/dri/i965/brw_blorp.c b/src/mesa/drivers/dri/i965/brw_blorp.c index e8993a816d5..f13b61bbc40 100644 --- a/src/mesa/drivers/dri/i965/brw_blorp.c +++ b/src/mesa/drivers/dri/i965/brw_blorp.c @@ -148,8 +148,13 @@ blorp_surf_for_miptree(struct brw_context *brw, intel_miptree_check_level_layer(mt, *level, start_layer + i); } - intel_miptree_get_isl_surf(brw, mt, &tmp_surfs[0]); - surf->surf = &tmp_surfs[0]; + if (mt->surf.size > 0) { + surf->surf = &mt->surf; + } else { + intel_miptree_get_isl_surf(brw, mt, &tmp_surfs[0]); + surf->surf = &tmp_surfs[0]; + } + surf->addr = (struct blorp_address) { .buffer = mt->bo, .offset = mt->offset,