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/D3D11/GPU_D3D11.h
Views: 1401
1
// Copyright (c) 2017- 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
#include <d3d11.h>
23
24
#include "GPU/GPUCommonHW.h"
25
#include "GPU/D3D11/DrawEngineD3D11.h"
26
#include "GPU/Common/VertexDecoderCommon.h"
27
28
class FramebufferManagerD3D11;
29
class ShaderManagerD3D11;
30
class TextureCacheD3D11;
31
32
class GPU_D3D11 : public GPUCommonHW {
33
public:
34
GPU_D3D11(GraphicsContext *gfxCtx, Draw::DrawContext *draw);
35
~GPU_D3D11();
36
37
u32 CheckGPUFeatures() const override;
38
39
void GetStats(char *buffer, size_t bufsize) override;
40
void DeviceLost() override; // Only happens on Android. Drop all textures and shaders.
41
void DeviceRestore(Draw::DrawContext *draw) override;
42
43
protected:
44
void FinishDeferred() override;
45
46
private:
47
void BeginHostFrame() override;
48
49
ID3D11Device *device_;
50
ID3D11DeviceContext *context_;
51
52
FramebufferManagerD3D11 *framebufferManagerD3D11_;
53
TextureCacheD3D11 *textureCacheD3D11_;
54
DrawEngineD3D11 drawEngine_;
55
ShaderManagerD3D11 *shaderManagerD3D11_;
56
};
57
58