[Mesa-dev] [v2 23/39] i965/blorp: Add support for isl based miptrees
Topi Pohjolainen
topi.pohjolainen at gmail.com
Wed May 3 09:22:36 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 0235681..158cf66 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp.c
+++ b/src/mesa/drivers/dri/i965/brw_blorp.c
@@ -131,8 +131,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.9.3
More information about the mesa-dev
mailing list