Blowbox 2017
A 3D Game Engine by Riko Ophorst using DirectX 12
|
#include <memory_profiler.h>
Classes | |
struct | CompareGpuResourceByDimension |
struct | CompareGpuResourceByDimensionReverted |
struct | CompareGpuResourceByFormat |
struct | CompareGpuResourceByFormatReverted |
struct | CompareGpuResourceByName |
struct | CompareGpuResourceByNameReverted |
struct | CompareGpuResourceBySize |
struct | CompareGpuResourceBySizeReverted |
struct | ResourceData |
Public Member Functions | |
void | RenderMenu () override |
void | RenderWindow () override |
void | NewFrame () |
void | Shutdown () |
Protected Types | |
enum | ResourceSortType { ResourceSortType_NAME, ResourceSortType_NAME_REVERTED, ResourceSortType_SIZE, ResourceSortType_SIZE_REVERTED, ResourceSortType_DIMENSION, ResourceSortType_DIMENSION_REVERTED, ResourceSortType_FORMAT, ResourceSortType_FORMAT_REVERTED } |
Protected Member Functions | |
void | AddGpuResource (GpuResource *gpu_resource) |
void | RemoveGpuResource (GpuResource *gpu_resource) |
void | Condense (bool force=false) |
void | Uncondense () |
String | ConvertDimensionToString (D3D12_RESOURCE_DIMENSION dimension) |
String | ConvertFormatToString (DXGI_FORMAT format) |
Private Attributes | |
bool | has_shutdown_ |
bool | show_window_ |
bool | condense_ |
bool | is_condensed_ |
Vector< GpuResource * > | unsorted_gpu_resources_ |
Map< WString, ResourceData > | gpu_resources_map_ |
Vector< ResourceData > | sorted_gpu_resources_ |
ImGuiTextFilter | filter_ |
ResourceSortType | sort_type_ |
Friends | |
class | GpuResource |
Provides memory profiling statistics.
The MemoryProfiler is a debug functionality that allows you to gain insights into how VRAM is being utilized by the application.
|
protected |
The different sorting types in which resources can be sorted in the MemoryProfiler.
|
protected |
Adds a GpuResource to the memory profiler.
|
protected |
Condenses all GpuResources in the MemoryProfiler into single entries.
[in] | force | Whether the condense operation should be forced. By default, it is off - because it only needs to condense if anything changed. |
|
protected |
Converts a D3D12_RESOURCE_DIMENSION to a readable string.
[in] | dimension | The dimension to be converted. |
|
protected |
Converts a DXGI_FORMAT to a readable string.
[in] | format | The format to be converted. |
void blowbox::MemoryProfiler::NewFrame | ( | ) |
Starts a new profiling frame.
|
protected |
Removes a GpuResource from the memory profiler.
|
overridevirtual |
Renders the menu for the Profiler.
Implements blowbox::DebugWindow.
|
overridevirtual |
Renders the actual window for the Profiler.
Implements blowbox::DebugWindow.
void blowbox::MemoryProfiler::Shutdown | ( | ) |
Shuts down the profiler.
|
protected |
Uncondenses all the GpuResources in the MemoryProfiler.
|
private |
Whether the different GpuResources in the MemoryProfiler should be condensed or not.
|
private |
A text filter that is used to filter out ResourceDatas by name from the sorted_gpu_resources_ array.
|
private |
A map of resource names to ResourceData objects. This map is used to store both the condensed and uncondensed resource data.
|
private |
Whether the memory profiler has shutdown.
|
private |
Whether the different GpuResources in the MemoryProfiler are condensed.
|
private |
Whether the memory profiler window should be shown.
|
private |
The sorting type that is used to sort the gpu resources in the sorted_gpu_resources_ array.
|
private |
A sorted array of ResourceDatas, based on the gpu_resources_map_. Used by the ImGui MemoryProfiler window to display the ResourceData in the correct order.
|
private |
An unsorted array of GpuResources. New entries are added to this array.