Fix issue where we were a little too aggressive when eliminating calls to SetRenderTarget

This commit is contained in:
Henrik Rydgård 2017-03-16 14:44:22 +01:00
parent 4ced81b1df
commit c0f6a24a21
4 changed files with 8 additions and 1 deletions

View file

@ -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();

View file

@ -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();

View file

@ -360,7 +360,7 @@ enum class Event {
GOT_DEVICE,
RESIZED,
PRESENT_REQUESTED,
PRESENTED,
};
struct FramebufferDesc {

View file

@ -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;
}
}