[Mesa-dev] [PATCH v3 7/7] i965: ASTC5x5 workaround logic for blorp

Jason Ekstrand jason at jlekstrand.net
Tue Mar 6 16:06:54 UTC 2018


On Tue, Feb 27, 2018 at 1:30 AM, <kevin.rogovin at intel.com> wrote:

> From: Kevin Rogovin <kevin.rogovin at intel.com>
>
> Signed-off-by: Kevin Rogovin <kevin.rogovin at intel.com>
> ---
>  src/mesa/drivers/dri/i965/genX_blorp_exec.c |  5 +++++
>  src/mesa/drivers/dri/i965/intel_tex_image.c | 16 ++++++++++++----
>  2 files changed, 17 insertions(+), 4 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/genX_blorp_exec.c
> b/src/mesa/drivers/dri/i965/genX_blorp_exec.c
> index 062171a..b7c35e9 100644
> --- a/src/mesa/drivers/dri/i965/genX_blorp_exec.c
> +++ b/src/mesa/drivers/dri/i965/genX_blorp_exec.c
> @@ -230,6 +230,11 @@ genX(blorp_exec)(struct blorp_batch *batch,
>     struct gl_context *ctx = &brw->ctx;
>     bool check_aperture_failed_once = false;
>
> +   if (brw->astc5x5_wa.blorp_sampling_from_astc5x5) {
> +      gen9_set_astc5x5_wa_mode(brw, BRW_ASTC5x5_WA_MODE_HAS_ASTC5x5);
> +   } else {
> +      gen9_set_astc5x5_wa_mode(brw, BRW_ASTC5x5_WA_MODE_HAS_AUX);
> +   }
>     /* Flush the sampler and render caches.  We definitely need to flush
> the
>      * sampler cache so that we get updated contents from the render cache
> for
>      * the glBlitFramebuffer() source.  Also, we are sometimes warned in
> the
> diff --git a/src/mesa/drivers/dri/i965/intel_tex_image.c
> b/src/mesa/drivers/dri/i965/intel_tex_image.c
> index e25bc9a..38967fb 100644
> --- a/src/mesa/drivers/dri/i965/intel_tex_image.c
> +++ b/src/mesa/drivers/dri/i965/intel_tex_image.c
> @@ -824,10 +824,18 @@ intel_get_tex_sub_image(struct gl_context *ctx,
>     DBG("%s\n", __func__);
>
>     if (_mesa_is_bufferobj(ctx->Pack.BufferObj)) {
> -      if (intel_gettexsubimage_blorp(brw, texImage,
> -                                     xoffset, yoffset, zoffset,
> -                                     width, height, depth, format, type,
> -                                     pixels, &ctx->Pack))
> +      bool blorp_success;
> +
> +      brw->astc5x5_wa.blorp_sampling_from_astc5x5 =
> +         (texImage->TexFormat == MESA_FORMAT_RGBA_ASTC_5x5 ||
> +          texImage->TexFormat == MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x5);
> +      blorp_success = intel_gettexsubimage_blorp(brw, texImage,
> +                                                 xoffset, yoffset,
> zoffset,
> +                                                 width, height, depth,
> +                                                 format, type, pixels,
> +                                                 &ctx->Pack);
> +      brw->astc5x5_wa.blorp_sampling_from_astc5x5 = false;
> +      if (blorp_success)
>

Let's keep all of the code for detecting whether or not BLORP needs and
implementing it together in BLORP.  We can just as easily detect ASTC5x5
there as here.


>           return;
>
>        perf_debug("%s: fallback to CPU mapping in PBO case\n", __func__);
> --
> 2.7.4
>
> _______________________________________________
> 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/20180306/11e9dce9/attachment.html>


More information about the mesa-dev mailing list