Improve performance of MTLVertexCache

XMLWordPrintable

    • 2d
    • x86
    • os_x

      MTLVertexCache constantly creates/delete MTLBuffer objects to pass small amount of vertices. It noticeable degrades performance of AA rendering and font rendering where we operate with lot's of tiles. This logic can be replaced with just passing raw bytes to Vertex buffer.

      Here is some performance measurements with improved RenderPerfTest

      $java -Dsun.java2d.metal=true -jar dist/RenderPerfTest.jar testFlatBubblesAA testFlatQuadAA testTextBubblesGray testTextBubblesNoAA testTextBubblesLCD testWhiteTextBubblesGray testWhiteTextBubblesNoAA testWhiteTextBubblesLCD

      Without fix:

      FlatOvalAA : 2.13 FPS
      FlatQuadAA : 0.45 FPS
      TextGray : 3.44 FPS
      TextNoAA : 4.15 FPS
      TextLCD : 4.23 FPS
      WhiteTextGray : 4.19 FPS
      WhiteTextNoAA : 4.22 FPS
      WhiteTextLCD : 4.21 FPS

      With the fix applied:

      FlatOvalAA : 3.37 FPS
      FlatQuadAA : 0.85 FPS
      TextGray : 5.93 FPS
      TextNoAA : 5.83 FPS
      TextLCD : 5.94 FPS
      WhiteTextGray : 5.48 FPS
      WhiteTextNoAA : 5.80 FPS
      WhiteTextLCD : 6.07 FPS

            Assignee:
            Alexey Ushakov
            Reporter:
            Alexey Ushakov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: