Skip to content

Dota2 benchmark regression #228

@kvark

Description

@kvark

Somewhere between https://gfx-rs.github.io/2018/08/10/dota2-macos-performance.html and today we regressed the benchmark significantly. We used to get 33.9 / 3.5 (in the table), but now we are closer to just 30 (in immediate mode).
Here are the things to try:

  • new swapchain model is less efficient at fullscreen? Tried with "-sw" parameter, no change.
  • Dota doesn't discover some of the features we have, it needs to support VK_KHR_portability_subset
  • on macOS 11 we aren't using some of the Metal features we are supposed to use
  • we are locking too much, and that hurts on macOS11 beta, possibly because of parking_lot regression? Tried parking_lot-0.6, no change.
  • macOS 11 beta has some strange scheduling issues. Maybe background apps interfere too much? 🥇 disabling Firefox in the background gets us from 30 to 32fps in average.
  • setting labels on internal encoders is slow - hid them behind a flag now, not sure if changed any metrics
  • ExactSizeIterator bounds are confusing the compiler and making us heap-allocate more?
  • Rust optimization regression?
  • creating and filling MTLRenderPassDescriptor is too slow - implemented a pool for reusing them in gfx-rs/gfx@bbf55ff
  • binding descriptor sets is still to slow - rewritten in gfx-rs/gfx@15e456b
  • too many redundant depth-stencil changes - fixed in gfx-rs/gfx@0d581a6
  • redundant scissor changes - fixed in gfx-rs/gfx@f0051da
  • we are doing many redundant passes - investigated, no clear picture of why that would happen
  • we are rebinding too many resources - testing a fix but it gave no performance difference. We are binding them in ranges, anyway, so Metal run-time possibly does this for us.
  • we are using mutable pixel views too often - fixed in gfx-rs/gfx@22e2f4d

Related to gfx-rs/gfx#3378, gfx-rs/gfx#3382, gfx-rs/gfx#3381, gfx-rs/gfx#3383

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions