| 52 | } |
| 53 | |
| 54 | std::string GetSummary() const |
| 55 | { |
| 56 | return fmt::format("VRAM usage: {:.1f} MB total, textures: {:.1f} MB, RT: {:.1f} MB, VB: {:.1f} MB, IB: {:.1f} MB.", |
| 57 | ToMegabytes(GetTotal()), |
| 58 | ToMegabytes(GetCategory(VRAMCategory::Texture)), |
| 59 | ToMegabytes(GetCategory(VRAMCategory::RenderTarget)), |
| 60 | ToMegabytes(GetCategory(VRAMCategory::VertexBuffer)), |
| 61 | ToMegabytes(GetCategory(VRAMCategory::IndexBuffer))); |
| 62 | } |
| 63 | |
| 64 | static int GetDXGIFormatBytesPerPixel(DXGI_FORMAT format) |
| 65 | { |
no test coverage detected