i965/miptree: Store chars-per-pixel even for isl based
authorTopi Pohjolainen <topi.pohjolainen@intel.com>
Thu, 22 Jun 2017 17:56:47 +0000 (20:56 +0300)
committerTopi Pohjolainen <topi.pohjolainen@intel.com>
Thu, 20 Jul 2017 08:32:21 +0000 (11:32 +0300)
This will significantly reduce chrun when switching remaaining
surface types to isl. After the full transition it will be easier
to calculate on-demand and drop the helper member in miptree.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
src/mesa/drivers/dri/i965/intel_mipmap_tree.c

index f32cd29d338e34d9d65a9bd8ebaa497500763bd2..c2d5eafa51029bd2b23d31cfd2a86f671c4511ba 100644 (file)
@@ -798,6 +798,7 @@ make_surface(struct brw_context *brw, GLenum target, mesa_format format,
    mt->target = target;
    mt->format = format;
    mt->aux_state = NULL;
+   mt->cpp = isl_format_get_layout(mt->surf.format)->bpb / 8;
 
    return mt;