Main Page
Namespaces
Classes
Files
File List
File Members
include
Graphics
DX11
GteDX11PerformanceCounter.h
Go to the documentation of this file.
1
// David Eberly, Geometric Tools, Redmond WA 98052
2
// Copyright (c) 1998-2017
3
// Distributed under the Boost Software License, Version 1.0.
4
// http://www.boost.org/LICENSE_1_0.txt
5
// http://www.geometrictools.com/License/Boost/LICENSE_1_0.txt
6
// File Version: 3.0.0 (2016/06/19)
7
8
#pragma once
9
10
#include <
Graphics/DX11/GteDX11Include.h
>
11
12
namespace
gte
13
{
14
15
// Support for coarse-level GPU timing.
16
17
class
GTE_IMPEXP
DX11PerformanceCounter
18
{
19
public
:
20
// Construction and destruction.
21
~
DX11PerformanceCounter
();
22
DX11PerformanceCounter
(ID3D11Device* device);
23
24
// Performance measurements.
25
int64_t GetTicks()
const
;
26
double
GetSeconds()
const
;
27
28
// Get the time for the specified number of ticks.
29
double
GetSeconds(int64_t numTicks)
const
;
30
31
// Get the number of ticks for the specified time.
32
int64_t GetTicks(
double
seconds
)
const
;
33
34
// For average performance measurements.
35
void
ResetAccumulateTime();
36
void
AccumulateTime();
37
double
GetAverageSeconds()
const
;
38
unsigned
int
GetNumMeasurements()
const
;
39
40
private
:
41
// Allow the engine to access the members directly to avoid exposing
42
// internals via the public interface.
43
friend
class
DX11Engine
;
44
45
D3D11_QUERY_DATA_TIMESTAMP_DISJOINT
mTimeStamp
;
46
ID3D11Query*
mFrequencyQuery
;
47
ID3D11Query*
mStartTimeQuery
;
48
ID3D11Query*
mFinalTimeQuery
;
49
double
mFrequency,
mInvFrequency
;
50
int64_t
mStartTime
, mFinalTime;
51
double
mTotalSeconds
;
52
unsigned
int
mNumMeasurements
;
53
};
54
55
}
gte::DX11PerformanceCounter::mFrequencyQuery
ID3D11Query * mFrequencyQuery
Definition:
GteDX11PerformanceCounter.h:46
gte::DX11PerformanceCounter::mStartTimeQuery
ID3D11Query * mStartTimeQuery
Definition:
GteDX11PerformanceCounter.h:47
gte::DX11PerformanceCounter
Definition:
GteDX11PerformanceCounter.h:17
gte::DX11PerformanceCounter::mInvFrequency
double mInvFrequency
Definition:
GteDX11PerformanceCounter.h:49
gte::DX11PerformanceCounter::mNumMeasurements
unsigned int mNumMeasurements
Definition:
GteDX11PerformanceCounter.h:52
gte
Definition:
GLX/GteWICFileIO.h:16
GteDX11Include.h
seconds
GLfloat seconds
Definition:
wglext.h:657
gte::DX11PerformanceCounter::mTimeStamp
D3D11_QUERY_DATA_TIMESTAMP_DISJOINT mTimeStamp
Definition:
GteDX11PerformanceCounter.h:45
gte::DX11PerformanceCounter::mFinalTimeQuery
ID3D11Query * mFinalTimeQuery
Definition:
GteDX11PerformanceCounter.h:48
gte::DX11PerformanceCounter::mStartTime
int64_t mStartTime
Definition:
GteDX11PerformanceCounter.h:50
gte::DX11PerformanceCounter::mTotalSeconds
double mTotalSeconds
Definition:
GteDX11PerformanceCounter.h:51
gte::DX11Engine
Definition:
GteDX11Engine.h:26
GTE_IMPEXP
#define GTE_IMPEXP
Definition:
GTEngineDEF.h:63
geometric_tools_engine
Author(s): Yijiang Huang
autogenerated on Thu Jul 18 2019 03:59:59