[Mesa-dev] [PATCH 05/22] i965/miptree: Store chars-per-pixel even for isl based

Topi Pohjolainen topi.pohjolainen at gmail.com
Tue Jul 18 08:46:15 UTC 2017


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.

Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
---
 src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index f113ded7cd..879036ce77 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -796,6 +796,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;
 
-- 
2.11.0



More information about the mesa-dev mailing list