Files
ppsspp/Common/GPU/D3D9/D3D9StateCache.cpp

64 lines
1.3 KiB
C++
Raw Permalink Normal View History

2018-03-23 03:18:13 +01:00
#ifdef _WIN32
2017-02-05 20:54:24 +01:00
#include "Common/GPU/D3D9/D3D9StateCache.h"
2013-08-17 11:23:51 +02:00
2015-09-05 19:42:58 +02:00
DirectXState dxstate;
2013-08-17 11:23:51 +02:00
LPDIRECT3DDEVICE9 pD3Ddevice9 = nullptr;
LPDIRECT3DDEVICE9EX pD3DdeviceEx9 = nullptr;
2017-02-05 20:46:26 +01:00
2015-09-05 19:42:58 +02:00
int DirectXState::state_count = 0;
2013-08-17 11:23:51 +02:00
2015-09-05 19:42:58 +02:00
void DirectXState::Initialize() {
if (initialized)
return;
2013-08-17 11:23:51 +02:00
Restore();
initialized = true;
}
2015-09-05 19:42:58 +02:00
void DirectXState::Restore() {
2013-08-17 11:23:51 +02:00
int count = 0;
2013-08-17 11:23:51 +02:00
blend.restore(); count++;
blendSeparate.restore(); count++;
2013-08-17 11:23:51 +02:00
blendEquation.restore(); count++;
blendFunc.restore(); count++;
blendColor.restore(); count++;
scissorTest.restore(); count++;
scissorRect.restore(); count++;
cullMode.restore(); count++;
shadeMode.restore(); count++;
2013-08-17 11:23:51 +02:00
depthTest.restore(); count++;
depthFunc.restore(); count++;
depthWrite.restore(); count++;
colorMask.restore(); count++;
viewport.restore(); count++;
2013-08-17 11:23:51 +02:00
alphaTest.restore(); count++;
alphaTestFunc.restore(); count++;
alphaTestRef.restore(); count++;
2013-08-17 11:23:51 +02:00
stencilTest.restore(); count++;
stencilOp.restore(); count++;
stencilFunc.restore(); count++;
stencilWriteMask.restore(); count++;
2013-08-17 11:23:51 +02:00
texMinFilter.restore(); count++;
texMagFilter.restore(); count++;
texMipFilter.restore(); count++;
texMipLodBias.restore(); count++;
texMaxMipLevel.restore(); count++;
texAddressU.restore(); count++;
texAddressV.restore(); count++;
texAddressW.restore(); count++;
2013-08-17 11:23:51 +02:00
}
#endif // _MSC_VER