CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
hrydgard

CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!

GitHub Repository: hrydgard/ppsspp
Path: blob/master/Common/GPU/D3D9/D3D9StateCache.cpp
Views: 1401
1
#ifdef _WIN32
2
3
#include "Common/GPU/D3D9/D3D9StateCache.h"
4
#include <wrl/client.h>
5
6
DirectXState dxstate;
7
8
Microsoft::WRL::ComPtr<IDirect3DDevice9> pD3Ddevice9;
9
Microsoft::WRL::ComPtr<IDirect3DDevice9Ex> pD3DdeviceEx9;
10
11
int DirectXState::state_count = 0;
12
13
void DirectXState::Initialize() {
14
if (initialized)
15
return;
16
17
Restore();
18
19
initialized = true;
20
}
21
22
void DirectXState::Restore() {
23
int count = 0;
24
25
blend.restore(); count++;
26
blendSeparate.restore(); count++;
27
blendEquation.restore(); count++;
28
blendFunc.restore(); count++;
29
blendColor.restore(); count++;
30
31
scissorTest.restore(); count++;
32
scissorRect.restore(); count++;
33
34
cullMode.restore(); count++;
35
shadeMode.restore(); count++;
36
37
depthTest.restore(); count++;
38
depthFunc.restore(); count++;
39
depthWrite.restore(); count++;
40
41
colorMask.restore(); count++;
42
43
viewport.restore(); count++;
44
45
alphaTest.restore(); count++;
46
alphaTestFunc.restore(); count++;
47
alphaTestRef.restore(); count++;
48
49
stencilTest.restore(); count++;
50
stencilOp.restore(); count++;
51
stencilFunc.restore(); count++;
52
stencilWriteMask.restore(); count++;
53
54
texMinFilter.restore(); count++;
55
texMagFilter.restore(); count++;
56
texMipFilter.restore(); count++;
57
texMipLodBias.restore(); count++;
58
texMaxMipLevel.restore(); count++;
59
texAddressU.restore(); count++;
60
texAddressV.restore(); count++;
61
texAddressW.restore(); count++;
62
}
63
64
#endif // _MSC_VER
65
66