mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-20 01:01:40 +00:00
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:
parent
c8d7db9767
commit
b253d60f04
2 changed files with 7 additions and 13 deletions
|
@ -67,7 +67,6 @@ unsigned int Renderer::efb_scale_numeratorX = 1;
|
||||||
unsigned int Renderer::efb_scale_numeratorY = 1;
|
unsigned int Renderer::efb_scale_numeratorY = 1;
|
||||||
unsigned int Renderer::efb_scale_denominatorX = 1;
|
unsigned int Renderer::efb_scale_denominatorX = 1;
|
||||||
unsigned int Renderer::efb_scale_denominatorY = 1;
|
unsigned int Renderer::efb_scale_denominatorY = 1;
|
||||||
unsigned int Renderer::ssaa_multiplier = 1;
|
|
||||||
|
|
||||||
|
|
||||||
Renderer::Renderer()
|
Renderer::Renderer()
|
||||||
|
@ -90,7 +89,7 @@ Renderer::~Renderer()
|
||||||
// invalidate previous efb format
|
// invalidate previous efb format
|
||||||
prev_efb_format = (unsigned int)-1;
|
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 defined _WIN32 || defined HAVE_LIBAV
|
||||||
if (g_ActiveConfig.bDumpFrames && bLastFrameDumped && bAVIDumping)
|
if (g_ActiveConfig.bDumpFrames && bLastFrameDumped && bAVIDumping)
|
||||||
|
@ -130,10 +129,10 @@ int Renderer::EFBToScaledX(int x)
|
||||||
switch (g_ActiveConfig.iEFBScale)
|
switch (g_ActiveConfig.iEFBScale)
|
||||||
{
|
{
|
||||||
case SCALE_AUTO: // fractional
|
case SCALE_AUTO: // fractional
|
||||||
return (int)ssaa_multiplier * FramebufferManagerBase::ScaleToVirtualXfbWidth(x, s_backbuffer_width);
|
return FramebufferManagerBase::ScaleToVirtualXfbWidth(x, s_backbuffer_width);
|
||||||
|
|
||||||
default:
|
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)
|
switch (g_ActiveConfig.iEFBScale)
|
||||||
{
|
{
|
||||||
case SCALE_AUTO: // fractional
|
case SCALE_AUTO: // fractional
|
||||||
return (int)ssaa_multiplier * FramebufferManagerBase::ScaleToVirtualXfbHeight(y, s_backbuffer_height);
|
return FramebufferManagerBase::ScaleToVirtualXfbHeight(y, s_backbuffer_height);
|
||||||
|
|
||||||
default:
|
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
|
// 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;
|
int newEFBWidth, newEFBHeight;
|
||||||
|
|
||||||
|
@ -228,10 +227,6 @@ bool Renderer::CalculateTargetSize(unsigned int framebuffer_width, unsigned int
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
newEFBWidth *= multiplier;
|
|
||||||
newEFBHeight *= multiplier;
|
|
||||||
ssaa_multiplier = multiplier;
|
|
||||||
|
|
||||||
if (newEFBWidth != s_target_width || newEFBHeight != s_target_height)
|
if (newEFBWidth != s_target_width || newEFBHeight != s_target_height)
|
||||||
{
|
{
|
||||||
s_target_width = newEFBWidth;
|
s_target_width = newEFBWidth;
|
||||||
|
|
|
@ -118,7 +118,7 @@ public:
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
static void CalculateTargetScale(int x, int y, int &scaledX, int &scaledY);
|
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 CheckFifoRecording();
|
||||||
static void RecordVideoMemory();
|
static void RecordVideoMemory();
|
||||||
|
@ -159,7 +159,6 @@ private:
|
||||||
static unsigned int efb_scale_numeratorY;
|
static unsigned int efb_scale_numeratorY;
|
||||||
static unsigned int efb_scale_denominatorX;
|
static unsigned int efb_scale_denominatorX;
|
||||||
static unsigned int efb_scale_denominatorY;
|
static unsigned int efb_scale_denominatorY;
|
||||||
static unsigned int ssaa_multiplier;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
extern Renderer *g_renderer;
|
extern Renderer *g_renderer;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue