[Mesa-dev] [v3 14/19] i965: Prepare slice copy for isl based miptrees

Topi Pohjolainen topi.pohjolainen at gmail.com
Mon May 15 12:08:04 UTC 2017


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

diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index 1ffb674..4804d25 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -1311,8 +1311,12 @@ intel_miptree_copy_slice(struct brw_context *brw,
 
 {
    mesa_format format = src_mt->format;
-   uint32_t width = minify(src_mt->physical_width0, level - src_mt->first_level);
-   uint32_t height = minify(src_mt->physical_height0, level - src_mt->first_level);
+   uint32_t width = src_mt->surf.size > 0 ?
+      minify(src_mt->surf.logical_level0_px.width, level) :
+      minify(src_mt->physical_width0, level - src_mt->first_level);
+   uint32_t height = src_mt->surf.size > 0 ?
+      minify(src_mt->surf.logical_level0_px.height, level) :
+      minify(src_mt->physical_height0, level - src_mt->first_level);
    int slice;
 
    if (face > 0)
-- 
2.9.3



More information about the mesa-dev mailing list