<div dir="ltr"><div><div>Random thought:<br><br></div>Nanley and I were talking about this just now and I was complaining about how much I hate the fact that this workaround exists because we can't implement it in Vulkan.  Then I got an idea.  What would happen if we just set MOCS to zero (uncached) for ASTC 5x5 textures?  Does that make the hang go away?  How bad is the car chase performance with that compared to this series?  It's a bit of a big hammer but has the advantage of simplicity.  If it causes performance to tank on anything then then the more complex solution is probably worth it but I thought it was worth a try.<br><br></div>--Jason<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 14, 2017 at 9:39 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>
This patch series implements a needed workaround for Gen9 for ASTC5x5<br>
sampler reads. The crux of the work around is to make sure that the<br>
sampler does not read an ASTC5x5 texture and a surface with an auxilary<br>
buffer without having a texture cache invalidate and command streamer<br>
stall between such accesses.<br>
<br>
With this patch series applied to the (current) master branch of mesa,<br>
carchase works on my SKL GT4.<br>
<br>
v2:<br>
  Rename workaround functions from brw_ to gen9_<br>
  (suggested/requested by Topi Pohjolainen).<br>
<br>
  Place texture resolve to avoid using auxilary surface<br>
  when ASTC5x5 is detected in brw_predraw_resolve_inputs()<br>
  instead of another detected function; doing so allows<br>
  one to avoid walking the textures again.<br>
  (suggested/requested by Topi Pohjolainen).<br>
<br>
  Emit command streamer stall in addition to texture<br>
  invalidate.<br>
  (original short-coming caught by Jason Ekstrand)<br>
<br>
  Place workaround function in (new) dedicated file.<br>
<br>
  Minor path re-ordering to accomodate changes.<br>
<br>
Kevin Rogovin (5):<br>
  i965: define astx5x5 workaround infrastructure<br>
  i965: set ASTC5x5 workaround texture type tracking on texture validate<br>
  i965: use ASTC5x5 workaround in brw_draw<br>
  i965: use ASTC5x5 workaround in brw_compute<br>
  i965: ASTC5x5 workaround logic for blorp<br>
<br>
 src/mesa/drivers/dri/i965/<wbr>Makefile.sources       |  1 +<br>
 src/mesa/drivers/dri/i965/brw_<wbr>compute.c          |  6 ++++<br>
 src/mesa/drivers/dri/i965/brw_<wbr>context.c          |  6 ++++<br>
 src/mesa/drivers/dri/i965/brw_<wbr>context.h          | 24 ++++++++++++++++<br>
 src/mesa/drivers/dri/i965/brw_<wbr>draw.c             | 16 +++++++++--<br>
 src/mesa/drivers/dri/i965/brw_<wbr>wm_surface_state.c |  5 ++++<br>
 src/mesa/drivers/dri/i965/<wbr>gen9_astc5x5_wa.c      | 36 ++++++++++++++++++++++++<br>
 src/mesa/drivers/dri/i965/<wbr>genX_blorp_exec.c      |  5 ++++<br>
 src/mesa/drivers/dri/i965/<wbr>intel_batchbuffer.c    |  1 +<br>
 src/mesa/drivers/dri/i965/<wbr>intel_tex_image.c      | 16 ++++++++---<br>
 src/mesa/drivers/dri/i965/<wbr>intel_tex_validate.c   | 13 +++++++++<br>
 src/mesa/drivers/dri/i965/<wbr>meson.build            |  1 +<br>
 12 files changed, 124 insertions(+), 6 deletions(-)<br>
 create mode 100644 src/mesa/drivers/dri/i965/<wbr>gen9_astc5x5_wa.c<br>
<span class="HOEnZb"><font color="#888888"><br>
--<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>