mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Fix issue where we were a little too aggressive when eliminating calls to SetRenderTarget
This commit is contained in:
parent
4ced81b1df
commit
c0f6a24a21
4 changed files with 8 additions and 1 deletions
|
@ -136,6 +136,7 @@ void PPSSPP_UWPMain::CreateWindowSizeDependentResources() {
|
|||
// Renders the current frame according to the current application state.
|
||||
// Returns true if the frame was rendered and is ready to be displayed.
|
||||
bool PPSSPP_UWPMain::Render() {
|
||||
ctx_->GetDrawContext()->HandleEvent(Draw::Event::PRESENTED, 0, 0, nullptr, nullptr);
|
||||
NativeUpdate();
|
||||
|
||||
time_update();
|
||||
|
|
|
@ -26,6 +26,7 @@ D3D11Context::~D3D11Context() {
|
|||
|
||||
void D3D11Context::SwapBuffers() {
|
||||
swapChain_->Present(0, 0);
|
||||
draw_->HandleEvent(Draw::Event::PRESENTED, 0, 0, nullptr, nullptr);
|
||||
|
||||
// Might be a good idea.
|
||||
// context_->ClearState();
|
||||
|
|
|
@ -360,7 +360,7 @@ enum class Event {
|
|||
GOT_DEVICE,
|
||||
|
||||
RESIZED,
|
||||
PRESENT_REQUESTED,
|
||||
PRESENTED,
|
||||
};
|
||||
|
||||
struct FramebufferDesc {
|
||||
|
|
|
@ -302,6 +302,11 @@ void D3D11DrawContext::HandleEvent(Event ev, int width, int height, void *param1
|
|||
curRTHeight_ = height;
|
||||
break;
|
||||
}
|
||||
case Event::PRESENTED:
|
||||
// Make sure that we don't eliminate the next time the render target is set.
|
||||
curRenderTargetView_ = nullptr;
|
||||
curDepthStencilView_ = nullptr;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue