Some slight unification

This commit is contained in:
Henrik Rydgård committed 2023-02-25 15:15:34 +01:00
1 parent b6846646af
commit e136ad795a
9 files changed
+19 -25

No files matched your search

-8
View File
@@ -116,14 +116,6 @@ u32 GPU_D3D11::CheckGPUFeatures() const {
return CheckGPUFeaturesLate(features);
}
// Needs to be called on GPU thread, not reporting thread.
void GPU_D3D11::BuildReportingInfo() {
using namespace Draw;
reportingPrimaryInfo_ = draw_->GetInfoString(InfoField::VENDORSTRING);
reportingFullInfo_ = reportingPrimaryInfo_ + " - " + System_GetProperty(SYSPROP_GPUDRIVER_VERSION) + " - " + draw_->GetInfoString(InfoField::SHADELANGVERSION);
}
void GPU_D3D11::DeviceLost() {
draw_->Invalidate(InvalidationFlags::CACHED_RENDER_STATE);
// Simply drop all caches and textures.
-2
View File
@@ -48,8 +48,6 @@ protected:
void FinishDeferred() override;
private:
void BuildReportingInfo() override;
void InitClear() override;
void BeginFrame() override;
-7
View File
@@ -113,13 +113,6 @@ GPU_DX9::~GPU_DX9() {
delete shaderManagerDX9_;
}
// Needs to be called on GPU thread, not reporting thread.
void GPU_DX9::BuildReportingInfo() {
using namespace Draw;
reportingPrimaryInfo_ = draw_->GetInfoString(InfoField::VENDORSTRING);
reportingFullInfo_ = reportingPrimaryInfo_ + " - " + System_GetProperty(SYSPROP_GPUDRIVER_VERSION) + " - " + draw_->GetInfoString(InfoField::SHADELANGVERSION);
}
void GPU_DX9::DeviceLost() {
// Simply drop all caches and textures.
shaderManagerDX9_->ClearCache(false);
-2
View File
@@ -50,8 +50,6 @@ protected:
void FinishDeferred() override;
private:
void BuildReportingInfo() override;
void InitClear() override;
void BeginFrame() override;
-4
View File
@@ -633,10 +633,6 @@ void GPUCommon::NotifyDisplayResized() {
displayResized_ = true;
}
void GPUCommon::ClearCacheNextFrame() {
textureCache_->ClearNextFrame();
}
// Called once per frame. Might also get called during the pause screen
// if "transparent".
void GPUCommon::CheckConfigChanged() {
+3 -1
View File
@@ -272,7 +272,7 @@ protected:
void DeviceLost() override;
void DeviceRestore() override;
void ClearCacheNextFrame() override;
void ClearCacheNextFrame() override {}
virtual void CheckRenderResized();
@@ -332,9 +332,11 @@ protected:
DrawEngineCommon *drawEngineCommon_ = nullptr;
// TODO: These should live in GPUCommonHW.
FramebufferManagerCommon *framebufferManager_ = nullptr;
TextureCacheCommon *textureCache_ = nullptr;
ShaderManagerCommon *shaderManager_ = nullptr;
bool flushOnParams_ = true;
GraphicsContext *gfxCtx_;
+13
View File
@@ -1,5 +1,6 @@
#include "Common/GPU/thin3d.h"
#include "Common/Serialize/Serializer.h"
#include "Common/System/System.h"
#include "Core/System.h"
@@ -39,3 +40,15 @@ void GPUCommonHW::DoState(PointerWrap &p) {
framebufferManager_->DestroyAllFBOs();
}
}
void GPUCommonHW::ClearCacheNextFrame() {
textureCache_->ClearNextFrame();
}
// Needs to be called on GPU thread, not reporting thread.
void GPUCommonHW::BuildReportingInfo() {
using namespace Draw;
reportingPrimaryInfo_ = draw_->GetInfoString(InfoField::VENDORSTRING);
reportingFullInfo_ = reportingPrimaryInfo_ + " - " + System_GetProperty(SYSPROP_GPUDRIVER_VERSION) + " - " + draw_->GetInfoString(InfoField::SHADELANGVERSION);
}
+3
View File
@@ -14,6 +14,9 @@ public:
protected:
void PreExecuteOp(u32 op, u32 diff);
void ClearCacheNextFrame() override;
// Needs to be called on GPU thread, not reporting thread.
void BuildReportingInfo() override;
};
-1
View File
@@ -145,7 +145,6 @@ public:
bool PerformReadbackToMemory(u32 dest, int size) override;
bool PerformWriteColorFromMemory(u32 dest, int size) override;
bool PerformWriteStencilFromMemory(u32 dest, int size, WriteStencil flags) override;
void ClearCacheNextFrame() override {}
void DeviceLost() override;
void DeviceRestore() override;