CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!
CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!
Path: blob/master/GPU/Vulkan/GPU_Vulkan.h
Views: 1401
// Copyright (c) 2015- PPSSPP Project.12// This program is free software: you can redistribute it and/or modify3// it under the terms of the GNU General Public License as published by4// the Free Software Foundation, version 2.0 or later versions.56// This program is distributed in the hope that it will be useful,7// but WITHOUT ANY WARRANTY; without even the implied warranty of8// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the9// GNU General Public License 2.0 for more details.1011// A copy of the GPL 2.0 should have been included with the program.12// If not, see http://www.gnu.org/licenses/1314// Official git repository and contact information can be found at15// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.1617#pragma once1819#include <string>20#include <vector>21#include <thread>2223#include "Common/File/Path.h"2425#include "GPU/GPUCommonHW.h"26#include "GPU/Vulkan/DrawEngineVulkan.h"27#include "GPU/Vulkan/PipelineManagerVulkan.h"28#include "GPU/Common/TextureShaderCommon.h"2930class FramebufferManagerVulkan;31class ShaderManagerVulkan;32class LinkedShader;33class TextureCacheVulkan;3435class GPU_Vulkan : public GPUCommonHW {36public:37GPU_Vulkan(GraphicsContext *gfxCtx, Draw::DrawContext *draw);38~GPU_Vulkan();3940// This gets called on startup and when we get back from settings.41u32 CheckGPUFeatures() const override;4243// These are where we can reset command buffers etc.44void BeginHostFrame() override;45void EndHostFrame() override;4647void GetStats(char *buffer, size_t bufsize) override;48void DeviceLost() override; // Only happens on Android. Drop all textures and shaders.49void DeviceRestore(Draw::DrawContext *draw) override;5051// Using string because it's generic - makes no assumptions on the size of the shader IDs of this backend.52std::vector<std::string> DebugGetShaderIDs(DebugShaderType shader) override;53std::string DebugGetShaderString(std::string id, DebugShaderType shader, DebugShaderStringType stringType) override;5455TextureCacheVulkan *GetTextureCache() {56return textureCacheVulkan_;57}5859protected:60void FinishDeferred() override;61void CheckRenderResized() override;6263private:64void BuildReportingInfo() override;6566void InitDeviceObjects();67void DestroyDeviceObjects();6869void LoadCache(const Path &filename);70void SaveCache(const Path &filename);7172FramebufferManagerVulkan *framebufferManagerVulkan_;73TextureCacheVulkan *textureCacheVulkan_;74DrawEngineVulkan drawEngine_;7576// Manages shaders and UBO data77ShaderManagerVulkan *shaderManagerVulkan_;7879// Manages state and pipeline objects80PipelineManagerVulkan *pipelineManager_;8182Path shaderCachePath_;83};848586