mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-25 15:19:42 -06:00
Add new GUI option to skip XFBToRam and remove old XFB options
This commit is contained in:
@ -40,15 +40,6 @@ FramebufferManagerBase::~FramebufferManagerBase()
|
||||
void FramebufferManagerBase::CopyToXFB(u32 xfbAddr, u32 fbStride, u32 fbHeight,
|
||||
const EFBRectangle& sourceRc, float Gamma)
|
||||
{
|
||||
if (g_ActiveConfig.bUseRealXFB)
|
||||
{
|
||||
if (g_framebuffer_manager)
|
||||
g_framebuffer_manager->CopyToRealXFB(xfbAddr, fbStride, fbHeight, sourceRc, Gamma);
|
||||
}
|
||||
else
|
||||
{
|
||||
CopyToVirtualXFB(xfbAddr, fbStride, fbHeight, sourceRc, Gamma);
|
||||
}
|
||||
}
|
||||
|
||||
void FramebufferManagerBase::CopyToVirtualXFB(u32 xfbAddr, u32 fbStride, u32 fbHeight,
|
||||
|
@ -49,7 +49,7 @@ void VideoBackendBase::Video_ExitLoop()
|
||||
void VideoBackendBase::Video_BeginField(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight,
|
||||
u64 ticks)
|
||||
{
|
||||
if (m_initialized && g_ActiveConfig.bUseXFB && g_renderer)
|
||||
if (m_initialized && g_renderer)
|
||||
{
|
||||
Fifo::SyncGPU(Fifo::SyncGPUReason::Swap);
|
||||
|
||||
|
@ -327,6 +327,7 @@ void Renderer::DrawDebugText()
|
||||
}
|
||||
|
||||
const char* const efbcopy_text = g_ActiveConfig.bSkipEFBCopyToRam ? "to Texture" : "to RAM";
|
||||
const char* const xfbcopy_text = g_ActiveConfig.bSkipXFBCopyToRam ? "to Texture" : "to RAM";
|
||||
|
||||
// The rows
|
||||
const std::string lines[] = {
|
||||
@ -338,6 +339,7 @@ void Renderer::DrawDebugText()
|
||||
"Speed Limit: Unlimited" :
|
||||
StringFromFormat("Speed Limit: %li%%",
|
||||
std::lround(SConfig::GetInstance().m_EmulationSpeed * 100.f)),
|
||||
std::string("Copy XFB: ") + xfbcopy_text,
|
||||
};
|
||||
|
||||
enum
|
||||
@ -688,8 +690,7 @@ void Renderer::Swap(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight, const
|
||||
// New frame
|
||||
stats.ResetFrame();
|
||||
|
||||
Core::Callback_VideoCopiedToXFB(m_xfb_written ||
|
||||
(g_ActiveConfig.bUseXFB && g_ActiveConfig.bUseRealXFB));
|
||||
Core::Callback_VideoCopiedToXFB(m_xfb_written || !g_ActiveConfig.bSkipXFBCopyToRam);
|
||||
m_xfb_written = false;
|
||||
}
|
||||
|
||||
|
@ -1416,7 +1416,7 @@ void TextureCacheBase::CopyRenderTargetToTexture(u32 dstAddr, EFBCopyFormat dstF
|
||||
ColorMask[3] = 0.0f;
|
||||
fConstAdd[3] = 1.0f;
|
||||
cbufid = 30; // just re-use the RGBX8 cbufid from above
|
||||
copy_to_ram = g_ActiveConfig.bUseRealXFB;
|
||||
copy_to_ram = !g_ActiveConfig.bSkipXFBCopyToRam;
|
||||
is_xfb_copy = true;
|
||||
break;
|
||||
|
||||
|
@ -67,8 +67,6 @@ void VideoConfig::Refresh()
|
||||
else
|
||||
iAspectRatio = aspect_ratio;
|
||||
bCrop = Config::Get(Config::GFX_CROP);
|
||||
bUseXFB = Config::Get(Config::GFX_USE_XFB);
|
||||
bUseRealXFB = Config::Get(Config::GFX_USE_REAL_XFB);
|
||||
iSafeTextureCache_ColorSamples = Config::Get(Config::GFX_SAFE_TEXTURE_CACHE_COLOR_SAMPLES);
|
||||
bShowFPS = Config::Get(Config::GFX_SHOW_FPS);
|
||||
bShowNetPlayPing = Config::Get(Config::GFX_SHOW_NETPLAY_PING);
|
||||
@ -138,6 +136,7 @@ void VideoConfig::Refresh()
|
||||
Config::Get(Config::GFX_HACK_BBOX_PREFER_STENCIL_IMPLEMENTATION);
|
||||
bForceProgressive = Config::Get(Config::GFX_HACK_FORCE_PROGRESSIVE);
|
||||
bSkipEFBCopyToRam = Config::Get(Config::GFX_HACK_SKIP_EFB_COPY_TO_RAM);
|
||||
bSkipXFBCopyToRam = Config::Get(Config::GFX_HACK_SKIP_XFB_COPY_TO_RAM);
|
||||
bCopyEFBScaled = Config::Get(Config::GFX_HACK_COPY_EFB_ENABLED);
|
||||
bEFBEmulateFormatChanges = Config::Get(Config::GFX_HACK_EFB_EMULATE_FORMAT_CHANGES);
|
||||
bVertexRounding = Config::Get(Config::GFX_HACK_VERTEX_ROUDING);
|
||||
@ -171,13 +170,6 @@ void VideoConfig::VerifyValidity()
|
||||
10000);
|
||||
iStereoMode = 0;
|
||||
}
|
||||
|
||||
if (bUseXFB && bUseRealXFB)
|
||||
{
|
||||
OSD::AddMessage("Stereoscopic 3D isn't supported with Real XFB, turning off stereoscopy.",
|
||||
10000);
|
||||
iStereoMode = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -65,8 +65,6 @@ struct VideoConfig final
|
||||
bool bWidescreenHack;
|
||||
int iAspectRatio;
|
||||
bool bCrop; // Aspect ratio controls.
|
||||
bool bUseXFB;
|
||||
bool bUseRealXFB;
|
||||
bool bShaderCache;
|
||||
|
||||
// Enhancements
|
||||
@ -119,6 +117,7 @@ struct VideoConfig final
|
||||
|
||||
bool bEFBEmulateFormatChanges;
|
||||
bool bSkipEFBCopyToRam;
|
||||
bool bSkipXFBCopyToRam;
|
||||
bool bCopyEFBScaled;
|
||||
int iSafeTextureCache_ColorSamples;
|
||||
ProjectionHackConfig phack;
|
||||
@ -229,8 +228,6 @@ struct VideoConfig final
|
||||
} backend_info;
|
||||
|
||||
// Utility
|
||||
bool RealXFBEnabled() const { return bUseXFB && bUseRealXFB; }
|
||||
bool VirtualXFBEnabled() const { return bUseXFB && !bUseRealXFB; }
|
||||
bool MultisamplingEnabled() const { return iMultisamples > 1; }
|
||||
bool ExclusiveFullscreenEnabled() const
|
||||
{
|
||||
|
Reference in New Issue
Block a user