237 :
Scope(*commandBuffer, *query) {}
#define CE_REFLECT_HASH(T)
Definition Hash.hpp:89
A retain-release type of smart pointer.
Definition SmartPtr.hpp:132
Definition GPUCommandBuffer.hpp:77
A helper class that begins a scoped occlusion query.
Definition GPUQuery.hpp:212
Scope(const GPUCommandBufferPtr &commandBuffer, GPUOcclusionQuery &query)
Definition GPUQuery.hpp:230
Scope(const GPUCommandBufferPtr &commandBuffer, const GPUOcclusionQueryPtr &query)
Creates a new scope and calls begin() on the query.
Definition GPUQuery.hpp:236
GPUCommandBuffer * mCommandBuffer
The command buffer to which commands are being recorded on.
Definition GPUQuery.hpp:215
void reset()
Unbound the pipeline from the command buffer.
Definition GPUQuery.hpp:244
Scope(GPUCommandBuffer &commandBuffer, const GPUOcclusionQueryPtr &query)
Creates a new scope and calls begin() on the query.
Definition GPUQuery.hpp:233
~Scope() noexcept
Unbound the pipeline from the command buffer.
Definition GPUQuery.hpp:240
Scope(GPUCommandBuffer &commandBuffer, GPUOcclusionQuery &query)
Creates a new scope and calls begin() on the query.
Definition GPUQuery.hpp:224
GPUOcclusionQuery * mQuery
The occlusion query to be bound within the scope.
Definition GPUQuery.hpp:218
Definition GPUQuery.hpp:178
virtual void end(GPUCommandBuffer &commandBuffer)=0
Ends the occlusion query.
virtual void begin(GPUCommandBuffer &commandBuffer)=0
Begins the occlusion query.
GPUOcclusionQuery(GPUOcclusionQuery &&)=delete
Deleted move constructor.
decltype(auto) with(GPUCommandBuffer &commandBuffer, Func &&func)
Measures the time the GPU takes to run the commands run in commandBuffer from inside the given func.
Definition GPUQuery.hpp:261
GPUOcclusionQuery(const GPUOcclusionQuery &)=delete
Deleted copy constructor.
GPUOcclusionQuery & operator=(GPUOcclusionQuery &&)=delete
GPUOcclusionQuery & operator=(const GPUOcclusionQuery &)=delete
Definition GPUQuery.hpp:21
A helper class that begins a scoped timer query.
Definition GPUQuery.hpp:104
UInt32 mTimerIndex
The index of the timer to be started.
Definition GPUQuery.hpp:113
Scope(GPUCommandBuffer &commandBuffer, GPUTimerQuery &query, const UInt32 timerIndex=0)
Creates a new scope and calls begin() on the query.
Definition GPUQuery.hpp:120
Scope(const GPUCommandBufferPtr &commandBuffer, GPUTimerQuery &query, const UInt32 timerIndex=0)
Creates a new scope and calls begin() on the query.
Definition GPUQuery.hpp:126
void reset()
Unbound the pipeline from the command buffer.
Definition GPUQuery.hpp:140
~Scope() noexcept
Unbound the pipeline from the command buffer.
Definition GPUQuery.hpp:136
Scope(GPUCommandBuffer &commandBuffer, const GPUTimerQueryPtr &query, const UInt32 timerIndex=0)
Definition GPUQuery.hpp:129
GPUTimerQuery * mQuery
The timer query to be bound within the scope.
Definition GPUQuery.hpp:110
Scope(const GPUCommandBufferPtr &commandBuffer, const GPUTimerQueryPtr &query, const UInt32 timerIndex=0)
Definition GPUQuery.hpp:132
GPUCommandBuffer * mCommandBuffer
The command buffer to which commands are being recorded on.
Definition GPUQuery.hpp:107
A GPU query that allows measuring the time a GPU device takes execute a set of commands on a command ...
Definition GPUQuery.hpp:44
GPUTimerQuery & operator=(const GPUTimerQuery &)=delete
Event< void(GPUTimerQueryResult)> didComplete
An event triggered whenever the query result becomes available.
Definition GPUQuery.hpp:59
GPUTimerQuery(GPUTimerQuery &&)=delete
Deleted move constructor.
virtual bool isComplete(UInt32 timerIndex=0) const =0
Checks if the timer query is complete and ready to get the value.
decltype(auto) with(GPUCommandBuffer &commandBuffer, Func &&func)
Measures the time the GPU takes to run the commands run in commandBuffer from inside the given func.
Definition GPUQuery.hpp:157
virtual GPUTimerQueryResult getValue(UInt32 timerIndex=0) const =0
Gets the amount of seconds the GPU took to run the commands between the begin() and the end() cals.
decltype(auto) with(GPUCommandBuffer &commandBuffer, const UInt32 timerIndex, Func &&func)
Definition GPUQuery.hpp:163
virtual void end(GPUCommandBuffer &commandBuffer, UInt32 timerIndex=0)=0
Ends the timer query.
virtual void begin(GPUCommandBuffer &commandBuffer, UInt32 timerIndex=0)=0
Begins the timer query.
GPUTimerQuery(const GPUTimerQuery &)=delete
Deleted copy constructor.
virtual void reset()=0
Resets the timer query so that it can be re-used by another command buffer.
GPUTimerQuery & operator=(GPUTimerQuery &&)=delete
virtual void wait(UInt32 timerIndex=0) const =0
Waits until the timer query is complete.
TDeviceObject(GPUDevice &device, const Descriptor &descriptor)
Initializes a new RenderAPI device object instance.
Definition Common.hpp:73
Base template for the event class.
Definition Event.hpp:27
Definition Application.hpp:19
TTimeInterval< double > TimeInterval
Represents a time interval.
Definition Chrono.hpp:32
TimeInterval GPUTimerQueryResult
The type returned by a TimerQuery.
Definition GPUQuery.hpp:26
std::uint32_t UInt32
Definition DataTypes.hpp:23
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25
Definition GPUQuery.hpp:171
static constexpr void reflect(Processor &&RTTI)
Executes the given processor for every field of the struct.
Definition GPUQuery.hpp:175
A descriptor structure for TimerQuery.
Definition GPUQuery.hpp:29
UInt32 numberOfTimers
The number of timers to be created in a single TimerQuery.
Definition GPUQuery.hpp:34
static constexpr void reflect(Processor &&RTTI)
Executes the given processor for every field of the struct.
Definition GPUQuery.hpp:39