mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
VideoCommon: move ViewportCorrection into VideoCommon
D3D doesn't allow bigger viewports than rendertargets. But flipper does, so the viewport will be clipped and the transformation matrix will be changed. This was done in the D3D backend itself. This is now moved into VideoCommon. This don't reduce code, but in this way, VideoCommon doesn't depend on the backends.
This commit is contained in:
@ -1093,7 +1093,7 @@ u32 Renderer::AccessEFB(EFBAccessType type, u32 x, u32 y, u32 poke_data)
|
||||
}
|
||||
|
||||
// Called from VertexShaderManager
|
||||
void Renderer::UpdateViewport(Matrix44& vpCorrection)
|
||||
void Renderer::UpdateViewport()
|
||||
{
|
||||
// reversed gxsetviewport(xorig, yorig, width, height, nearz, farz)
|
||||
// [0] = width/2
|
||||
@ -1124,9 +1124,6 @@ void Renderer::UpdateViewport(Matrix44& vpCorrection)
|
||||
Height *= -1;
|
||||
}
|
||||
|
||||
// OpenGL does not require any viewport correct
|
||||
Matrix44::LoadIdentity(vpCorrection);
|
||||
|
||||
// Update the view port
|
||||
if(g_ogl_config.bSupportViewportFloat)
|
||||
{
|
||||
|
@ -78,7 +78,7 @@ public:
|
||||
|
||||
void ReinterpretPixelData(unsigned int convtype);
|
||||
|
||||
void UpdateViewport(Matrix44& vpCorrection);
|
||||
void UpdateViewport();
|
||||
|
||||
bool SaveScreenshot(const std::string &filename, const TargetRectangle &rc);
|
||||
|
||||
|
@ -146,6 +146,7 @@ void InitBackendInfo()
|
||||
g_Config.backend_info.bSupportsFormatReinterpretation = true;
|
||||
g_Config.backend_info.bSupportsPixelLighting = true;
|
||||
//g_Config.backend_info.bSupportsEarlyZ = true; // is gpu dependent and must be set in renderer
|
||||
g_Config.backend_info.bSupportsOversizedViewports = true;
|
||||
|
||||
// aamodes
|
||||
const char* caamodes[] = {_trans("None"), "2x", "4x", "8x", "8x CSAA", "8xQ CSAA", "16x CSAA", "16xQ CSAA", "4x SSAA"};
|
||||
|
Reference in New Issue
Block a user