<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Apr 18, 2017 at 4:31 PM, 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 | 5 ++++-<br>
1 file changed, 4 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c<br>
index f89f351c15..09dafcbab6 100644<br>
--- a/src/intel/isl/isl.c<br>
+++ b/src/intel/isl/isl.c<br>
@@ -1573,8 +1573,11 @@ isl_surf_get_ccs_surf(const struct isl_device *dev,<br>
if (ISL_DEV_GEN(dev) <= 8 && surf->dim != ISL_SURF_DIM_2D)<br>
return false;<br>
<br>
- if (isl_format_is_compressed(<wbr>surf->format))<br>
+ if (!isl_format_supports_ccs_d(<wbr>dev->info, surf->format)) {<br>
+ /* CCS_E supported formats are a subset of CCS_D supported formats. */<br>
+ assert(!isl_format_supports_<wbr>ccs_e(dev->info, surf->format));<br></blockquote><div><br></div><div>The code we have today fails to create a CCS under *almost* the same conditions. The one case this covers but the original code does not is if you have a non-renderable format which happens to be 32, 64, or 128 bpb. One such format is R9G9B9E5. With these exotic formats, your new code will return false while the old code will go ahead and create a CCS. However, even with one of these exotic formats, you could create a view that does have a renderable format and that view could have CCS_D enabled so long as it's resolve before the non-renderable format is used for texturing. I'm not sure if that's a case we care about or not, but it is valid.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
return false;<br>
+ }<br>
<br>
/* TODO: More conditions where it can fail. */<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
2.12.2<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>