<div dir="ltr">+chad<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 15, 2017 at 1:52 PM, Jason Ekstrand <span dir="ltr"><<a href="mailto:jason@jlekstrand.net" target="_blank">jason@jlekstrand.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">All combined depth stencil buffers (even those with just stencil)<br>
require a 4x4 alignment on Sandy Bridge. The only depth/stencil buffer<br>
type that requires 4x2 is separate stencil.<br>
---<br>
src/intel/isl/isl_gen6.c | 14 +++++++-------<br>
1 file changed, 7 insertions(+), 7 deletions(-)<br>
<br>
diff --git a/src/intel/isl/isl_gen6.c b/src/intel/isl/isl_gen6.c<br>
index 6da0be7..aa9f7e3 100644<br>
--- a/src/intel/isl/isl_gen6.c<br>
+++ b/src/intel/isl/isl_gen6.c<br>
@@ -117,16 +117,16 @@ isl_gen6_choose_image_<wbr>alignment_el(const struct isl_device *dev,<br>
return;<br>
}<br>
<br>
- if (isl_surf_usage_is_depth(info-<wbr>>usage)) {<br>
- /* depth buffer (possibly interleaved with stencil) */<br>
- *image_align_el = isl_extent3d(4, 4, 1);<br>
+ /* Separate stencil requires 4x2 alignment */<br>
+ if (isl_surf_usage_is_stencil(<wbr>info->usage) &&<br>
+ info->format == ISL_FORMAT_R8) {<br>
+ *image_align_el = isl_extent3d(4, 2, 1);<br>
return;<br>
}<br>
<br>
- if (isl_surf_usage_is_stencil(<wbr>info->usage)) {<br>
- /* separate stencil buffer */<br>
- assert(!isl_surf_usage_is_<wbr>depth(info->usage));<br>
- *image_align_el = isl_extent3d(4, 2, 1);<br>
+ /* Depth or combined depth stencil surfaces require 4x4 alignment */<br>
+ if (isl_surf_usage_is_depth_or_<wbr>stencil(info->usage)) {<br>
+ *image_align_el = isl_extent3d(4, 4, 1);<br>
return;<br>
}<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
2.5.0.400.gff86faf<br>
<br>
</font></span></blockquote></div><br></div>