Migrate ProfilerGPU to new lightweight queries API
This commit is contained in:
@@ -7,8 +7,6 @@
|
||||
#include "Engine/Scripting/ScriptingType.h"
|
||||
#include "RenderStats.h"
|
||||
|
||||
class GPUTimerQuery;
|
||||
|
||||
#if COMPILE_WITH_PROFILER
|
||||
|
||||
// Profiler events buffers capacity (tweaked manually)
|
||||
@@ -38,7 +36,7 @@ public:
|
||||
/// <summary>
|
||||
/// The timer query used to get the exact event time on a GPU. Assigned and managed by the internal profiler layer.
|
||||
/// </summary>
|
||||
API_FIELD() GPUTimerQuery* Timer;
|
||||
API_FIELD() uint64 Query;
|
||||
|
||||
/// <summary>
|
||||
/// The rendering stats for this event. When event is active it holds the stats on event begin.
|
||||
@@ -54,6 +52,11 @@ public:
|
||||
/// The event depth. Value 0 is used for the root events.
|
||||
/// </summary>
|
||||
API_FIELD() int32 Depth;
|
||||
|
||||
/// <summary>
|
||||
/// True if event timer query is active.
|
||||
/// </summary>
|
||||
API_FIELD() bool QueryActive;
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
@@ -84,7 +87,7 @@ public:
|
||||
/// <summary>
|
||||
/// Ends all used timer queries.
|
||||
/// </summary>
|
||||
void EndAll();
|
||||
void EndAllQueries();
|
||||
|
||||
/// <summary>
|
||||
/// Tries the resolve this frame. Skips if already resolved or has no collected events.
|
||||
@@ -123,11 +126,6 @@ public:
|
||||
private:
|
||||
static int32 _depth;
|
||||
|
||||
static Array<GPUTimerQuery*> _timerQueriesPool;
|
||||
static Array<GPUTimerQuery*> _timerQueriesFree;
|
||||
|
||||
static GPUTimerQuery* GetTimerQuery();
|
||||
|
||||
public:
|
||||
/// <summary>
|
||||
/// True if GPU profiling is enabled, otherwise false to disable events collecting and GPU timer queries usage. Can be changed during rendering.
|
||||
|
||||
Reference in New Issue
Block a user