<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Feb 27, 2018 at 1:30 AM,  <span dir="ltr"><<a href="mailto:kevin.rogovin@intel.com" target="_blank">kevin.rogovin@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Kevin Rogovin <<a href="mailto:kevin.rogovin@intel.com">kevin.rogovin@intel.com</a>><br>
<br>
Signed-off-by: Kevin Rogovin <<a href="mailto:kevin.rogovin@intel.com">kevin.rogovin@intel.com</a>><br>
---<br>
 src/mesa/drivers/dri/i965/<wbr>genX_blorp_exec.c |  5 +++++<br>
 src/mesa/drivers/dri/i965/<wbr>intel_tex_image.c | 16 ++++++++++++----<br>
 2 files changed, 17 insertions(+), 4 deletions(-)<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/<wbr>genX_blorp_exec.c b/src/mesa/drivers/dri/i965/<wbr>genX_blorp_exec.c<br>
index 062171a..b7c35e9 100644<br>
--- a/src/mesa/drivers/dri/i965/<wbr>genX_blorp_exec.c<br>
+++ b/src/mesa/drivers/dri/i965/<wbr>genX_blorp_exec.c<br>
@@ -230,6 +230,11 @@ genX(blorp_exec)(struct blorp_batch *batch,<br>
    struct gl_context *ctx = &brw->ctx;<br>
    bool check_aperture_failed_once = false;<br>
<br>
+   if (brw->astc5x5_wa.blorp_<wbr>sampling_from_astc5x5) {<br>
+      gen9_set_astc5x5_wa_mode(brw, BRW_ASTC5x5_WA_MODE_HAS_<wbr>ASTC5x5);<br>
+   } else {<br>
+      gen9_set_astc5x5_wa_mode(brw, BRW_ASTC5x5_WA_MODE_HAS_AUX);<br>
+   }<br>
    /* Flush the sampler and render caches.  We definitely need to flush the<br>
     * sampler cache so that we get updated contents from the render cache for<br>
     * the glBlitFramebuffer() source.  Also, we are sometimes warned in the<br>
diff --git a/src/mesa/drivers/dri/i965/<wbr>intel_tex_image.c b/src/mesa/drivers/dri/i965/<wbr>intel_tex_image.c<br>
index e25bc9a..38967fb 100644<br>
--- a/src/mesa/drivers/dri/i965/<wbr>intel_tex_image.c<br>
+++ b/src/mesa/drivers/dri/i965/<wbr>intel_tex_image.c<br>
@@ -824,10 +824,18 @@ intel_get_tex_sub_image(struct gl_context *ctx,<br>
    DBG("%s\n", __func__);<br>
<br>
    if (_mesa_is_bufferobj(ctx->Pack.<wbr>BufferObj)) {<br>
-      if (intel_gettexsubimage_blorp(<wbr>brw, texImage,<br>
-                                     xoffset, yoffset, zoffset,<br>
-                                     width, height, depth, format, type,<br>
-                                     pixels, &ctx->Pack))<br>
+      bool blorp_success;<br>
+<br>
+      brw->astc5x5_wa.blorp_<wbr>sampling_from_astc5x5 =<br>
+         (texImage->TexFormat == MESA_FORMAT_RGBA_ASTC_5x5 ||<br>
+          texImage->TexFormat == MESA_FORMAT_SRGB8_ALPHA8_ASTC_<wbr>5x5);<br>
+      blorp_success = intel_gettexsubimage_blorp(<wbr>brw, texImage,<br>
+                                                 xoffset, yoffset, zoffset,<br>
+                                                 width, height, depth,<br>
+                                                 format, type, pixels,<br>
+                                                 &ctx->Pack);<br>
+      brw->astc5x5_wa.blorp_<wbr>sampling_from_astc5x5 = false;<br>
+      if (blorp_success)<br></blockquote><div><br></div><div>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.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
          return;<br>
<br>
       perf_debug("%s: fallback to CPU mapping in PBO case\n", __func__);<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.7.4<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>