summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-05-16 14:58:00 -0700
committerJason Ekstrand <[email protected]>2017-05-26 07:58:01 -0700
commitb50b821eb35bc783f463b80e4a284d55caaf0e37 (patch)
tree0913941b7f84f98fff5153e08995e02b8520146d
parentc16e840f9a9f7f6c18bc3a6d630c20c0fceea5bb (diff)
i965/blorp: Properly handle mt->first_level
The guts of blorp and ISL don't understand i965's partial miptrees. Instead, we need to subtract off first_level before we hand anything off to blorp. Reviewed-by: Topi Pohjolainen <[email protected]>
-rw-r--r--src/mesa/drivers/dri/i965/brw_blorp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_blorp.c b/src/mesa/drivers/dri/i965/brw_blorp.c
index ebc46126846..64aa4c90883 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp.c
+++ b/src/mesa/drivers/dri/i965/brw_blorp.c
@@ -271,6 +271,9 @@ blorp_surf_for_miptree(struct brw_context *brw,
}
assert((surf->aux_usage == ISL_AUX_USAGE_NONE) ==
(surf->aux_addr.buffer == NULL));
+
+ /* ISL wants real levels, not offset ones. */
+ *level -= mt->first_level;
}
static enum isl_format