summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mesa/drivers/dri/i965/intel_mipmap_tree.c10
1 files changed, 8 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 858c7f51da..e628d94e71 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -1468,9 +1468,15 @@ intel_miptree_alloc_mcs(struct brw_context *brw,
*
* Note: the clear value for MCS buffers is all 1's, so we memset to 0xff.
*/
- assert(brw_bo_map_gtt(brw, mt->mcs_mt->bo, "miptree") == 0);
+ size_t height = mt->mcs_mt->total_height;
+ if (brw->has_llc) {
+ brw_bo_map(brw, mt->mcs_mt->bo, true, "miptree");
+ height = ALIGN(mt->mcs_mt->total_height, 32);
+ } else
+ brw_bo_map_gtt(brw, mt->mcs_mt->bo, "miptree");
+
void *data = mt->mcs_mt->bo->virtual;
- memset(data, 0xff, mt->mcs_mt->total_height * mt->mcs_mt->pitch);
+ memset(data, 0xff, height * mt->mcs_mt->pitch);
intel_miptree_unmap_raw(mt->mcs_mt);
mt->fast_clear_state = INTEL_FAST_CLEAR_STATE_CLEAR;