Add Graphics::SpreadWorkload to disable graphics workloads amortization over several frames when debugging graphics perf
This commit is contained in:
@@ -22,6 +22,7 @@ bool Graphics::AllowCSMBlending = false;
|
||||
Quality Graphics::GlobalSDFQuality = Quality::High;
|
||||
Quality Graphics::GIQuality = Quality::High;
|
||||
PostProcessSettings Graphics::PostProcessSettings;
|
||||
bool Graphics::SpreadWorkload = true;
|
||||
|
||||
#if GRAPHICS_API_NULL
|
||||
extern GPUDevice* CreateGPUDeviceNull();
|
||||
|
||||
@@ -69,9 +69,22 @@ public:
|
||||
/// </summary>
|
||||
API_FIELD() static PostProcessSettings PostProcessSettings;
|
||||
|
||||
public:
|
||||
/// <summary>
|
||||
/// Debug utility to toggle graphics workloads amortization over several frames by systems such as shadows mapping, global illumination or surface atlas. Can be used to test performance in the worst-case scenario (eg. camera-cut).
|
||||
/// </summary>
|
||||
API_FIELD() static bool SpreadWorkload;
|
||||
|
||||
public:
|
||||
/// <summary>
|
||||
/// Disposes the device.
|
||||
/// </summary>
|
||||
static void DisposeDevice();
|
||||
};
|
||||
|
||||
// Skip disabling workload spreading in Release builds
|
||||
#if BUILD_RELEASE
|
||||
#define GPU_SPREAD_WORKLOAD true
|
||||
#else
|
||||
#define GPU_SPREAD_WORKLOAD Graphics::SpreadWorkload
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user