diff options
author | Jason Ekstrand <jason.ekstrand@intel.com> | 2017-05-15 13:51:13 -0700 |
---|---|---|
committer | Jason Ekstrand <jason.ekstrand@intel.com> | 2017-05-16 17:04:26 -0700 |
commit | e0d6f9afba498c8d778381c1a7a87a886aa04643 (patch) | |
tree | 312d10f61e7b8c783d5be42d1c5f95798e8f7e27 | |
parent | 74d626f383078c00b7e3f42eacba419b40adb7ce (diff) |
intel/isl/gen6: Fix combined depth stencil alignment
All combined depth stencil buffers (even those with just stencil)
require a 4x4 alignment on Sandy Bridge. The only depth/stencil buffer
type that requires 4x2 is separate stencil.
Reviewed-by: Chad Versace <chadversary@chromium.org>
-rw-r--r-- | src/intel/isl/isl_gen6.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/intel/isl/isl_gen6.c b/src/intel/isl/isl_gen6.c index 6da0be7dc2..51f2100ac8 100644 --- a/src/intel/isl/isl_gen6.c +++ b/src/intel/isl/isl_gen6.c @@ -117,16 +117,16 @@ isl_gen6_choose_image_alignment_el(const struct isl_device *dev, return; } - if (isl_surf_usage_is_depth(info->usage)) { - /* depth buffer (possibly interleaved with stencil) */ - *image_align_el = isl_extent3d(4, 4, 1); + /* Separate stencil requires 4x2 alignment */ + if (isl_surf_usage_is_stencil(info->usage) && + info->format == ISL_FORMAT_R8_UINT) { + *image_align_el = isl_extent3d(4, 2, 1); return; } - if (isl_surf_usage_is_stencil(info->usage)) { - /* separate stencil buffer */ - assert(!isl_surf_usage_is_depth(info->usage)); - *image_align_el = isl_extent3d(4, 2, 1); + /* Depth or combined depth stencil surfaces require 4x4 alignment */ + if (isl_surf_usage_is_depth_or_stencil(info->usage)) { + *image_align_el = isl_extent3d(4, 4, 1); return; } |