[Mesa-dev] [PATCH 07/14] i965/meta_util: Re-enable sRGB-encoded fast-clears on CNL

Jason Ekstrand jason at jlekstrand.net
Tue Apr 3 22:31:36 UTC 2018


2-7 are

Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>

On Fri, Mar 30, 2018 at 11:12 AM, Nanley Chery <nanleychery at gmail.com>
wrote:

> The paths which sample with the clear color are now using a getter which
> performs the sRGB decode needed to enable this fast clear.
>
> This path can be exercised by fast-clearing a texture, then performing
> an operation which requires sRGB decoding. Test coverage for this
> feature is provided with the following tests:
>
> * Shader texture calls:
>   - spec at ext_texture_srgb@tex-srgb
>
> * Shader texelfetch calls:
>   - spec at arb_framebuffer_srgb@fbo-fast-clear
>   - spec at arb_framebuffer_srgb@msaa-fast-clear
>
> * Blending:
>   - spec at arb_framebuffer_srgb@arb_framebuffer_srgb-fast-clear-blend
>
> * Blitting:
>   - spec at arb_framebuffer_srgb@blit texture srgb msaa enabled clear
> ---
>  src/mesa/drivers/dri/i965/brw_meta_util.c | 11 -----------
>  1 file changed, 11 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_meta_util.c
> b/src/mesa/drivers/dri/i965/brw_meta_util.c
> index b31181521c7..d292f5a8e24 100644
> --- a/src/mesa/drivers/dri/i965/brw_meta_util.c
> +++ b/src/mesa/drivers/dri/i965/brw_meta_util.c
> @@ -293,18 +293,7 @@ brw_is_color_fast_clear_compatible(struct
> brw_context *brw,
>         brw->mesa_to_isl_render_format[mt->format])
>        return false;
>
> -   const bool srgb_rb = _mesa_get_srgb_format_linear(mt->format) !=
> mt->format;
> -  /* Gen10 doesn't automatically decode the clear color of sRGB buffers.
> Since
> -   * we currently don't perform this decode in software, avoid a
> fast-clear
> -   * altogether. TODO: Do this in software.
> -   */
>     const mesa_format format = _mesa_get_render_format(ctx, mt->format);
> -   if (devinfo->gen >= 10 && srgb_rb) {
> -      perf_debug("sRGB fast clear not enabled for (%s)",
> -                 _mesa_get_format_name(format));
> -      return false;
> -   }
> -
>     if (_mesa_is_format_integer_color(format)) {
>        if (devinfo->gen >= 8) {
>           perf_debug("Integer fast clear not enabled for (%s)",
> --
> 2.16.2
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180403/8f02f5ac/attachment.html>


More information about the mesa-dev mailing list