[Mesa-dev] [PATCH 12/15] i965/blorp: Prepare for isl based miptrees

Topi Pohjolainen topi.pohjolainen at gmail.com
Tue Jun 13 14:50:10 UTC 2017


Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
---
 src/mesa/drivers/dri/i965/brw_blorp.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_blorp.c b/src/mesa/drivers/dri/i965/brw_blorp.c
index 355f936f06..fee7c43d2c 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,
-- 
2.11.0



More information about the mesa-dev mailing list