i965: Fix all the CCS self-dependency issues!

Submitted by Jason Ekstrand on Jan. 24, 2018, 10:03 a.m.

Details

Reviewer None
Submitted Jan. 24, 2018, 10:03 a.m.
Last Updated Jan. 24, 2018, 8:37 p.m.
Revision 2

Cover Letter(s)

Revision 1
      Yeah, right...

However, this little series does fix at least three of them and probably a
lot more.  The thing which we recently discovered is that you really need
to flush the render cache between switching aux_usage on a particular
render target.  The situation improved quite a bit with d84275b884244a2fd3
which added aux_usage to the cache tracking.  However, this wasn't quite
enough because the aux disabling in ea0d2e98ecb369ab84 didn't quite handle
everything correctly.

This little series fixes all of the issues I've seen while trolling through
the code trying to fix CCS-related hangs.  Hopefully, we'll see fewer of
them in future.

Cc: Kenneth Graunke <kenneth@whitecape.org>

Jason Ekstrand (4):
  i965/miptree: Take an aux_usage in prepare/finish_render
  i965/miptree: Add an aux_disabled parameter to render_aux_usage
  i965: Replace draw_aux_buffer_disabled with draw_aux_usage
  i965/draw: Set NEW_AUX_STATE when draw aux changes

 src/mesa/drivers/dri/i965/brw_blorp.c            | 10 +++---
 src/mesa/drivers/dri/i965/brw_compute.c          |  2 +-
 src/mesa/drivers/dri/i965/brw_context.h          | 15 ++++-----
 src/mesa/drivers/dri/i965/brw_draw.c             | 39 +++++++++++++-----------
 src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 12 +++-----
 src/mesa/drivers/dri/i965/intel_mipmap_tree.c    | 16 +++++-----
 src/mesa/drivers/dri/i965/intel_mipmap_tree.h    |  9 +++---
 7 files changed, 50 insertions(+), 53 deletions(-)
    
Revision 2
      This is a v2 of the series I sent out last night.  The primary change in
this series is the addition of patches 3 and 6.  Ken was rightly concerned
about the affect that 4 would have on compute.  However, it turns out that
the function in question was just pointless and can just be removed.  The
final patch should help improve performance in a few cases where we're
rendering to one miplevel and texturing from another.

Cc: Kenneth Graunke <kenneth@whitecape.org>

Jason Ekstrand (6):
  i965/miptree: Take an aux_usage in prepare/finish_render
  i965/miptree: Add an aux_disabled parameter to render_aux_usage
  i965/surface_state: Drop brw_aux_surface_disabled
  i965: Replace draw_aux_buffer_disabled with draw_aux_usage
  i965/draw: Set NEW_AUX_STATE when draw aux changes
  i965: Stop disabling aux during texture preparation

 src/mesa/drivers/dri/i965/brw_blorp.c            | 10 +++--
 src/mesa/drivers/dri/i965/brw_compute.c          |  2 +-
 src/mesa/drivers/dri/i965/brw_context.h          | 15 +++----
 src/mesa/drivers/dri/i965/brw_draw.c             | 51 +++++++++++++-----------
 src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 33 ++-------------
 src/mesa/drivers/dri/i965/intel_mipmap_tree.c    | 21 +++++-----
 src/mesa/drivers/dri/i965/intel_mipmap_tree.h    | 12 +++---
 7 files changed, 58 insertions(+), 86 deletions(-)
    

Revisions