VideoCommon: Drop D3D9 SSAA implementation

This isn't needed for both OGL+D3D11 as they support sample shading directly. So we
could use the common MSAA util shaders instead of writing custom ones.
This commit is contained in:
degasus 2013-10-29 18:20:07 +01:00
parent c8d7db9767
commit b253d60f04
2 changed files with 7 additions and 13 deletions

View File

@ -67,7 +67,6 @@ unsigned int Renderer::efb_scale_numeratorX = 1;
unsigned int Renderer::efb_scale_numeratorY = 1;
unsigned int Renderer::efb_scale_denominatorX = 1;
unsigned int Renderer::efb_scale_denominatorY = 1;
unsigned int Renderer::ssaa_multiplier = 1;
Renderer::Renderer()
@ -90,7 +89,7 @@ Renderer::~Renderer()
// invalidate previous efb format
prev_efb_format = (unsigned int)-1;
efb_scale_numeratorX = efb_scale_numeratorY = efb_scale_denominatorX = efb_scale_denominatorY = ssaa_multiplier = 1;
efb_scale_numeratorX = efb_scale_numeratorY = efb_scale_denominatorX = efb_scale_denominatorY = 1;
#if defined _WIN32 || defined HAVE_LIBAV
if (g_ActiveConfig.bDumpFrames && bLastFrameDumped && bAVIDumping)
@ -130,10 +129,10 @@ int Renderer::EFBToScaledX(int x)
switch (g_ActiveConfig.iEFBScale)
{
case SCALE_AUTO: // fractional
return (int)ssaa_multiplier * FramebufferManagerBase::ScaleToVirtualXfbWidth(x, s_backbuffer_width);
return FramebufferManagerBase::ScaleToVirtualXfbWidth(x, s_backbuffer_width);
default:
return x * (int)ssaa_multiplier * (int)efb_scale_numeratorX / (int)efb_scale_denominatorX;
return x * (int)efb_scale_numeratorX / (int)efb_scale_denominatorX;
};
}
@ -142,10 +141,10 @@ int Renderer::EFBToScaledY(int y)
switch (g_ActiveConfig.iEFBScale)
{
case SCALE_AUTO: // fractional
return (int)ssaa_multiplier * FramebufferManagerBase::ScaleToVirtualXfbHeight(y, s_backbuffer_height);
return FramebufferManagerBase::ScaleToVirtualXfbHeight(y, s_backbuffer_height);
default:
return y * (int)ssaa_multiplier * (int)efb_scale_numeratorY / (int)efb_scale_denominatorY;
return y * (int)efb_scale_numeratorY / (int)efb_scale_denominatorY;
};
}
@ -164,7 +163,7 @@ void Renderer::CalculateTargetScale(int x, int y, int &scaledX, int &scaledY)
}
// return true if target size changed
bool Renderer::CalculateTargetSize(unsigned int framebuffer_width, unsigned int framebuffer_height, int multiplier)
bool Renderer::CalculateTargetSize(unsigned int framebuffer_width, unsigned int framebuffer_height)
{
int newEFBWidth, newEFBHeight;
@ -228,10 +227,6 @@ bool Renderer::CalculateTargetSize(unsigned int framebuffer_width, unsigned int
break;
}
newEFBWidth *= multiplier;
newEFBHeight *= multiplier;
ssaa_multiplier = multiplier;
if (newEFBWidth != s_target_width || newEFBHeight != s_target_height)
{
s_target_width = newEFBWidth;

View File

@ -118,7 +118,7 @@ public:
protected:
static void CalculateTargetScale(int x, int y, int &scaledX, int &scaledY);
static bool CalculateTargetSize(unsigned int framebuffer_width, unsigned int framebuffer_height, int multiplier = 1);
static bool CalculateTargetSize(unsigned int framebuffer_width, unsigned int framebuffer_height);
static void CheckFifoRecording();
static void RecordVideoMemory();
@ -159,7 +159,6 @@ private:
static unsigned int efb_scale_numeratorY;
static unsigned int efb_scale_denominatorX;
static unsigned int efb_scale_denominatorY;
static unsigned int ssaa_multiplier;
};
extern Renderer *g_renderer;