Make zfreeze use screenspace coordinates independant of IR.

OpenGL requires the y coordinates to be flipped.

Also refactored PixelGen code to remove duplicate code.
This commit is contained in:
Scott Mansell
2015-01-03 06:06:56 +13:00
parent 418296961c
commit 88c7afd315
8 changed files with 57 additions and 17 deletions

View File

@ -33,6 +33,7 @@
#include "VideoCommon/ImageWrite.h"
#include "VideoCommon/OnScreenDisplay.h"
#include "VideoCommon/PixelEngine.h"
#include "VideoCommon/PixelShaderManager.h"
#include "VideoCommon/Statistics.h"
#include "VideoCommon/VertexShaderManager.h"
#include "VideoCommon/VideoConfig.h"
@ -231,6 +232,7 @@ Renderer::Renderer(void *&window_handle)
s_last_stereo_mode = g_ActiveConfig.iStereoMode > 0;
s_last_xfb_mode = g_ActiveConfig.bUseRealXFB;
CalculateTargetSize(s_backbuffer_width, s_backbuffer_height);
PixelShaderManager::SetEfbScaleChanged();
SetupDeviceObjects();
@ -946,6 +948,8 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight, co
s_last_stereo_mode = g_ActiveConfig.iStereoMode > 0;
CalculateTargetSize(s_backbuffer_width, s_backbuffer_height);
PixelShaderManager::SetEfbScaleChanged();
D3D::context->OMSetRenderTargets(1, &D3D::GetBackBuffer()->GetRTV(), nullptr);
delete g_framebuffer_manager;