diff options
author | Jason Ekstrand <[email protected]> | 2016-07-08 14:57:19 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-07-13 11:47:37 -0700 |
commit | 0d48ac627a5a6021a8c40504937f910bf5b765a8 (patch) | |
tree | bfbba90740fa4364b7071f3a8695a88450199988 /src/intel | |
parent | 58c1b1088bdffe38f2f80fff4bd07708aa22e0c7 (diff) |
isl: Stop multiplying height by block size
The row pitch already specifies the size of a row of elements.
Multiplying by the block height simply causes us to allocate as muc as 12
times more memory than needed for compressed textures.
Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/intel')
-rw-r--r-- | src/intel/isl/isl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c index 72b681ed215..decba3d3e87 100644 --- a/src/intel/isl/isl.c +++ b/src/intel/isl/isl.c @@ -1113,8 +1113,8 @@ isl_surf_init_s(const struct isl_device *dev, phys_level0_sa.array_len, row_pitch, array_pitch_el_rows); - const uint32_t total_h_sa = total_h_el * fmtl->bh; - const uint32_t size = row_pitch * isl_align(total_h_sa, tile_info.height); + const uint32_t size = + row_pitch * isl_align(total_h_el, tile_info.height); /* Alignment of surface base address, in bytes */ uint32_t base_alignment = MAX(1, info->min_alignment); |