mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 13:30:02 +00:00
Tiny unification of code. Save the GL shader cache a bit less often.
This commit is contained in:
parent
70481c9444
commit
7a8310ae5e
@ -51,11 +51,6 @@ public:
|
||||
|
||||
void ClearShaderCache() override;
|
||||
|
||||
void GetReportingInfo(std::string &primaryInfo, std::string &fullInfo) override {
|
||||
primaryInfo = reportingPrimaryInfo_;
|
||||
fullInfo = reportingFullInfo_;
|
||||
}
|
||||
|
||||
// Using string because it's generic - makes no assumptions on the size of the shader IDs of this backend.
|
||||
std::vector<std::string> DebugGetShaderIDs(DebugShaderType shader) override;
|
||||
std::string DebugGetShaderString(std::string id, DebugShaderType shader, DebugShaderStringType stringType) override;
|
||||
@ -89,7 +84,4 @@ private:
|
||||
|
||||
int lastVsync_;
|
||||
int vertexCost_ = 0;
|
||||
|
||||
std::string reportingPrimaryInfo_;
|
||||
std::string reportingFullInfo_;
|
||||
};
|
||||
|
@ -52,11 +52,6 @@ public:
|
||||
|
||||
void ClearShaderCache() override;
|
||||
|
||||
void GetReportingInfo(std::string &primaryInfo, std::string &fullInfo) override {
|
||||
primaryInfo = reportingPrimaryInfo_;
|
||||
fullInfo = reportingFullInfo_;
|
||||
}
|
||||
|
||||
// Using string because it's generic - makes no assumptions on the size of the shader IDs of this backend.
|
||||
std::vector<std::string> DebugGetShaderIDs(DebugShaderType shader) override;
|
||||
std::string DebugGetShaderString(std::string id, DebugShaderType shader, DebugShaderStringType stringType) override;
|
||||
@ -70,7 +65,6 @@ private:
|
||||
void Flush() {
|
||||
drawEngine_.Flush();
|
||||
}
|
||||
// void ApplyDrawState(int prim);
|
||||
void CheckFlushOp(int cmd, u32 diff);
|
||||
void BuildReportingInfo();
|
||||
|
||||
@ -89,9 +83,6 @@ private:
|
||||
|
||||
int lastVsync_;
|
||||
int vertexCost_ = 0;
|
||||
|
||||
std::string reportingPrimaryInfo_;
|
||||
std::string reportingFullInfo_;
|
||||
};
|
||||
|
||||
} // namespace DX9
|
||||
|
@ -301,7 +301,6 @@ bool GPU_GLES::IsReady() {
|
||||
return shaderManagerGL_->ContinuePrecompile();
|
||||
}
|
||||
|
||||
// Needs to be called on GPU thread, not reporting thread.
|
||||
void GPU_GLES::BuildReportingInfo() {
|
||||
GLRenderManager *render = (GLRenderManager *)draw_->GetNativeObject(Draw::NativeObject::RENDER_MANAGER);
|
||||
|
||||
@ -421,7 +420,7 @@ void GPU_GLES::BeginFrame() {
|
||||
GPUCommon::BeginFrame();
|
||||
|
||||
// Save the cache from time to time. TODO: How often?
|
||||
if (!shaderCachePath_.empty() && (gpuStats.numFlips & 1023) == 0) {
|
||||
if (!shaderCachePath_.empty() && (gpuStats.numFlips & 4095) == 0) {
|
||||
shaderManagerGL_->Save(shaderCachePath_);
|
||||
}
|
||||
|
||||
|
@ -56,11 +56,6 @@ public:
|
||||
void ClearShaderCache() override;
|
||||
void CleanupBeforeUI() override;
|
||||
|
||||
void GetReportingInfo(std::string &primaryInfo, std::string &fullInfo) override {
|
||||
primaryInfo = reportingPrimaryInfo_;
|
||||
fullInfo = reportingFullInfo_;
|
||||
}
|
||||
|
||||
// Using string because it's generic - makes no assumptions on the size of the shader IDs of this backend.
|
||||
std::vector<std::string> DebugGetShaderIDs(DebugShaderType shader) override;
|
||||
std::string DebugGetShaderString(std::string id, DebugShaderType shader, DebugShaderStringType stringType) override;
|
||||
@ -92,12 +87,10 @@ private:
|
||||
FragmentTestCacheGLES fragmentTestCache_;
|
||||
ShaderManagerGLES *shaderManagerGL_;
|
||||
|
||||
std::string shaderCachePath_;
|
||||
|
||||
#ifdef _WIN32
|
||||
int lastVsync_;
|
||||
#endif
|
||||
int vertexCost_ = 0;
|
||||
|
||||
std::string reportingPrimaryInfo_;
|
||||
std::string reportingFullInfo_;
|
||||
std::string shaderCachePath_;
|
||||
};
|
||||
|
@ -247,6 +247,11 @@ public:
|
||||
|
||||
typedef void (GPUCommon::*CmdFunc)(u32 op, u32 diff);
|
||||
|
||||
void GetReportingInfo(std::string &primaryInfo, std::string &fullInfo) override {
|
||||
primaryInfo = reportingPrimaryInfo_;
|
||||
fullInfo = reportingFullInfo_;
|
||||
}
|
||||
|
||||
protected:
|
||||
void SetDrawType(DrawType type, GEPrimitiveType prim) {
|
||||
if (type != lastDraw_) {
|
||||
@ -341,6 +346,9 @@ protected:
|
||||
int immCount_ = 0;
|
||||
GEPrimitiveType immPrim_;
|
||||
|
||||
std::string reportingPrimaryInfo_;
|
||||
std::string reportingFullInfo_;
|
||||
|
||||
private:
|
||||
void FlushImm();
|
||||
// Debug stats.
|
||||
|
@ -55,11 +55,6 @@ public:
|
||||
|
||||
void ClearShaderCache() override;
|
||||
|
||||
void GetReportingInfo(std::string &primaryInfo, std::string &fullInfo) override {
|
||||
primaryInfo = reportingPrimaryInfo_;
|
||||
fullInfo = reportingFullInfo_;
|
||||
}
|
||||
|
||||
// Using string because it's generic - makes no assumptions on the size of the shader IDs of this backend.
|
||||
std::vector<std::string> DebugGetShaderIDs(DebugShaderType shader) override;
|
||||
std::string DebugGetShaderString(std::string id, DebugShaderType shader, DebugShaderStringType stringType) override;
|
||||
@ -97,9 +92,6 @@ private:
|
||||
// Manages state and pipeline objects
|
||||
PipelineManagerVulkan *pipelineManager_;
|
||||
|
||||
std::string reportingPrimaryInfo_;
|
||||
std::string reportingFullInfo_;
|
||||
|
||||
// Simple 2D drawing engine.
|
||||
Vulkan2D vulkan2D_;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user