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

@ -43,6 +43,7 @@
#include "VideoCommon/ImageWrite.h"
#include "VideoCommon/OnScreenDisplay.h"
#include "VideoCommon/PixelEngine.h"
#include "VideoCommon/PixelShaderManager.h"
#include "VideoCommon/Statistics.h"
#include "VideoCommon/VertexLoaderManager.h"
#include "VideoCommon/VertexShaderGen.h"
@ -618,6 +619,8 @@ Renderer::Renderer()
s_last_efb_scale = g_ActiveConfig.iEFBScale;
CalculateTargetSize(s_backbuffer_width, s_backbuffer_height);
PixelShaderManager::SetEfbScaleChanged();
// Because of the fixed framebuffer size we need to disable the resolution
// options while running
g_Config.bRunning = true;
@ -1681,6 +1684,8 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight, co
delete g_framebuffer_manager;
g_framebuffer_manager = new FramebufferManager(s_target_width, s_target_height,
s_MSAASamples);
PixelShaderManager::SetEfbScaleChanged();
}
}