2012-11-01 15:19:01 +00:00
|
|
|
// Copyright (c) 2012- PPSSPP Project.
|
|
|
|
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
2012-11-04 22:01:49 +00:00
|
|
|
// the Free Software Foundation, version 2.0 or later versions.
|
2012-11-01 15:19:01 +00:00
|
|
|
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License 2.0 for more details.
|
|
|
|
|
|
|
|
// A copy of the GPL 2.0 should have been included with the program.
|
|
|
|
// If not, see http://www.gnu.org/licenses/
|
|
|
|
|
|
|
|
// Official git repository and contact information can be found at
|
|
|
|
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2020-09-13 21:34:00 +00:00
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
2012-11-19 20:23:29 +00:00
|
|
|
|
2021-05-05 23:31:38 +00:00
|
|
|
#include "Common/File/Path.h"
|
|
|
|
|
2023-02-25 13:24:59 +00:00
|
|
|
#include "GPU/GPUCommonHW.h"
|
2022-08-22 10:20:21 +00:00
|
|
|
#include "GPU/Common/TextureShaderCommon.h"
|
2017-01-21 21:16:30 +00:00
|
|
|
#include "GPU/GLES/FramebufferManagerGLES.h"
|
2016-04-10 08:27:28 +00:00
|
|
|
#include "GPU/GLES/DrawEngineGLES.h"
|
2017-01-21 21:16:30 +00:00
|
|
|
#include "GPU/GLES/FragmentTestCacheGLES.h"
|
2013-08-20 20:34:47 +00:00
|
|
|
|
2017-01-21 21:16:30 +00:00
|
|
|
class ShaderManagerGLES;
|
2020-09-13 21:34:00 +00:00
|
|
|
class TextureCacheGLES;
|
2012-12-21 15:49:42 +00:00
|
|
|
class LinkedShader;
|
2012-11-01 15:19:01 +00:00
|
|
|
|
2023-02-25 13:24:59 +00:00
|
|
|
class GPU_GLES : public GPUCommonHW {
|
2012-11-01 15:19:01 +00:00
|
|
|
public:
|
2017-01-30 15:50:35 +00:00
|
|
|
GPU_GLES(GraphicsContext *gfxCtx, Draw::DrawContext *draw);
|
2016-04-10 08:21:48 +00:00
|
|
|
~GPU_GLES();
|
2015-09-05 17:58:47 +00:00
|
|
|
|
2015-09-05 19:23:58 +00:00
|
|
|
// This gets called on startup and when we get back from settings.
|
2022-09-20 08:02:15 +00:00
|
|
|
u32 CheckGPUFeatures() const override;
|
2015-09-05 17:58:47 +00:00
|
|
|
|
2016-03-31 08:17:02 +00:00
|
|
|
void GetStats(char *buffer, size_t bufsize) override;
|
2016-12-21 17:33:08 +00:00
|
|
|
|
2015-07-25 12:22:43 +00:00
|
|
|
void DeviceLost() override; // Only happens on Android. Drop all textures and shaders.
|
2023-02-25 22:04:27 +00:00
|
|
|
void DeviceRestore(Draw::DrawContext *draw) override;
|
2015-07-25 12:22:43 +00:00
|
|
|
|
2017-03-17 09:48:43 +00:00
|
|
|
void BeginHostFrame() override;
|
2017-11-19 11:25:57 +00:00
|
|
|
void EndHostFrame() override;
|
2017-03-17 09:48:43 +00:00
|
|
|
|
2013-04-28 21:23:30 +00:00
|
|
|
protected:
|
2015-03-15 01:11:00 +00:00
|
|
|
void FinishDeferred() override;
|
2013-04-28 21:23:30 +00:00
|
|
|
|
2012-11-06 16:05:27 +00:00
|
|
|
private:
|
2022-11-20 11:57:32 +00:00
|
|
|
void BuildReportingInfo() override;
|
2016-12-21 18:58:10 +00:00
|
|
|
|
2017-01-21 21:16:30 +00:00
|
|
|
FramebufferManagerGLES *framebufferManagerGL_;
|
|
|
|
TextureCacheGLES *textureCacheGL_;
|
2016-04-10 08:21:48 +00:00
|
|
|
DrawEngineGLES drawEngine_;
|
2017-01-21 21:16:30 +00:00
|
|
|
FragmentTestCacheGLES fragmentTestCache_;
|
2017-01-23 19:48:23 +00:00
|
|
|
ShaderManagerGLES *shaderManagerGL_;
|
2013-01-30 19:40:26 +00:00
|
|
|
|
2021-05-05 23:31:38 +00:00
|
|
|
Path shaderCachePath_;
|
2012-11-01 15:19:01 +00:00
|
|
|
};
|