summaryrefslogtreecommitdiffstats
path: root/src/intel/isl/isl.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-07-08 22:11:06 -0700
committerJason Ekstrand <[email protected]>2016-07-13 11:47:37 -0700
commitfc3650a0a9eca29a9498f663d489ab729f55f65f (patch)
tree58d4b157cbc50708ba85cf59fe759a9730559b9b /src/intel/isl/isl.c
parent1f0433f07575b797f6073c0b421adbc5658e1107 (diff)
isl: Kill off isl_format_layout::bs
Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/intel/isl/isl.c')
-rw-r--r--src/intel/isl/isl.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c
index f6c9200674c..aaf4d1c8c77 100644
--- a/src/intel/isl/isl.c
+++ b/src/intel/isl/isl.c
@@ -904,7 +904,8 @@ isl_calc_linear_row_pitch(const struct isl_device *dev,
* being used to determine whether additional pages need to be defined.
*/
assert(phys_slice0_sa->w % fmtl->bw == 0);
- row_pitch = MAX(row_pitch, fmtl->bs * (phys_slice0_sa->w / fmtl->bw));
+ const uint32_t bs = fmtl->bpb / 8;
+ row_pitch = MAX(row_pitch, bs * (phys_slice0_sa->w / fmtl->bw));
/* From the Broadwel PRM >> Volume 2d: Command Reference: Structures >>
* RENDER_SURFACE_STATE Surface Pitch (p349):
@@ -922,9 +923,9 @@ isl_calc_linear_row_pitch(const struct isl_device *dev,
*/
if (info->usage & ISL_SURF_USAGE_RENDER_TARGET_BIT) {
if (isl_format_is_yuv(info->format)) {
- row_pitch = isl_align_npot(row_pitch, 2 * fmtl->bs);
+ row_pitch = isl_align_npot(row_pitch, 2 * bs);
} else {
- row_pitch = isl_align_npot(row_pitch, fmtl->bs);
+ row_pitch = isl_align_npot(row_pitch, bs);
}
}
@@ -1120,9 +1121,9 @@ isl_surf_init_s(const struct isl_device *dev,
base_alignment = MAX(1, info->min_alignment);
if (info->usage & ISL_SURF_USAGE_RENDER_TARGET_BIT) {
if (isl_format_is_yuv(info->format)) {
- base_alignment = MAX(base_alignment, 2 * fmtl->bs);
+ base_alignment = MAX(base_alignment, fmtl->bpb / 4);
} else {
- base_alignment = MAX(base_alignment, fmtl->bs);
+ base_alignment = MAX(base_alignment, fmtl->bpb / 8);
}
}
} else {