<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, May 11, 2017 at 7:03 AM, Pohjolainen, Topi <span dir="ltr"><<a href="mailto:topi.pohjolainen@gmail.com" target="_blank">topi.pohjolainen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Wed, May 10, 2017 at 02:30:31PM -0700, Jason Ekstrand wrote:<br>
> ---<br>
> src/intel/isl/isl_gen6.c | 30 ++++++++++++------------------<br>
> 1 file changed, 12 insertions(+), 18 deletions(-)<br>
><br>
> diff --git a/src/intel/isl/isl_gen6.c b/src/intel/isl/isl_gen6.c<br>
> index b746903..0de9620 100644<br>
> --- a/src/intel/isl/isl_gen6.c<br>
> +++ b/src/intel/isl/isl_gen6.c<br>
> @@ -88,6 +88,8 @@ isl_gen6_choose_image_<wbr>alignment_el(const struct isl_device *dev,<br>
> * | format | halign | valign |<br>
> * +------------------------+----<wbr>----+--------+<br>
> * | YUV 4:2:2 formats | 4 | * |<br>
> + * | BC1-5 | 4 | 4 |<br>
> + * | FXT1 | 8 | 4 |<br>
> * | uncompressed formats | 4 | * |<br>
> * +------------------------+----<wbr>----+--------+<br>
> *<br>
> @@ -110,29 +112,13 @@ isl_gen6_choose_image_<wbr>alignment_el(const struct isl_device *dev,<br>
> */<br>
><br>
> if (isl_format_is_compressed(<wbr>info->format)) {<br>
> + /* Compressed formats have an alignment equal to their block size */<br>
> *image_align_el = isl_extent3d(1, 1, 1);<br>
> return;<br>
> }<br>
><br>
> - if (isl_format_is_yuv(info-><wbr>format)) {<br>
> - *image_align_el = isl_extent3d(4, 2, 1);<br>
> - return;<br>
> - }<br>
> -<br>
> - if (info->samples > 1) {<br>
> - *image_align_el = isl_extent3d(4, 4, 1);<br>
> - return;<br>
> - }<br>
> -<br>
> - if (isl_surf_usage_is_depth_or_<wbr>stencil(info->usage) &&<br>
> - !ISL_DEV_USE_SEPARATE_STENCIL(<wbr>dev)) {<br>
<br>
</div></div>Maybe mention in the commit that we drop this as it is always false on gen6+?<br>
In isl.c: "dev->use_separate_stencil = ISL_DEV_GEN(dev) >= 6;"<br></blockquote><div><br></div><div>No, I dropped it not because we always use separate stencil but because it's redundant with the regular depth case. The PRM says to use a 4x4 alignment for all depth buffers but 4x2 for separate stencil. Combined depth-stencil falls under the "depth" case so I didn't think we needed to call it out explicitly.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Other than that:<br>
<br>
Reviewed-by: Topi Pohjolainen <<a href="mailto:topi.pohjolainen@intel.com">topi.pohjolainen@intel.com</a>><br>
<span class=""><br>
> - /* interleaved depthstencil buffer */<br>
> - *image_align_el = isl_extent3d(4, 4, 1);<br>
> - return;<br>
> - }<br>
> -<br>
> if (isl_surf_usage_is_depth(info-<wbr>>usage)) {<br>
> - /* separate depth buffer */<br>
> + /* depth buffer (possibly interleaved with stencil) */<br>
> *image_align_el = isl_extent3d(4, 4, 1);<br>
> return;<br>
> }<br>
> @@ -143,5 +129,13 @@ isl_gen6_choose_image_<wbr>alignment_el(const struct isl_device *dev,<br>
> return;<br>
> }<br>
><br>
> + if (info->samples > 1) {<br>
> + *image_align_el = isl_extent3d(4, 4, 1);<br>
> + return;<br>
> + }<br>
> +<br>
> + /* For everything else, we can chose any vertical alignment we want. We<br>
> + * choose an alignment of 2 because it uses the least memory.<br>
> + */<br>
> *image_align_el = isl_extent3d(4, 2, 1);<br>
> }<br>
> --<br>
> 2.5.0.400.gff86faf<br>
><br>
</span>> ______________________________<wbr>_________________<br>
> mesa-dev mailing list<br>
> <a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
> <a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</blockquote></div><br></div></div>