mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-22 21:09:52 +00:00
OpenGL: Fix some confusion between gpu->BeginHostFrame and gpu->BeginFrame, fixing black screen
This commit is contained in:
parent
65081da7f4
commit
33e48e9675
@ -690,7 +690,8 @@ void __DisplayFlip(int cyclesLate) {
|
||||
}
|
||||
|
||||
void hleAfterFlip(u64 userdata, int cyclesLate) {
|
||||
gpu->BeginFrame(); // doesn't really matter if begin or end of frame.
|
||||
gpu->PSPFrame();
|
||||
|
||||
PPGeNotifyFrame();
|
||||
|
||||
// This seems like as good a time as any to check if the config changed.
|
||||
|
@ -127,8 +127,8 @@ void GPU_D3D11::DeviceRestore(Draw::DrawContext *draw) {
|
||||
// Nothing needed.
|
||||
}
|
||||
|
||||
void GPU_D3D11::BeginFrame() {
|
||||
GPUCommonHW::BeginFrame();
|
||||
void GPU_D3D11::BeginHostFrame() {
|
||||
GPUCommonHW::BeginHostFrame();
|
||||
|
||||
textureCache_->StartFrame();
|
||||
drawEngine_.BeginFrame();
|
||||
|
@ -44,7 +44,7 @@ protected:
|
||||
void FinishDeferred() override;
|
||||
|
||||
private:
|
||||
void BeginFrame() override;
|
||||
void BeginHostFrame() override;
|
||||
|
||||
ID3D11Device *device_;
|
||||
ID3D11DeviceContext *context_;
|
||||
|
@ -118,11 +118,12 @@ void GPU_DX9::ReapplyGfxState() {
|
||||
GPUCommonHW::ReapplyGfxState();
|
||||
}
|
||||
|
||||
void GPU_DX9::BeginFrame() {
|
||||
void GPU_DX9::BeginHostFrame() {
|
||||
GPUCommonHW::BeginHostFrame();
|
||||
|
||||
textureCache_->StartFrame();
|
||||
drawEngine_.BeginFrame();
|
||||
|
||||
GPUCommonHW::BeginFrame();
|
||||
shaderManagerDX9_->DirtyLastShader();
|
||||
|
||||
framebufferManager_->BeginFrame();
|
||||
|
@ -46,7 +46,7 @@ protected:
|
||||
void FinishDeferred() override;
|
||||
|
||||
private:
|
||||
void BeginFrame() override;
|
||||
void BeginHostFrame() override;
|
||||
|
||||
LPDIRECT3DDEVICE9 device_;
|
||||
LPDIRECT3DDEVICE9EX deviceEx_;
|
||||
|
@ -245,23 +245,6 @@ void GPU_GLES::BeginHostFrame() {
|
||||
GPUCommonHW::BeginHostFrame();
|
||||
drawEngine_.BeginFrame();
|
||||
|
||||
if (gstate_c.useFlagsChanged) {
|
||||
// TODO: It'd be better to recompile them in the background, probably?
|
||||
// This most likely means that saw equal depth changed.
|
||||
WARN_LOG(G3D, "Shader use flags changed, clearing all shaders and depth buffers");
|
||||
shaderManager_->ClearShaders();
|
||||
framebufferManager_->ClearAllDepthBuffers();
|
||||
gstate_c.useFlagsChanged = false;
|
||||
}
|
||||
}
|
||||
|
||||
void GPU_GLES::EndHostFrame() {
|
||||
drawEngine_.EndFrame();
|
||||
}
|
||||
|
||||
void GPU_GLES::BeginFrame() {
|
||||
GPUCommonHW::BeginFrame();
|
||||
|
||||
textureCache_->StartFrame();
|
||||
|
||||
// Save the cache from time to time. TODO: How often? We save on exit, so shouldn't need to do this all that often.
|
||||
@ -276,6 +259,18 @@ void GPU_GLES::BeginFrame() {
|
||||
framebufferManager_->BeginFrame();
|
||||
|
||||
fragmentTestCache_.Decimate();
|
||||
if (gstate_c.useFlagsChanged) {
|
||||
// TODO: It'd be better to recompile them in the background, probably?
|
||||
// This most likely means that saw equal depth changed.
|
||||
WARN_LOG(G3D, "Shader use flags changed, clearing all shaders and depth buffers");
|
||||
shaderManager_->ClearShaders();
|
||||
framebufferManager_->ClearAllDepthBuffers();
|
||||
gstate_c.useFlagsChanged = false;
|
||||
}
|
||||
}
|
||||
|
||||
void GPU_GLES::EndHostFrame() {
|
||||
drawEngine_.EndFrame();
|
||||
}
|
||||
|
||||
void GPU_GLES::FinishDeferred() {
|
||||
|
@ -54,8 +54,6 @@ protected:
|
||||
private:
|
||||
void BuildReportingInfo() override;
|
||||
|
||||
void BeginFrame() override;
|
||||
|
||||
FramebufferManagerGLES *framebufferManagerGL_;
|
||||
TextureCacheGLES *textureCacheGL_;
|
||||
DrawEngineGLES drawEngine_;
|
||||
|
@ -709,7 +709,7 @@ bool GPUCommon::InterpretList(DisplayList &list) {
|
||||
return gpuState == GPUSTATE_DONE || gpuState == GPUSTATE_ERROR;
|
||||
}
|
||||
|
||||
void GPUCommon::BeginFrame() {
|
||||
void GPUCommon::PSPFrame() {
|
||||
immCount_ = 0;
|
||||
if (dumpNextFrame_) {
|
||||
NOTICE_LOG(G3D, "DUMPING THIS FRAME");
|
||||
|
@ -248,7 +248,7 @@ protected:
|
||||
}
|
||||
}
|
||||
|
||||
void BeginFrame() override;
|
||||
void PSPFrame() override;
|
||||
|
||||
virtual void CheckDepthUsage(VirtualFramebuffer *vfb) {}
|
||||
virtual void FastRunLoop(DisplayList &list) = 0;
|
||||
|
@ -501,8 +501,8 @@ void GPUCommonHW::UpdateCmdInfo() {
|
||||
}
|
||||
}
|
||||
|
||||
void GPUCommonHW::BeginFrame() {
|
||||
GPUCommon::BeginFrame();
|
||||
void GPUCommonHW::BeginHostFrame() {
|
||||
GPUCommon::BeginHostFrame();
|
||||
if (drawEngineCommon_->EverUsedExactEqualDepth() && !sawExactEqualDepth_) {
|
||||
sawExactEqualDepth_ = true;
|
||||
gstate_c.SetUseFlags(CheckGPUFeatures());
|
||||
|
@ -14,7 +14,7 @@ public:
|
||||
void DeviceLost() override;
|
||||
void DeviceRestore(Draw::DrawContext *draw) override;
|
||||
|
||||
void BeginFrame() override;
|
||||
void BeginHostFrame() override;
|
||||
|
||||
u32 CheckGPUFeatures() const override;
|
||||
|
||||
|
@ -214,7 +214,7 @@ public:
|
||||
|
||||
// Framebuffer management
|
||||
virtual void SetDisplayFramebuffer(u32 framebuf, u32 stride, GEBufferFormat format) = 0;
|
||||
virtual void BeginFrame() = 0; // Can be a good place to draw the "memory" framebuffer for accelerated plugins
|
||||
virtual void PSPFrame() = 0;
|
||||
virtual void CopyDisplayToOutput(bool reallyDirty) = 0;
|
||||
|
||||
// Tells the GPU to update the gpuStats structure.
|
||||
|
Loading…
Reference in New Issue
Block a user