Skip to content
  • Emma Anholt's avatar
    freedreno: Cooperate with tc to stop checking the BC for resource_busy(). · 5cb043cf
    Emma Anholt authored
    The resource_busy() hook was having to check the batch cache for usage of
    the resource, since TC didn't know how long our driver would.  By
    committing to calling the tc_driver_internal_flush_notify() hook on
    non-deferred flushes, TC keeps track of which buffers have been used but
    not flushed and considers them busy, saving us needing to look in the BC
    (which we won't be able to do once we move it to being per-context).
    
    drawoverhead test results (all numbers are throughput, n=5):
    
       1, DrawElements ( 1 VBO| 0 UBO|  0    ) w/ no state change:      -4.94214% +/- 2.45047%
       7, DrawElements ( 1 VBO| 8 UBO|  8 Tex) w/ vertex attrib change: 48.3992% +/- 5.02827%
       8, DrawElements ( 1 VBO| 8 UBO|  8 Tex) w/ 1 texture change:     26.0974% +/- 1.14932%
       9, DrawElements ( 1 VBO| 8 UBO|  8 Tex) w/ 8 textures change:    12.6963% +/- 3.01077%
      17, DrawElements ( 1 VBO| 8 UBO|  8 Tex) w/ 8 UBOs change:        54.3846% +/- 35.0049%
    
    Part-of: <mesa/mesa!11513>
    5cb043cf