aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTopi Pohjolainen <[email protected]>2017-06-22 21:12:40 +0300
committerTopi Pohjolainen <[email protected]>2017-07-20 11:32:21 +0300
commit07caa5932c64076acf8c8e82a1c12d6168984852 (patch)
treef071362bbcc37711878534f662a8e395424458eb
parenta844e6a8f40ce5c1c26f8110585cfc974bb16a8b (diff)
i965/miptree: Prepare intel_miptree_copy() for isl based
Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Topi Pohjolainen <[email protected]>
-rw-r--r--src/mesa/drivers/dri/i965/intel_blit.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_blit.c b/src/mesa/drivers/dri/i965/intel_blit.c
index 4ffff76cc54..68e9c1ad162 100644
--- a/src/mesa/drivers/dri/i965/intel_blit.c
+++ b/src/mesa/drivers/dri/i965/intel_blit.c
@@ -406,10 +406,22 @@ intel_miptree_copy(struct brw_context *brw,
*/
assert(src_x % bw == 0);
assert(src_y % bh == 0);
- assert(src_width % bw == 0 ||
- src_x + src_width == minify(src_mt->logical_width0, src_level));
- assert(src_height % bh == 0 ||
- src_y + src_height == minify(src_mt->logical_height0, src_level));
+
+ if (src_mt->surf.size > 0) {
+ assert(src_width % bw == 0 ||
+ src_x + src_width ==
+ minify(src_mt->surf.logical_level0_px.width, src_level));
+ assert(src_height % bh == 0 ||
+ src_y + src_height ==
+ minify(src_mt->surf.logical_level0_px.height, src_level));
+ } else {
+ assert(src_width % bw == 0 ||
+ src_x + src_width ==
+ minify(src_mt->logical_width0, src_level));
+ assert(src_height % bh == 0 ||
+ src_y + src_height ==
+ minify(src_mt->logical_height0, src_level));
+ }
src_x /= (int)bw;
src_y /= (int)bh;