diff options
Diffstat (limited to 'lib/mesa/src/intel/isl/isl_gen6.c')
-rw-r--r-- | lib/mesa/src/intel/isl/isl_gen6.c | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/lib/mesa/src/intel/isl/isl_gen6.c b/lib/mesa/src/intel/isl/isl_gen6.c index 51f2100ac..b74690319 100644 --- a/lib/mesa/src/intel/isl/isl_gen6.c +++ b/lib/mesa/src/intel/isl/isl_gen6.c @@ -88,8 +88,6 @@ isl_gen6_choose_image_alignment_el(const struct isl_device *dev, * | format | halign | valign | * +------------------------+--------+--------+ * | YUV 4:2:2 formats | 4 | * | - * | BC1-5 | 4 | 4 | - * | FXT1 | 8 | 4 | * | uncompressed formats | 4 | * | * +------------------------+--------+--------+ * @@ -112,32 +110,38 @@ isl_gen6_choose_image_alignment_el(const struct isl_device *dev, */ if (isl_format_is_compressed(info->format)) { - /* Compressed formats have an alignment equal to their block size */ *image_align_el = isl_extent3d(1, 1, 1); return; } - /* Separate stencil requires 4x2 alignment */ - if (isl_surf_usage_is_stencil(info->usage) && - info->format == ISL_FORMAT_R8_UINT) { + if (isl_format_is_yuv(info->format)) { *image_align_el = isl_extent3d(4, 2, 1); return; } - /* Depth or combined depth stencil surfaces require 4x4 alignment */ - if (isl_surf_usage_is_depth_or_stencil(info->usage)) { + if (info->samples > 1) { *image_align_el = isl_extent3d(4, 4, 1); return; } - if (info->samples > 1) { + if (isl_surf_usage_is_depth_or_stencil(info->usage) && + !ISL_DEV_USE_SEPARATE_STENCIL(dev)) { + /* interleaved depthstencil buffer */ *image_align_el = isl_extent3d(4, 4, 1); return; } - /* For everything else, 4x2 is always a valid alignment. Since this is - * also the smallest alignment we can specify, we use 4x2 for everything - * else because it uses the least memory. - */ + if (isl_surf_usage_is_depth(info->usage)) { + /* separate depth buffer */ + *image_align_el = isl_extent3d(4, 4, 1); + return; + } + + if (isl_surf_usage_is_stencil(info->usage)) { + /* separate stencil buffer */ + *image_align_el = isl_extent3d(4, 2, 1); + return; + } + *image_align_el = isl_extent3d(4, 2, 1); } |