i965/miptree: Use the new simple alloc_tiled for CCS buffers
authorJason Ekstrand <jason.ekstrand@intel.com>
Mon, 12 Jun 2017 16:44:20 +0000 (09:44 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 15 Jun 2017 01:15:05 +0000 (18:15 -0700)
Reviewed-by: Plamena Manolova <plamena.manolova@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/intel_mipmap_tree.c

index 23ff1a53cbc46a9fc56a977a12f0a6db8e3086bf..02e74caa8133de71517099050b6cfdb27ce12388 100644 (file)
@@ -1595,13 +1595,8 @@ intel_miptree_alloc_non_msrt_mcs(struct brw_context *brw,
    const uint32_t alloc_flags =
       is_lossless_compressed ? 0 : BO_ALLOC_FOR_RENDER;
 
-   /* ISL has stricter set of alignment rules then the drm allocator.
-    * Therefore one can pass the ISL dimensions in terms of bytes instead of
-    * trying to recalculate based on different format block sizes.
-    */
-   buf->bo = brw_bo_alloc_tiled_2d(brw->bufmgr, "ccs-miptree",
-                                   buf->pitch, buf->size / buf->pitch,
-                                   1, I915_TILING_Y, &buf->pitch, alloc_flags);
+   buf->bo = brw_bo_alloc_tiled(brw->bufmgr, "ccs-miptree", buf->size,
+                                I915_TILING_Y, buf->pitch, alloc_flags);
    if (!buf->bo) {
       free(buf);
       free(aux_state);