[Mesa-dev] [v2 33/39] i965: Prepare slice copy for isl based miptrees
Topi Pohjolainen
topi.pohjolainen at gmail.com
Wed May 3 09:22:46 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 55f6027..4ddcb13 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -1296,8 +1296,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