Commit be91f23e authored by Jordan Justen's avatar Jordan Justen

isl: Fix image alignment calculation

The previous code was resulting in an alignment of 0.
Signed-off-by: Jordan Justen's avatarJordan Justen <jordan.l.justen@intel.com>
parent d8cd5e33
......@@ -1071,8 +1071,9 @@ isl_surf_init_s(const struct isl_device *dev,
const uint32_t size = row_pitch * isl_align(total_h_sa, tile_info.height);
/* Alignment of surface base address, in bytes */
uint32_t base_alignment = info->min_alignment;
base_alignment = isl_align(base_alignment, tile_info.size);
uint32_t base_alignment = MAX(1, info->min_alignment);
assert(isl_is_pow2(base_alignment) && isl_is_pow2(tile_info.size));
base_alignment = MAX(base_alignment, tile_info.size);
*surf = (struct isl_surf) {
.dim = info->dim,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment