[Mesa-dev] [PATCH] intel/isl/gen6: Fix combined depth stencil alignment
Jason Ekstrand
jason at jlekstrand.net
Tue May 16 16:54:07 UTC 2017
+chad
On Mon, May 15, 2017 at 1:52 PM, Jason Ekstrand <jason at jlekstrand.net>
wrote:
> 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.
> ---
> src/intel/isl/isl_gen6.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/src/intel/isl/isl_gen6.c b/src/intel/isl/isl_gen6.c
> index 6da0be7..aa9f7e3 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) {
> + *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;
> }
>
> --
> 2.5.0.400.gff86faf
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170516/48975adb/attachment.html>
More information about the mesa-dev
mailing list