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/GLES/GPU_GLES.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 "Common/File/Path.h"
24
25
#include "GPU/GPUCommonHW.h"
26
#include "GPU/Common/TextureShaderCommon.h"
27
#include "GPU/GLES/FramebufferManagerGLES.h"
28
#include "GPU/GLES/DrawEngineGLES.h"
29
#include "GPU/GLES/FragmentTestCacheGLES.h"
30
31
class ShaderManagerGLES;
32
class TextureCacheGLES;
33
class LinkedShader;
34
35
class GPU_GLES : public GPUCommonHW {
36
public:
37
GPU_GLES(GraphicsContext *gfxCtx, Draw::DrawContext *draw);
38
~GPU_GLES();
39
40
// This gets called on startup and when we get back from settings.
41
u32 CheckGPUFeatures() const override;
42
43
void GetStats(char *buffer, size_t bufsize) override;
44
45
void DeviceLost() override; // Only happens on Android. Drop all textures and shaders.
46
void DeviceRestore(Draw::DrawContext *draw) override;
47
48
void BeginHostFrame() override;
49
void EndHostFrame() override;
50
51
protected:
52
void FinishDeferred() override;
53
54
private:
55
void BuildReportingInfo() override;
56
57
FramebufferManagerGLES *framebufferManagerGL_;
58
TextureCacheGLES *textureCacheGL_;
59
DrawEngineGLES drawEngine_;
60
FragmentTestCacheGLES fragmentTestCache_;
61
ShaderManagerGLES *shaderManagerGL_;
62
63
Path shaderCachePath_;
64
};
65
66