Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
hrydgard
GitHub Repository: hrydgard/ppsspp
Path: blob/master/Common/GPU/MiscTypes.h
3186 views
1
#pragma once
2
3
#include "Common/Common.h"
4
5
#include <functional>
6
#include <cstdint>
7
8
// Flags and structs shared between backends that haven't found a good home.
9
10
enum class InvalidationFlags {
11
CACHED_RENDER_STATE = 1,
12
};
13
ENUM_CLASS_BITOPS(InvalidationFlags);
14
15
enum class InvalidationCallbackFlags {
16
RENDER_PASS_STATE = 1,
17
COMMAND_BUFFER_STATE = 2,
18
};
19
ENUM_CLASS_BITOPS(InvalidationCallbackFlags);
20
21
typedef std::function<void(InvalidationCallbackFlags)> InvalidationCallback;
22
23
// These are separate from FrameData because we store some history of these.
24
// Also, this might be joined with more non-GPU timing information later.
25
struct FrameTimeData {
26
uint64_t frameId;
27
28
int waitCount;
29
30
double frameBegin;
31
double afterFenceWait;
32
double firstSubmit;
33
double queuePresent;
34
35
double actualPresent;
36
double desiredPresentTime;
37
double earliestPresentTime;
38
double presentMargin;
39
};
40
constexpr size_t FRAME_TIME_HISTORY_LENGTH = 32;
41
42
// Different APIs use different coordinate conventions
43
enum class CoordConvention {
44
Direct3D9,
45
Direct3D11,
46
Vulkan,
47
OpenGL,
48
};
49
50