i965/miptree: Pass the offset into create_for_bo in create_for_dri_image
authorJason Ekstrand <jason.ekstrand@intel.com>
Mon, 12 Jun 2017 17:30:44 +0000 (10:30 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 13 Jul 2017 04:15:46 +0000 (21:15 -0700)
Reviewed-by: Chad Versace <chadversary@chromium.org>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
src/mesa/drivers/dri/i965/intel_mipmap_tree.c

index 9dcf5be0af9ce25b55ff844bfb7db8792588199c..bdd0cd56020df9ab340136380fc662df48cbfa75 100644 (file)
@@ -1070,7 +1070,7 @@ intel_miptree_create_for_dri_image(struct brw_context *brw,
     */
    struct intel_mipmap_tree *mt =
       intel_miptree_create_for_bo(brw, image->bo, format,
-                                  0, image->width, image->height, 1,
+                                  image->offset, image->width, image->height, 1,
                                   image->pitch,
                                   MIPTREE_LAYOUT_DISABLE_AUX);
    if (mt == NULL)
@@ -1097,8 +1097,6 @@ intel_miptree_create_for_dri_image(struct brw_context *brw,
       }
    }
 
-   mt->offset = image->offset;
-
    return mt;
 }