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/GPU/Directx9/GPU_DX9.h
Views: 1401
1
// Copyright (c) 2012- PPSSPP Project.
2
3
// This program is free software: you can redistribute it and/or modify
4
// it under the terms of the GNU General Public License as published by
5
// the Free Software Foundation, version 2.0 or later versions.
6
7
// This program is distributed in the hope that it will be useful,
8
// but WITHOUT ANY WARRANTY; without even the implied warranty of
9
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
// GNU General Public License 2.0 for more details.
11
12
// A copy of the GPL 2.0 should have been included with the program.
13
// If not, see http://www.gnu.org/licenses/
14
15
// Official git repository and contact information can be found at
16
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
17
18
#pragma once
19
20
#include <string>
21
#include <vector>
22
23
#include "GPU/GPUCommonHW.h"
24
#include "GPU/Directx9/FramebufferManagerDX9.h"
25
#include "GPU/Directx9/DrawEngineDX9.h"
26
#include "GPU/Common/TextureShaderCommon.h"
27
#include "GPU/Common/VertexDecoderCommon.h"
28
29
class ShaderManagerDX9;
30
class LinkedShaderDX9;
31
class TextureCacheDX9;
32
33
class GPU_DX9 : public GPUCommonHW {
34
public:
35
GPU_DX9(GraphicsContext *gfxCtx, Draw::DrawContext *draw);
36
37
u32 CheckGPUFeatures() const override;
38
39
void DeviceLost() override;
40
void DeviceRestore(Draw::DrawContext *draw) override;
41
42
void ReapplyGfxState() override;
43
void GetStats(char *buffer, size_t bufsize) override;
44
45
protected:
46
void FinishDeferred() override;
47
48
private:
49
void BeginHostFrame() override;
50
51
LPDIRECT3DDEVICE9 device_;
52
LPDIRECT3DDEVICE9EX deviceEx_;
53
54
FramebufferManagerDX9 *framebufferManagerDX9_;
55
TextureCacheDX9 *textureCacheDX9_;
56
DrawEngineDX9 drawEngine_;
57
ShaderManagerDX9 *shaderManagerDX9_;
58
};
59
60