<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Jun 15, 2017 at 12:31 AM, Michael Schellenberger Costa <span dir="ltr"><<a href="mailto:mschellenbergercosta@googlemail.com" target="_blank">mschellenbergercosta@googlemail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Jason<br>
<span class=""><br>
On 15.06.2017 03:54, Jason Ekstrand wrote:<br>
> Sky Lake and above can fast-clear exactly the same set of formats as<br>
> older hardware. The only restriction is that you can't *texture* from<br>
> it unless the format supports CCS_E but you can fast-clear and render to<br>
> it just fine. All of the code exists and now that we have sane resolves,<br>
> we can trivially turn it on.<br>
><br>
> Reviewed-by: Topi Pohjolainen <<a href="mailto:topi.pohjolainen@intel.com">topi.pohjolainen@intel.com</a>><br></span></blockquote><div><br></div><div>All,<br><br></div><div>Please disregard this patch. It's woefully incomplete. There's a lot more code that needs to be deleted before we can turn on CCS_D for sRGB on gen9.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
> ---<br>
> src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.c | 18 ++++--------------<br>
> 1 file changed, 4 insertions(+), 14 deletions(-)<br>
><br>
> diff --git a/src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.c<br>
> index 02e74ca..c19d2d5 100644<br>
> --- a/src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.c<br>
> +++ b/src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.c<br>
> @@ -207,13 +207,7 @@ intel_miptree_supports_non_<wbr>msrt_fast_clear(struct brw_context *brw,<br>
> if (!brw->format_supported_as_<wbr>render_target[mt->format])<br>
> return false;<br>
</span>Can you just do<br>
<br>
return brw->format_supported_as_<wbr>render_target[mt->format];<br>
<br>
now the second clause is gone.<br></blockquote><div><br></div><div>Sure, but this pattern of "if (...) return false;" is really nice for this sort of funciton. Converting the last one in a chain to "return thing" doesn't do anything for clarity.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="HOEnZb"><font color="#888888">Michael<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
><br>
> - if (brw->gen >= 9) {<br>
> - mesa_format linear_format = _mesa_get_srgb_format_linear(<wbr>mt->format);<br>
> - const enum isl_format isl_format =<br>
> - brw_isl_format_for_mesa_<wbr>format(linear_format);<br>
> - return isl_format_supports_ccs_e(&<wbr>brw->screen->devinfo, isl_format);<br>
> - } else<br>
> - return true;<br>
> + return true;<br>
> }<br>
><br>
> /* On Gen9 support for color buffer compression was extended to single<br>
> @@ -257,16 +251,12 @@ intel_miptree_supports_<wbr>lossless_compressed(struct brw_context *brw,<br>
> if (_mesa_get_format_datatype(mt-<wbr>>format) == GL_FLOAT)<br>
> return false;<br>
><br>
> - /* Fast clear mechanism and lossless compression go hand in hand. */<br>
> + /* Fast clear support is a pre-requisite for lossless compression */<br>
> if (!intel_miptree_supports_non_<wbr>msrt_fast_clear(brw, mt))<br>
> return false;<br>
><br>
> - /* Fast clear can be also used to clear srgb surfaces by using equivalent<br>
> - * linear format. This trick, however, can't be extended to be used with<br>
> - * lossless compression and therefore a check is needed to see if the format<br>
> - * really is linear.<br>
> - */<br>
> - return _mesa_get_srgb_format_linear(<wbr>mt->format) == mt->format;<br>
> + enum isl_format isl_format = brw_isl_format_for_mesa_<wbr>format(mt->format);<br>
> + return isl_format_supports_ccs_e(&<wbr>brw->screen->devinfo, isl_format);<br>
> }<br>
><br>
> /**<br>
<br>
</div></div></blockquote></div><br></div></div>