<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Jun 13, 2017 at 11:41 AM, Nanley Chery <span dir="ltr"><<a href="mailto:nanleychery@gmail.com" target="_blank">nanleychery@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Signed-off-by: Nanley Chery <<a href="mailto:nanley.g.chery@intel.com">nanley.g.chery@intel.com</a>><br>
---<br>
src/intel/isl/isl.c | 9 +++++++--<br>
1 file changed, 7 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c<br>
index 860fc28b27..b593e153dc 100644<br>
--- a/src/intel/isl/isl.c<br>
+++ b/src/intel/isl/isl.c<br>
@@ -1714,14 +1714,19 @@ isl_surf_get_ccs_surf(const struct isl_device *dev,<br>
return false;<br>
}<br>
<br>
+ /* Multi-LOD and multi-layer CCS isn't supported on gen7. */<br>
+ const uint8_t levels = ISL_DEV_GEN(dev) == 7 ? 1 : surf->levels;<br>
+ const uint32_t array_len = ISL_DEV_GEN(dev) == 7 ?<br>
+ 1 : surf->logical_level0_px.array_<wbr>len;<br></blockquote><div><br></div><div>I think I have a mild preference to use "<= 7" here. That way, it's clear that layered CCS is a new feature on Broadwell and not that there's some gen7-specific thing. Yes, I know that gen6 and earlier don't have them so it doesn't matter.<br><br></div><div>--Jason<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+<br>
return isl_surf_init(dev, ccs_surf,<br>
.dim = surf->dim,<br>
.format = ccs_format,<br>
.width = surf->logical_level0_px.width,<br>
.height = surf->logical_level0_px.<wbr>height,<br>
.depth = surf->logical_level0_px.depth,<br>
- .levels = surf->levels,<br>
- .array_len = surf->logical_level0_px.array_<wbr>len,<br>
+ .levels = levels,<br>
+ .array_len = array_len,<br>
.samples = 1,<br>
.usage = ISL_SURF_USAGE_CCS_BIT,<br>
.tiling_flags = ISL_TILING_CCS_BIT);<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.13.1<br>
<br>
______________________________<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>
</font></span></blockquote></div><br></div></div>