Add new GUI option to skip XFBToRam and remove old XFB options
This commit is contained in:
parent
198d3b69b4
commit
65cd085f9b
|
@ -219,13 +219,12 @@ void DolphinAnalytics::MakePerGameBuilder()
|
||||||
builder.AddData("cfg-gfx-multisamples", g_Config.iMultisamples);
|
builder.AddData("cfg-gfx-multisamples", g_Config.iMultisamples);
|
||||||
builder.AddData("cfg-gfx-ssaa", g_Config.bSSAA);
|
builder.AddData("cfg-gfx-ssaa", g_Config.bSSAA);
|
||||||
builder.AddData("cfg-gfx-anisotropy", g_Config.iMaxAnisotropy);
|
builder.AddData("cfg-gfx-anisotropy", g_Config.iMaxAnisotropy);
|
||||||
builder.AddData("cfg-gfx-realxfb", g_Config.RealXFBEnabled());
|
|
||||||
builder.AddData("cfg-gfx-virtualxfb", g_Config.VirtualXFBEnabled());
|
|
||||||
builder.AddData("cfg-gfx-vsync", g_Config.bVSync);
|
builder.AddData("cfg-gfx-vsync", g_Config.bVSync);
|
||||||
builder.AddData("cfg-gfx-aspect-ratio", g_Config.iAspectRatio);
|
builder.AddData("cfg-gfx-aspect-ratio", g_Config.iAspectRatio);
|
||||||
builder.AddData("cfg-gfx-efb-access", g_Config.bEFBAccessEnable);
|
builder.AddData("cfg-gfx-efb-access", g_Config.bEFBAccessEnable);
|
||||||
builder.AddData("cfg-gfx-efb-copy-format-changes", g_Config.bEFBEmulateFormatChanges);
|
builder.AddData("cfg-gfx-efb-copy-format-changes", g_Config.bEFBEmulateFormatChanges);
|
||||||
builder.AddData("cfg-gfx-efb-copy-ram", !g_Config.bSkipEFBCopyToRam);
|
builder.AddData("cfg-gfx-efb-copy-ram", !g_Config.bSkipEFBCopyToRam);
|
||||||
|
builder.AddData("cfg-gfx-xfb-copy-ram", !g_Config.bSkipXFBCopyToRam);
|
||||||
builder.AddData("cfg-gfx-efb-copy-scaled", g_Config.bCopyEFBScaled);
|
builder.AddData("cfg-gfx-efb-copy-scaled", g_Config.bCopyEFBScaled);
|
||||||
builder.AddData("cfg-gfx-internal-resolution", g_Config.iEFBScale);
|
builder.AddData("cfg-gfx-internal-resolution", g_Config.iEFBScale);
|
||||||
builder.AddData("cfg-gfx-tc-samples", g_Config.iSafeTextureCache_ColorSamples);
|
builder.AddData("cfg-gfx-tc-samples", g_Config.iSafeTextureCache_ColorSamples);
|
||||||
|
|
|
@ -26,8 +26,6 @@ const ConfigInfo<int> GFX_ASPECT_RATIO{{System::GFX, "Settings", "AspectRatio"},
|
||||||
const ConfigInfo<int> GFX_SUGGESTED_ASPECT_RATIO{{System::GFX, "Settings", "SuggestedAspectRatio"},
|
const ConfigInfo<int> GFX_SUGGESTED_ASPECT_RATIO{{System::GFX, "Settings", "SuggestedAspectRatio"},
|
||||||
static_cast<int>(ASPECT_AUTO)};
|
static_cast<int>(ASPECT_AUTO)};
|
||||||
const ConfigInfo<bool> GFX_CROP{{System::GFX, "Settings", "Crop"}, false};
|
const ConfigInfo<bool> GFX_CROP{{System::GFX, "Settings", "Crop"}, false};
|
||||||
const ConfigInfo<bool> GFX_USE_XFB{{System::GFX, "Settings", "UseXFB"}, false};
|
|
||||||
const ConfigInfo<bool> GFX_USE_REAL_XFB{{System::GFX, "Settings", "UseRealXFB"}, false};
|
|
||||||
const ConfigInfo<int> GFX_SAFE_TEXTURE_CACHE_COLOR_SAMPLES{
|
const ConfigInfo<int> GFX_SAFE_TEXTURE_CACHE_COLOR_SAMPLES{
|
||||||
{System::GFX, "Settings", "SafeTextureCacheColorSamples"}, 128};
|
{System::GFX, "Settings", "SafeTextureCacheColorSamples"}, 128};
|
||||||
const ConfigInfo<bool> GFX_SHOW_FPS{{System::GFX, "Settings", "ShowFPS"}, false};
|
const ConfigInfo<bool> GFX_SHOW_FPS{{System::GFX, "Settings", "ShowFPS"}, false};
|
||||||
|
@ -133,6 +131,8 @@ const ConfigInfo<bool> GFX_HACK_BBOX_PREFER_STENCIL_IMPLEMENTATION{
|
||||||
const ConfigInfo<bool> GFX_HACK_FORCE_PROGRESSIVE{{System::GFX, "Hacks", "ForceProgressive"}, true};
|
const ConfigInfo<bool> GFX_HACK_FORCE_PROGRESSIVE{{System::GFX, "Hacks", "ForceProgressive"}, true};
|
||||||
const ConfigInfo<bool> GFX_HACK_SKIP_EFB_COPY_TO_RAM{{System::GFX, "Hacks", "EFBToTextureEnable"},
|
const ConfigInfo<bool> GFX_HACK_SKIP_EFB_COPY_TO_RAM{{System::GFX, "Hacks", "EFBToTextureEnable"},
|
||||||
true};
|
true};
|
||||||
|
const ConfigInfo<bool> GFX_HACK_SKIP_XFB_COPY_TO_RAM{{System::GFX, "Hacks", "XFBToTextureEnable"},
|
||||||
|
true};
|
||||||
const ConfigInfo<bool> GFX_HACK_COPY_EFB_ENABLED{{System::GFX, "Hacks", "EFBScaledCopy"}, true};
|
const ConfigInfo<bool> GFX_HACK_COPY_EFB_ENABLED{{System::GFX, "Hacks", "EFBScaledCopy"}, true};
|
||||||
const ConfigInfo<bool> GFX_HACK_EFB_EMULATE_FORMAT_CHANGES{
|
const ConfigInfo<bool> GFX_HACK_EFB_EMULATE_FORMAT_CHANGES{
|
||||||
{System::GFX, "Hacks", "EFBEmulateFormatChanges"}, false};
|
{System::GFX, "Hacks", "EFBEmulateFormatChanges"}, false};
|
||||||
|
|
|
@ -23,8 +23,6 @@ extern const ConfigInfo<bool> GFX_WIDESCREEN_HACK;
|
||||||
extern const ConfigInfo<int> GFX_ASPECT_RATIO;
|
extern const ConfigInfo<int> GFX_ASPECT_RATIO;
|
||||||
extern const ConfigInfo<int> GFX_SUGGESTED_ASPECT_RATIO;
|
extern const ConfigInfo<int> GFX_SUGGESTED_ASPECT_RATIO;
|
||||||
extern const ConfigInfo<bool> GFX_CROP;
|
extern const ConfigInfo<bool> GFX_CROP;
|
||||||
extern const ConfigInfo<bool> GFX_USE_XFB;
|
|
||||||
extern const ConfigInfo<bool> GFX_USE_REAL_XFB;
|
|
||||||
extern const ConfigInfo<int> GFX_SAFE_TEXTURE_CACHE_COLOR_SAMPLES;
|
extern const ConfigInfo<int> GFX_SAFE_TEXTURE_CACHE_COLOR_SAMPLES;
|
||||||
extern const ConfigInfo<bool> GFX_SHOW_FPS;
|
extern const ConfigInfo<bool> GFX_SHOW_FPS;
|
||||||
extern const ConfigInfo<bool> GFX_SHOW_NETPLAY_PING;
|
extern const ConfigInfo<bool> GFX_SHOW_NETPLAY_PING;
|
||||||
|
@ -101,6 +99,7 @@ extern const ConfigInfo<bool> GFX_HACK_BBOX_ENABLE;
|
||||||
extern const ConfigInfo<bool> GFX_HACK_BBOX_PREFER_STENCIL_IMPLEMENTATION;
|
extern const ConfigInfo<bool> GFX_HACK_BBOX_PREFER_STENCIL_IMPLEMENTATION;
|
||||||
extern const ConfigInfo<bool> GFX_HACK_FORCE_PROGRESSIVE;
|
extern const ConfigInfo<bool> GFX_HACK_FORCE_PROGRESSIVE;
|
||||||
extern const ConfigInfo<bool> GFX_HACK_SKIP_EFB_COPY_TO_RAM;
|
extern const ConfigInfo<bool> GFX_HACK_SKIP_EFB_COPY_TO_RAM;
|
||||||
|
extern const ConfigInfo<bool> GFX_HACK_SKIP_XFB_COPY_TO_RAM;
|
||||||
extern const ConfigInfo<bool> GFX_HACK_COPY_EFB_ENABLED;
|
extern const ConfigInfo<bool> GFX_HACK_COPY_EFB_ENABLED;
|
||||||
extern const ConfigInfo<bool> GFX_HACK_EFB_EMULATE_FORMAT_CHANGES;
|
extern const ConfigInfo<bool> GFX_HACK_EFB_EMULATE_FORMAT_CHANGES;
|
||||||
extern const ConfigInfo<bool> GFX_HACK_VERTEX_ROUDING;
|
extern const ConfigInfo<bool> GFX_HACK_VERTEX_ROUDING;
|
||||||
|
|
|
@ -74,8 +74,6 @@ static const INIToLocationMap& GetINIToLocationMap()
|
||||||
{{"Video_Settings", "AspectRatio"}, {Config::GFX_ASPECT_RATIO.location}},
|
{{"Video_Settings", "AspectRatio"}, {Config::GFX_ASPECT_RATIO.location}},
|
||||||
{{"Video_Settings", "SuggestedAspectRatio"}, {Config::GFX_SUGGESTED_ASPECT_RATIO.location}},
|
{{"Video_Settings", "SuggestedAspectRatio"}, {Config::GFX_SUGGESTED_ASPECT_RATIO.location}},
|
||||||
{{"Video_Settings", "Crop"}, {Config::GFX_CROP.location}},
|
{{"Video_Settings", "Crop"}, {Config::GFX_CROP.location}},
|
||||||
{{"Video_Settings", "UseXFB"}, {Config::GFX_USE_XFB.location}},
|
|
||||||
{{"Video_Settings", "UseRealXFB"}, {Config::GFX_USE_REAL_XFB.location}},
|
|
||||||
{{"Video_Settings", "SafeTextureCacheColorSamples"},
|
{{"Video_Settings", "SafeTextureCacheColorSamples"},
|
||||||
{Config::GFX_SAFE_TEXTURE_CACHE_COLOR_SAMPLES.location}},
|
{Config::GFX_SAFE_TEXTURE_CACHE_COLOR_SAMPLES.location}},
|
||||||
{{"Video_Settings", "HiresTextures"}, {Config::GFX_HIRES_TEXTURES.location}},
|
{{"Video_Settings", "HiresTextures"}, {Config::GFX_HIRES_TEXTURES.location}},
|
||||||
|
@ -109,6 +107,7 @@ static const INIToLocationMap& GetINIToLocationMap()
|
||||||
{{"Video_Hacks", "BBoxEnable"}, {Config::GFX_HACK_BBOX_ENABLE.location}},
|
{{"Video_Hacks", "BBoxEnable"}, {Config::GFX_HACK_BBOX_ENABLE.location}},
|
||||||
{{"Video_Hacks", "ForceProgressive"}, {Config::GFX_HACK_FORCE_PROGRESSIVE.location}},
|
{{"Video_Hacks", "ForceProgressive"}, {Config::GFX_HACK_FORCE_PROGRESSIVE.location}},
|
||||||
{{"Video_Hacks", "EFBToTextureEnable"}, {Config::GFX_HACK_SKIP_EFB_COPY_TO_RAM.location}},
|
{{"Video_Hacks", "EFBToTextureEnable"}, {Config::GFX_HACK_SKIP_EFB_COPY_TO_RAM.location}},
|
||||||
|
{{"Video_Hacks", "XFBToTextureEnable"}, {Config::GFX_HACK_SKIP_XFB_COPY_TO_RAM.location}},
|
||||||
{{"Video_Hacks", "EFBScaledCopy"}, {Config::GFX_EFB_SCALE.location}},
|
{{"Video_Hacks", "EFBScaledCopy"}, {Config::GFX_EFB_SCALE.location}},
|
||||||
{{"Video_Hacks", "EFBEmulateFormatChanges"},
|
{{"Video_Hacks", "EFBEmulateFormatChanges"},
|
||||||
{Config::GFX_HACK_EFB_EMULATE_FORMAT_CHANGES.location}},
|
{Config::GFX_HACK_EFB_EMULATE_FORMAT_CHANGES.location}},
|
||||||
|
|
|
@ -28,7 +28,7 @@ bool IsSettingSaveable(const Config::ConfigLocation& config_location)
|
||||||
// Graphics.Settings
|
// Graphics.Settings
|
||||||
|
|
||||||
Config::GFX_WIDESCREEN_HACK.location, Config::GFX_ASPECT_RATIO.location,
|
Config::GFX_WIDESCREEN_HACK.location, Config::GFX_ASPECT_RATIO.location,
|
||||||
Config::GFX_CROP.location, Config::GFX_USE_XFB.location, Config::GFX_USE_REAL_XFB.location,
|
Config::GFX_CROP.location,
|
||||||
Config::GFX_SAFE_TEXTURE_CACHE_COLOR_SAMPLES.location, Config::GFX_SHOW_FPS.location,
|
Config::GFX_SAFE_TEXTURE_CACHE_COLOR_SAMPLES.location, Config::GFX_SHOW_FPS.location,
|
||||||
Config::GFX_SHOW_NETPLAY_PING.location, Config::GFX_SHOW_NETPLAY_MESSAGES.location,
|
Config::GFX_SHOW_NETPLAY_PING.location, Config::GFX_SHOW_NETPLAY_MESSAGES.location,
|
||||||
Config::GFX_LOG_RENDER_TIME_TO_FILE.location, Config::GFX_OVERLAY_STATS.location,
|
Config::GFX_LOG_RENDER_TIME_TO_FILE.location, Config::GFX_OVERLAY_STATS.location,
|
||||||
|
@ -73,6 +73,7 @@ bool IsSettingSaveable(const Config::ConfigLocation& config_location)
|
||||||
Config::GFX_HACK_EFB_ACCESS_ENABLE.location, Config::GFX_HACK_BBOX_ENABLE.location,
|
Config::GFX_HACK_EFB_ACCESS_ENABLE.location, Config::GFX_HACK_BBOX_ENABLE.location,
|
||||||
Config::GFX_HACK_BBOX_PREFER_STENCIL_IMPLEMENTATION.location,
|
Config::GFX_HACK_BBOX_PREFER_STENCIL_IMPLEMENTATION.location,
|
||||||
Config::GFX_HACK_FORCE_PROGRESSIVE.location, Config::GFX_HACK_SKIP_EFB_COPY_TO_RAM.location,
|
Config::GFX_HACK_FORCE_PROGRESSIVE.location, Config::GFX_HACK_SKIP_EFB_COPY_TO_RAM.location,
|
||||||
|
Config::GFX_HACK_SKIP_XFB_COPY_TO_RAM.location,
|
||||||
Config::GFX_HACK_COPY_EFB_ENABLED.location,
|
Config::GFX_HACK_COPY_EFB_ENABLED.location,
|
||||||
Config::GFX_HACK_EFB_EMULATE_FORMAT_CHANGES.location,
|
Config::GFX_HACK_EFB_EMULATE_FORMAT_CHANGES.location,
|
||||||
Config::GFX_HACK_VERTEX_ROUDING.location,
|
Config::GFX_HACK_VERTEX_ROUDING.location,
|
||||||
|
|
|
@ -39,10 +39,10 @@ static void LoadFromDTM(Config::Layer* config_layer, Movie::DTMHeader* dtm)
|
||||||
else
|
else
|
||||||
config_layer->Set(Config::MAIN_GC_LANGUAGE, static_cast<int>(dtm->language));
|
config_layer->Set(Config::MAIN_GC_LANGUAGE, static_cast<int>(dtm->language));
|
||||||
|
|
||||||
config_layer->Set(Config::GFX_USE_XFB, dtm->bUseXFB);
|
|
||||||
config_layer->Set(Config::GFX_USE_REAL_XFB, dtm->bUseRealXFB);
|
|
||||||
config_layer->Set(Config::GFX_HACK_EFB_ACCESS_ENABLE, dtm->bEFBAccessEnable);
|
config_layer->Set(Config::GFX_HACK_EFB_ACCESS_ENABLE, dtm->bEFBAccessEnable);
|
||||||
config_layer->Set(Config::GFX_HACK_SKIP_EFB_COPY_TO_RAM, dtm->bSkipEFBCopyToRam);
|
config_layer->Set(Config::GFX_HACK_SKIP_EFB_COPY_TO_RAM, dtm->bSkipEFBCopyToRam);
|
||||||
|
config_layer->Set(Config::GFX_HACK_SKIP_XFB_COPY_TO_RAM, dtm->bSkipXFBCopyToRam);
|
||||||
config_layer->Set(Config::GFX_HACK_EFB_EMULATE_FORMAT_CHANGES, dtm->bEFBEmulateFormatChanges);
|
config_layer->Set(Config::GFX_HACK_EFB_EMULATE_FORMAT_CHANGES, dtm->bEFBEmulateFormatChanges);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,10 +62,9 @@ void SaveToDTM(Movie::DTMHeader* dtm)
|
||||||
else
|
else
|
||||||
dtm->language = Config::Get(Config::MAIN_GC_LANGUAGE);
|
dtm->language = Config::Get(Config::MAIN_GC_LANGUAGE);
|
||||||
|
|
||||||
dtm->bUseXFB = Config::Get(Config::GFX_USE_XFB);
|
|
||||||
dtm->bUseRealXFB = Config::Get(Config::GFX_USE_REAL_XFB);
|
|
||||||
dtm->bEFBAccessEnable = Config::Get(Config::GFX_HACK_EFB_ACCESS_ENABLE);
|
dtm->bEFBAccessEnable = Config::Get(Config::GFX_HACK_EFB_ACCESS_ENABLE);
|
||||||
dtm->bSkipEFBCopyToRam = Config::Get(Config::GFX_HACK_SKIP_EFB_COPY_TO_RAM);
|
dtm->bSkipEFBCopyToRam = Config::Get(Config::GFX_HACK_SKIP_EFB_COPY_TO_RAM);
|
||||||
|
dtm->bSkipXFBCopyToRam = Config::Get(Config::GFX_HACK_SKIP_XFB_COPY_TO_RAM);
|
||||||
dtm->bEFBEmulateFormatChanges = Config::Get(Config::GFX_HACK_EFB_EMULATE_FORMAT_CHANGES);
|
dtm->bEFBEmulateFormatChanges = Config::Get(Config::GFX_HACK_EFB_EMULATE_FORMAT_CHANGES);
|
||||||
|
|
||||||
// This never used the regular config
|
// This never used the regular config
|
||||||
|
|
|
@ -72,6 +72,7 @@ const std::string hotkey_labels[] = {
|
||||||
_trans("Toggle Crop"),
|
_trans("Toggle Crop"),
|
||||||
_trans("Toggle Aspect Ratio"),
|
_trans("Toggle Aspect Ratio"),
|
||||||
_trans("Toggle EFB Copies"),
|
_trans("Toggle EFB Copies"),
|
||||||
|
_trans("Toggle XFB Copies"),
|
||||||
_trans("Toggle Fog"),
|
_trans("Toggle Fog"),
|
||||||
_trans("Toggle Texture Dumping"),
|
_trans("Toggle Texture Dumping"),
|
||||||
_trans("Toggle Custom Textures"),
|
_trans("Toggle Custom Textures"),
|
||||||
|
|
|
@ -70,6 +70,7 @@ enum Hotkey
|
||||||
HK_TOGGLE_CROP,
|
HK_TOGGLE_CROP,
|
||||||
HK_TOGGLE_AR,
|
HK_TOGGLE_AR,
|
||||||
HK_TOGGLE_EFBCOPIES,
|
HK_TOGGLE_EFBCOPIES,
|
||||||
|
HK_TOGGLE_XFBCOPIES,
|
||||||
HK_TOGGLE_FOG,
|
HK_TOGGLE_FOG,
|
||||||
HK_TOGGLE_DUMPTEXTURES,
|
HK_TOGGLE_DUMPTEXTURES,
|
||||||
HK_TOGGLE_TEXTURES,
|
HK_TOGGLE_TEXTURES,
|
||||||
|
|
|
@ -1367,9 +1367,8 @@ void SetGraphicsConfig()
|
||||||
{
|
{
|
||||||
g_Config.bEFBAccessEnable = tmpHeader.bEFBAccessEnable;
|
g_Config.bEFBAccessEnable = tmpHeader.bEFBAccessEnable;
|
||||||
g_Config.bSkipEFBCopyToRam = tmpHeader.bSkipEFBCopyToRam;
|
g_Config.bSkipEFBCopyToRam = tmpHeader.bSkipEFBCopyToRam;
|
||||||
|
g_Config.bSkipXFBCopyToRam = tmpHeader.bSkipXFBCopyToRam;
|
||||||
g_Config.bEFBEmulateFormatChanges = tmpHeader.bEFBEmulateFormatChanges;
|
g_Config.bEFBEmulateFormatChanges = tmpHeader.bEFBEmulateFormatChanges;
|
||||||
g_Config.bUseXFB = tmpHeader.bUseXFB;
|
|
||||||
g_Config.bUseRealXFB = tmpHeader.bUseRealXFB;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// NOTE: EmuThread / Host Thread
|
// NOTE: EmuThread / Host Thread
|
||||||
|
|
|
@ -87,10 +87,9 @@ struct DTMHeader
|
||||||
bool bEFBAccessEnable;
|
bool bEFBAccessEnable;
|
||||||
bool bEFBCopyEnable;
|
bool bEFBCopyEnable;
|
||||||
bool bSkipEFBCopyToRam;
|
bool bSkipEFBCopyToRam;
|
||||||
|
bool bSkipXFBCopyToRam;
|
||||||
bool bEFBCopyCacheEnable;
|
bool bEFBCopyCacheEnable;
|
||||||
bool bEFBEmulateFormatChanges;
|
bool bEFBEmulateFormatChanges;
|
||||||
bool bUseXFB;
|
|
||||||
bool bUseRealXFB;
|
|
||||||
u8 memcards; // Memcards inserted (from least to most significant, the bits are slot A and B)
|
u8 memcards; // Memcards inserted (from least to most significant, the bits are slot A and B)
|
||||||
bool bClearSave; // Create a new memory card when playing back a movie if true
|
bool bClearSave; // Create a new memory card when playing back a movie if true
|
||||||
u8 bongos; // Bongos plugged in (from least to most significant, the bits are ports 1-4)
|
u8 bongos; // Bongos plugged in (from least to most significant, the bits are ports 1-4)
|
||||||
|
@ -98,7 +97,7 @@ struct DTMHeader
|
||||||
bool bNetPlay;
|
bool bNetPlay;
|
||||||
bool bPAL60;
|
bool bPAL60;
|
||||||
u8 language;
|
u8 language;
|
||||||
u8 reserved[11]; // Padding for any new config options
|
u8 reserved[12]; // Padding for any new config options
|
||||||
u8 discChange[40]; // Name of iso file to switch to, for two disc games.
|
u8 discChange[40]; // Name of iso file to switch to, for two disc games.
|
||||||
u8 revision[20]; // Git hash
|
u8 revision[20]; // Git hash
|
||||||
u32 DSPiromHash;
|
u32 DSPiromHash;
|
||||||
|
|
|
@ -20,7 +20,6 @@ HacksWidget::HacksWidget(GraphicsWindow* parent) : GraphicsWidget(parent)
|
||||||
CreateWidgets();
|
CreateWidgets();
|
||||||
LoadSettings();
|
LoadSettings();
|
||||||
ConnectWidgets();
|
ConnectWidgets();
|
||||||
OnXFBToggled();
|
|
||||||
AddDescriptions();
|
AddDescriptions();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,13 +67,11 @@ void HacksWidget::CreateWidgets()
|
||||||
auto* xfb_layout = new QGridLayout();
|
auto* xfb_layout = new QGridLayout();
|
||||||
xfb_box->setLayout(xfb_layout);
|
xfb_box->setLayout(xfb_layout);
|
||||||
|
|
||||||
m_disable_xfb = new GraphicsBool(tr("Disable"), Config::GFX_USE_XFB, true);
|
m_store_xfb_copies = new GraphicsBool(tr("Store XFB Copies to Texture Only"),
|
||||||
m_real_xfb = new GraphicsBoolEx(tr("Real"), Config::GFX_USE_REAL_XFB, false);
|
Config::GFX_HACK_SKIP_XFB_COPY_TO_RAM);
|
||||||
m_virtual_xfb = new GraphicsBoolEx(tr("Virtual"), Config::GFX_USE_REAL_XFB, true);
|
|
||||||
|
xfb_layout->addWidget(m_store_xfb_copies, 1, 0);
|
||||||
|
|
||||||
xfb_layout->addWidget(m_disable_xfb, 0, 0);
|
|
||||||
xfb_layout->addWidget(m_virtual_xfb, 0, 1);
|
|
||||||
xfb_layout->addWidget(m_real_xfb, 0, 2);
|
|
||||||
// Other
|
// Other
|
||||||
auto* other_box = new QGroupBox(tr("Other"));
|
auto* other_box = new QGroupBox(tr("Other"));
|
||||||
auto* other_layout = new QGridLayout();
|
auto* other_layout = new QGridLayout();
|
||||||
|
@ -101,16 +98,9 @@ void HacksWidget::CreateWidgets()
|
||||||
|
|
||||||
void HacksWidget::ConnectWidgets()
|
void HacksWidget::ConnectWidgets()
|
||||||
{
|
{
|
||||||
connect(m_disable_xfb, &QCheckBox::toggled, this, &HacksWidget::OnXFBToggled);
|
|
||||||
connect(m_accuracy, &QSlider::valueChanged, [this](int) { SaveSettings(); });
|
connect(m_accuracy, &QSlider::valueChanged, [this](int) { SaveSettings(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
void HacksWidget::OnXFBToggled()
|
|
||||||
{
|
|
||||||
m_real_xfb->setEnabled(!m_disable_xfb->isChecked());
|
|
||||||
m_virtual_xfb->setEnabled(!m_disable_xfb->isChecked());
|
|
||||||
}
|
|
||||||
|
|
||||||
void HacksWidget::LoadSettings()
|
void HacksWidget::LoadSettings()
|
||||||
{
|
{
|
||||||
auto samples = Config::Get(Config::GFX_SAFE_TEXTURE_CACHE_COLOR_SAMPLES);
|
auto samples = Config::Get(Config::GFX_SAFE_TEXTURE_CACHE_COLOR_SAMPLES);
|
||||||
|
@ -179,20 +169,10 @@ void HacksWidget::AddDescriptions()
|
||||||
"from RAM.\nLower accuracies cause in-game text to appear garbled in certain "
|
"from RAM.\nLower accuracies cause in-game text to appear garbled in certain "
|
||||||
"games.\n\nIf unsure, use the rightmost value.");
|
"games.\n\nIf unsure, use the rightmost value.");
|
||||||
|
|
||||||
static const char* TR_DISABLE_XFB_DESCRIPTION = QT_TR_NOOP(
|
static const char* TR_STORE_XFB_TO_TEXTURE_DESCRIPTION = QT_TR_NOOP(
|
||||||
"Disable any XFB emulation.\nSpeeds up emulation a lot but causes heavy glitches in many "
|
"Stores XFB Copies exclusively on the GPU, bypassing system memory. Causes graphical defects "
|
||||||
"games "
|
"in a small number of games that need to readback from memory.\n\nEnabled = XFB Copies to Texture\nDisabled = XFB Copies to RAM "
|
||||||
"which rely on them (especially homebrew applications).\n\nIf unsure, leave this checked.");
|
"(and Texture)\n\nIf unsure, leave this checked.");
|
||||||
static const char* TR_VIRTUAL_XFB_DESCRIPTION = QT_TR_NOOP(
|
|
||||||
"Emulate XFBs using GPU texture objects.\nFixes many games which don't work without XFB "
|
|
||||||
"emulation while not being as slow as real XFB emulation. However, it may still fail for "
|
|
||||||
"a lot "
|
|
||||||
"of other games (especially homebrew applications).\n\nIf unsure, leave this checked.");
|
|
||||||
|
|
||||||
static const char* TR_REAL_XFB_DESCRIPTION =
|
|
||||||
QT_TR_NOOP("Emulate XFBs accurately.\nSlows down emulation a lot and prohibits "
|
|
||||||
"high-resolution rendering but is necessary to emulate a number of games "
|
|
||||||
"properly.\n\nIf unsure, check virtual XFB emulation instead.");
|
|
||||||
|
|
||||||
static const char* TR_GPU_DECODING_DESCRIPTION =
|
static const char* TR_GPU_DECODING_DESCRIPTION =
|
||||||
QT_TR_NOOP("Enables texture decoding using the GPU instead of the CPU. This may result in "
|
QT_TR_NOOP("Enables texture decoding using the GPU instead of the CPU. This may result in "
|
||||||
|
@ -215,9 +195,7 @@ void HacksWidget::AddDescriptions()
|
||||||
AddDescription(m_ignore_format_changes, TR_IGNORE_FORMAT_CHANGE_DESCRIPTION);
|
AddDescription(m_ignore_format_changes, TR_IGNORE_FORMAT_CHANGE_DESCRIPTION);
|
||||||
AddDescription(m_store_efb_copies, TR_STORE_EFB_TO_TEXTURE_DESCRIPTION);
|
AddDescription(m_store_efb_copies, TR_STORE_EFB_TO_TEXTURE_DESCRIPTION);
|
||||||
AddDescription(m_accuracy, TR_ACCUARCY_DESCRIPTION);
|
AddDescription(m_accuracy, TR_ACCUARCY_DESCRIPTION);
|
||||||
AddDescription(m_disable_xfb, TR_DISABLE_XFB_DESCRIPTION);
|
AddDescription(m_store_xfb_copies, TR_STORE_XFB_TO_TEXTURE_DESCRIPTION);
|
||||||
AddDescription(m_virtual_xfb, TR_VIRTUAL_XFB_DESCRIPTION);
|
|
||||||
AddDescription(m_real_xfb, TR_REAL_XFB_DESCRIPTION);
|
|
||||||
AddDescription(m_gpu_texture_decoding, TR_GPU_DECODING_DESCRIPTION);
|
AddDescription(m_gpu_texture_decoding, TR_GPU_DECODING_DESCRIPTION);
|
||||||
AddDescription(m_fast_depth_calculation, TR_FAST_DEPTH_CALC_DESCRIPTION);
|
AddDescription(m_fast_depth_calculation, TR_FAST_DEPTH_CALC_DESCRIPTION);
|
||||||
AddDescription(m_disable_bounding_box, TR_DISABLE_BOUNDINGBOX_DESCRIPTION);
|
AddDescription(m_disable_bounding_box, TR_DISABLE_BOUNDINGBOX_DESCRIPTION);
|
||||||
|
|
|
@ -21,8 +21,6 @@ private:
|
||||||
void LoadSettings() override;
|
void LoadSettings() override;
|
||||||
void SaveSettings() override;
|
void SaveSettings() override;
|
||||||
|
|
||||||
void OnXFBToggled();
|
|
||||||
|
|
||||||
// EFB
|
// EFB
|
||||||
QCheckBox* m_skip_efb_cpu;
|
QCheckBox* m_skip_efb_cpu;
|
||||||
QCheckBox* m_ignore_format_changes;
|
QCheckBox* m_ignore_format_changes;
|
||||||
|
@ -33,9 +31,7 @@ private:
|
||||||
QCheckBox* m_gpu_texture_decoding;
|
QCheckBox* m_gpu_texture_decoding;
|
||||||
|
|
||||||
// External Framebuffer
|
// External Framebuffer
|
||||||
QCheckBox* m_disable_xfb;
|
QCheckBox* m_store_xfb_copies;
|
||||||
QRadioButton* m_virtual_xfb;
|
|
||||||
QRadioButton* m_real_xfb;
|
|
||||||
|
|
||||||
// Other
|
// Other
|
||||||
QCheckBox* m_fast_depth_calculation;
|
QCheckBox* m_fast_depth_calculation;
|
||||||
|
|
|
@ -38,12 +38,10 @@ void SoftwareRendererWidget::CreateWidgets()
|
||||||
auto* rendering_box = new QGroupBox(tr("Rendering"));
|
auto* rendering_box = new QGroupBox(tr("Rendering"));
|
||||||
auto* rendering_layout = new QGridLayout();
|
auto* rendering_layout = new QGridLayout();
|
||||||
m_backend_combo = new QComboBox();
|
m_backend_combo = new QComboBox();
|
||||||
m_bypass_xfb = new GraphicsBool(tr("Bypass XFB"), Config::GFX_USE_XFB, true);
|
|
||||||
|
|
||||||
rendering_box->setLayout(rendering_layout);
|
rendering_box->setLayout(rendering_layout);
|
||||||
rendering_layout->addWidget(new QLabel(tr("Backend:")), 1, 1);
|
rendering_layout->addWidget(new QLabel(tr("Backend:")), 1, 1);
|
||||||
rendering_layout->addWidget(m_backend_combo, 1, 2);
|
rendering_layout->addWidget(m_backend_combo, 1, 2);
|
||||||
rendering_layout->addWidget(m_bypass_xfb, 2, 1);
|
|
||||||
|
|
||||||
for (const auto& backend : g_available_video_backends)
|
for (const auto& backend : g_available_video_backends)
|
||||||
m_backend_combo->addItem(tr(backend->GetDisplayName().c_str()));
|
m_backend_combo->addItem(tr(backend->GetDisplayName().c_str()));
|
||||||
|
@ -156,11 +154,6 @@ void SoftwareRendererWidget::AddDescriptions()
|
||||||
"backend, so for the best emulation experience it's recommended to try both and "
|
"backend, so for the best emulation experience it's recommended to try both and "
|
||||||
"choose the one that's less problematic.\n\nIf unsure, select OpenGL.");
|
"choose the one that's less problematic.\n\nIf unsure, select OpenGL.");
|
||||||
|
|
||||||
static const char* TR_BYPASS_XFB_DESCRIPTION = QT_TR_NOOP(
|
|
||||||
"Disable any XFB emulation.\nSpeeds up emulation a lot but causes heavy glitches in many "
|
|
||||||
"games "
|
|
||||||
"which rely on them (especially homebrew applications).\n\nIf unsure, leave this checked.");
|
|
||||||
|
|
||||||
static const char* TR_SHOW_STATISTICS_DESCRIPTION =
|
static const char* TR_SHOW_STATISTICS_DESCRIPTION =
|
||||||
QT_TR_NOOP("Show various rendering statistics.\n\nIf unsure, leave this unchecked.");
|
QT_TR_NOOP("Show various rendering statistics.\n\nIf unsure, leave this unchecked.");
|
||||||
|
|
||||||
|
@ -169,7 +162,6 @@ void SoftwareRendererWidget::AddDescriptions()
|
||||||
"this unchecked.");
|
"this unchecked.");
|
||||||
|
|
||||||
AddDescription(m_backend_combo, TR_BACKEND_DESCRIPTION);
|
AddDescription(m_backend_combo, TR_BACKEND_DESCRIPTION);
|
||||||
AddDescription(m_bypass_xfb, TR_BYPASS_XFB_DESCRIPTION);
|
|
||||||
AddDescription(m_enable_statistics, TR_SHOW_STATISTICS_DESCRIPTION);
|
AddDescription(m_enable_statistics, TR_SHOW_STATISTICS_DESCRIPTION);
|
||||||
AddDescription(m_dump_textures, TR_DUMP_TEXTURES_DESCRIPTION);
|
AddDescription(m_dump_textures, TR_DUMP_TEXTURES_DESCRIPTION);
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,6 @@ private:
|
||||||
void AddDescriptions();
|
void AddDescriptions();
|
||||||
|
|
||||||
QComboBox* m_backend_combo;
|
QComboBox* m_backend_combo;
|
||||||
QCheckBox* m_bypass_xfb;
|
|
||||||
QCheckBox* m_enable_statistics;
|
QCheckBox* m_enable_statistics;
|
||||||
QCheckBox* m_dump_textures;
|
QCheckBox* m_dump_textures;
|
||||||
QCheckBox* m_dump_objects;
|
QCheckBox* m_dump_objects;
|
||||||
|
|
|
@ -224,6 +224,8 @@ void HotkeyScheduler::Run()
|
||||||
g_Config.iAspectRatio = (g_Config.iAspectRatio + 1) & 3;
|
g_Config.iAspectRatio = (g_Config.iAspectRatio + 1) & 3;
|
||||||
if (IsHotkey(HK_TOGGLE_EFBCOPIES))
|
if (IsHotkey(HK_TOGGLE_EFBCOPIES))
|
||||||
g_Config.bSkipEFBCopyToRam = !g_Config.bSkipEFBCopyToRam;
|
g_Config.bSkipEFBCopyToRam = !g_Config.bSkipEFBCopyToRam;
|
||||||
|
if (IsHotkey(HK_TOGGLE_XFBCOPIES))
|
||||||
|
g_Config.bSkipXFBCopyToRam = !g_Config.bSkipXFBCopyToRam;
|
||||||
if (IsHotkey(HK_TOGGLE_FOG))
|
if (IsHotkey(HK_TOGGLE_FOG))
|
||||||
g_Config.bDisableFog = !g_Config.bDisableFog;
|
g_Config.bDisableFog = !g_Config.bDisableFog;
|
||||||
if (IsHotkey(HK_TOGGLE_DUMPTEXTURES))
|
if (IsHotkey(HK_TOGGLE_DUMPTEXTURES))
|
||||||
|
|
|
@ -1484,6 +1484,13 @@ void CFrame::ParseHotkeys()
|
||||||
Config::SetCurrent(Config::GFX_HACK_SKIP_EFB_COPY_TO_RAM,
|
Config::SetCurrent(Config::GFX_HACK_SKIP_EFB_COPY_TO_RAM,
|
||||||
!Config::Get(Config::GFX_HACK_SKIP_EFB_COPY_TO_RAM));
|
!Config::Get(Config::GFX_HACK_SKIP_EFB_COPY_TO_RAM));
|
||||||
}
|
}
|
||||||
|
if (IsHotkey(HK_TOGGLE_XFBCOPIES))
|
||||||
|
{
|
||||||
|
OSDChoice = 6;
|
||||||
|
// Toggle XFB copies between XFB2RAM and XFB2Texture
|
||||||
|
Config::SetCurrent(Config::GFX_HACK_SKIP_XFB_COPY_TO_RAM,
|
||||||
|
!Config::Get(Config::GFX_HACK_SKIP_XFB_COPY_TO_RAM));
|
||||||
|
}
|
||||||
if (IsHotkey(HK_TOGGLE_FOG))
|
if (IsHotkey(HK_TOGGLE_FOG))
|
||||||
{
|
{
|
||||||
OSDChoice = 4;
|
OSDChoice = 4;
|
||||||
|
|
|
@ -77,10 +77,6 @@ SoftwareVideoConfigDialog::SoftwareVideoConfigDialog(wxWindow* parent, const std
|
||||||
label_backend->Disable();
|
label_backend->Disable();
|
||||||
choice_backend->Disable();
|
choice_backend->Disable();
|
||||||
}
|
}
|
||||||
|
|
||||||
// xfb
|
|
||||||
szr_rendering->Add(
|
|
||||||
new SettingCheckBox(page_general, _("Bypass XFB"), "", Config::GFX_USE_XFB, true));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// - info
|
// - info
|
||||||
|
|
|
@ -201,6 +201,10 @@ static wxString skip_efb_copy_to_ram_desc = wxTRANSLATE(
|
||||||
"Stores EFB Copies exclusively on the GPU, bypassing system memory. Causes graphical defects "
|
"Stores EFB Copies exclusively on the GPU, bypassing system memory. Causes graphical defects "
|
||||||
"in a small number of games.\n\nEnabled = EFB Copies to Texture\nDisabled = EFB Copies to RAM "
|
"in a small number of games.\n\nEnabled = EFB Copies to Texture\nDisabled = EFB Copies to RAM "
|
||||||
"(and Texture)\n\nIf unsure, leave this checked.");
|
"(and Texture)\n\nIf unsure, leave this checked.");
|
||||||
|
static wxString skip_xfb_copy_to_ram_desc = wxTRANSLATE(
|
||||||
|
"Stores XFB Copies exclusively on the GPU, bypassing system memory. Causes graphical defects "
|
||||||
|
"in a small number of games that need to readback from memory.\n\nEnabled = XFB Copies to Texture\nDisabled = XFB Copies to RAM "
|
||||||
|
"(and Texture)\n\nIf unsure, leave this checked.");
|
||||||
static wxString stc_desc =
|
static wxString stc_desc =
|
||||||
wxTRANSLATE("The \"Safe\" setting eliminates the likelihood of the GPU missing texture updates "
|
wxTRANSLATE("The \"Safe\" setting eliminates the likelihood of the GPU missing texture updates "
|
||||||
"from RAM.\nLower accuracies cause in-game text to appear garbled in certain "
|
"from RAM.\nLower accuracies cause in-game text to appear garbled in certain "
|
||||||
|
@ -229,17 +233,6 @@ static wxString show_netplay_messages_desc =
|
||||||
static wxString texfmt_desc =
|
static wxString texfmt_desc =
|
||||||
wxTRANSLATE("Modify textures to show the format they're encoded in. Needs an emulation reset "
|
wxTRANSLATE("Modify textures to show the format they're encoded in. Needs an emulation reset "
|
||||||
"in most cases.\n\nIf unsure, leave this unchecked.");
|
"in most cases.\n\nIf unsure, leave this unchecked.");
|
||||||
static wxString xfb_desc = wxTRANSLATE(
|
|
||||||
"Disable any XFB emulation.\nSpeeds up emulation a lot but causes heavy glitches in many games "
|
|
||||||
"which rely on them (especially homebrew applications).\n\nIf unsure, leave this checked.");
|
|
||||||
static wxString xfb_virtual_desc = wxTRANSLATE(
|
|
||||||
"Emulate XFBs using GPU texture objects.\nFixes many games which don't work without XFB "
|
|
||||||
"emulation while not being as slow as real XFB emulation. However, it may still fail for a lot "
|
|
||||||
"of other games (especially homebrew applications).\n\nIf unsure, leave this checked.");
|
|
||||||
static wxString xfb_real_desc =
|
|
||||||
wxTRANSLATE("Emulate XFBs accurately.\nSlows down emulation a lot and prohibits "
|
|
||||||
"high-resolution rendering but is necessary to emulate a number of games "
|
|
||||||
"properly.\n\nIf unsure, check virtual XFB emulation instead.");
|
|
||||||
static wxString dump_textures_desc =
|
static wxString dump_textures_desc =
|
||||||
wxTRANSLATE("Dump decoded game textures to User/Dump/Textures/<game_id>/.\n\nIf unsure, leave "
|
wxTRANSLATE("Dump decoded game textures to User/Dump/Textures/<game_id>/.\n\nIf unsure, leave "
|
||||||
"this unchecked.");
|
"this unchecked.");
|
||||||
|
@ -724,6 +717,11 @@ VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string& title)
|
||||||
Config::GFX_HACK_SKIP_EFB_COPY_TO_RAM),
|
Config::GFX_HACK_SKIP_EFB_COPY_TO_RAM),
|
||||||
0, wxLEFT | wxRIGHT, space5);
|
0, wxLEFT | wxRIGHT, space5);
|
||||||
szr_efb->AddSpacer(space5);
|
szr_efb->AddSpacer(space5);
|
||||||
|
szr_efb->Add(CreateCheckBox(page_hacks, _("Store XFB Copies to Texture Only"),
|
||||||
|
wxGetTranslation(skip_xfb_copy_to_ram_desc),
|
||||||
|
Config::GFX_HACK_SKIP_XFB_COPY_TO_RAM),
|
||||||
|
0, wxLEFT | wxRIGHT, space5);
|
||||||
|
szr_efb->AddSpacer(space5);
|
||||||
|
|
||||||
szr_hacks->AddSpacer(space5);
|
szr_hacks->AddSpacer(space5);
|
||||||
szr_hacks->Add(szr_efb, 0, wxEXPAND | wxLEFT | wxRIGHT, space5);
|
szr_hacks->Add(szr_efb, 0, wxEXPAND | wxLEFT | wxRIGHT, space5);
|
||||||
|
@ -782,31 +780,6 @@ VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string& title)
|
||||||
szr_hacks->Add(szr_safetex, 0, wxEXPAND | wxLEFT | wxRIGHT, space5);
|
szr_hacks->Add(szr_safetex, 0, wxEXPAND | wxLEFT | wxRIGHT, space5);
|
||||||
}
|
}
|
||||||
|
|
||||||
// - XFB
|
|
||||||
{
|
|
||||||
wxStaticBoxSizer* const group_xfb =
|
|
||||||
new wxStaticBoxSizer(wxVERTICAL, page_hacks, _("External Frame Buffer (XFB)"));
|
|
||||||
|
|
||||||
SettingCheckBox* disable_xfb = CreateCheckBox(
|
|
||||||
page_hacks, _("Disable"), wxGetTranslation(xfb_desc), Config::GFX_USE_XFB, true);
|
|
||||||
virtual_xfb = CreateRadioButton(page_hacks, _("Virtual"), wxGetTranslation(xfb_virtual_desc),
|
|
||||||
Config::GFX_USE_REAL_XFB, true, wxRB_GROUP);
|
|
||||||
real_xfb = CreateRadioButton(page_hacks, _("Real"), wxGetTranslation(xfb_real_desc),
|
|
||||||
Config::GFX_USE_REAL_XFB);
|
|
||||||
|
|
||||||
wxBoxSizer* const szr = new wxBoxSizer(wxHORIZONTAL);
|
|
||||||
szr->Add(disable_xfb, 0, wxALIGN_CENTER_VERTICAL);
|
|
||||||
szr->AddStretchSpacer(1);
|
|
||||||
szr->Add(virtual_xfb, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, space5);
|
|
||||||
szr->Add(real_xfb, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, space5);
|
|
||||||
|
|
||||||
group_xfb->Add(szr, 1, wxEXPAND | wxLEFT | wxRIGHT, space5);
|
|
||||||
group_xfb->AddSpacer(space5);
|
|
||||||
|
|
||||||
szr_hacks->AddSpacer(space5);
|
|
||||||
szr_hacks->Add(group_xfb, 0, wxEXPAND | wxLEFT | wxRIGHT, space5);
|
|
||||||
} // xfb
|
|
||||||
|
|
||||||
// - other hacks
|
// - other hacks
|
||||||
{
|
{
|
||||||
wxGridSizer* const szr_other = new wxGridSizer(2, space5, space5);
|
wxGridSizer* const szr_other = new wxGridSizer(2, space5, space5);
|
||||||
|
@ -1112,10 +1085,6 @@ void VideoConfigDiag::OnUpdateUI(wxUpdateUIEvent& ev)
|
||||||
choice_aamode->Enable(vconfig.backend_info.AAModes.size() > 1);
|
choice_aamode->Enable(vconfig.backend_info.AAModes.size() > 1);
|
||||||
text_aamode->Enable(vconfig.backend_info.AAModes.size() > 1);
|
text_aamode->Enable(vconfig.backend_info.AAModes.size() > 1);
|
||||||
|
|
||||||
// XFB
|
|
||||||
virtual_xfb->Enable(vconfig.bUseXFB);
|
|
||||||
real_xfb->Enable(vconfig.bUseXFB);
|
|
||||||
|
|
||||||
// custom textures
|
// custom textures
|
||||||
cache_hires_textures->Enable(vconfig.bHiresTextures);
|
cache_hires_textures->Enable(vconfig.bHiresTextures);
|
||||||
|
|
||||||
|
|
|
@ -568,31 +568,6 @@ void Renderer::TransitionBuffersForSwap(const TargetRectangle& scaled_rect,
|
||||||
{
|
{
|
||||||
VkCommandBuffer command_buffer = g_command_buffer_mgr->GetCurrentCommandBuffer();
|
VkCommandBuffer command_buffer = g_command_buffer_mgr->GetCurrentCommandBuffer();
|
||||||
|
|
||||||
if (!g_ActiveConfig.bUseXFB)
|
|
||||||
{
|
|
||||||
// Drawing EFB direct.
|
|
||||||
if (g_ActiveConfig.iMultisamples > 1)
|
|
||||||
{
|
|
||||||
// While the source rect can be out-of-range when drawing, the resolve rectangle must be
|
|
||||||
// within the bounds of the texture.
|
|
||||||
VkRect2D region = {
|
|
||||||
{scaled_rect.left, scaled_rect.top},
|
|
||||||
{static_cast<u32>(scaled_rect.GetWidth()), static_cast<u32>(scaled_rect.GetHeight())}};
|
|
||||||
region = Util::ClampRect2D(region, FramebufferManager::GetInstance()->GetEFBWidth(),
|
|
||||||
FramebufferManager::GetInstance()->GetEFBHeight());
|
|
||||||
|
|
||||||
Vulkan::Texture2D* rtex = FramebufferManager::GetInstance()->ResolveEFBColorTexture(region);
|
|
||||||
rtex->TransitionToLayout(command_buffer, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
FramebufferManager::GetInstance()->GetEFBColorTexture()->TransitionToLayout(
|
|
||||||
command_buffer, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL);
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Drawing XFB sources, so transition all of them.
|
// Drawing XFB sources, so transition all of them.
|
||||||
// Don't need the EFB, so leave it as-is.
|
// Don't need the EFB, so leave it as-is.
|
||||||
for (u32 i = 0; i < xfb_count; i++)
|
for (u32 i = 0; i < xfb_count; i++)
|
||||||
|
@ -608,13 +583,6 @@ void Renderer::DrawFrame(VkRenderPass render_pass, const TargetRectangle& target
|
||||||
const XFBSourceBase* const* xfb_sources, u32 xfb_count, u32 fb_width,
|
const XFBSourceBase* const* xfb_sources, u32 xfb_count, u32 fb_width,
|
||||||
u32 fb_stride, u32 fb_height)
|
u32 fb_stride, u32 fb_height)
|
||||||
{
|
{
|
||||||
if (!g_ActiveConfig.bUseXFB)
|
|
||||||
DrawEFB(render_pass, target_rect, scaled_efb_rect);
|
|
||||||
else if (!g_ActiveConfig.bUseRealXFB)
|
|
||||||
DrawVirtualXFB(render_pass, target_rect, xfb_addr, xfb_sources, xfb_count, fb_width, fb_stride,
|
|
||||||
fb_height);
|
|
||||||
else
|
|
||||||
DrawRealXFB(render_pass, target_rect, xfb_sources, xfb_count, fb_width, fb_stride, fb_height);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Renderer::DrawEFB(VkRenderPass render_pass, const TargetRectangle& target_rect,
|
void Renderer::DrawEFB(VkRenderPass render_pass, const TargetRectangle& target_rect,
|
||||||
|
@ -1107,8 +1075,6 @@ void Renderer::CheckForConfigChanges()
|
||||||
int old_aspect_ratio = g_ActiveConfig.iAspectRatio;
|
int old_aspect_ratio = g_ActiveConfig.iAspectRatio;
|
||||||
int old_efb_scale = g_ActiveConfig.iEFBScale;
|
int old_efb_scale = g_ActiveConfig.iEFBScale;
|
||||||
bool old_force_filtering = g_ActiveConfig.bForceFiltering;
|
bool old_force_filtering = g_ActiveConfig.bForceFiltering;
|
||||||
bool old_use_xfb = g_ActiveConfig.bUseXFB;
|
|
||||||
bool old_use_realxfb = g_ActiveConfig.bUseRealXFB;
|
|
||||||
|
|
||||||
// Copy g_Config to g_ActiveConfig.
|
// Copy g_Config to g_ActiveConfig.
|
||||||
// NOTE: This can potentially race with the UI thread, however if it does, the changes will be
|
// NOTE: This can potentially race with the UI thread, however if it does, the changes will be
|
||||||
|
@ -1120,14 +1086,12 @@ void Renderer::CheckForConfigChanges()
|
||||||
bool force_texture_filtering_changed = old_force_filtering != g_ActiveConfig.bForceFiltering;
|
bool force_texture_filtering_changed = old_force_filtering != g_ActiveConfig.bForceFiltering;
|
||||||
bool efb_scale_changed = old_efb_scale != g_ActiveConfig.iEFBScale;
|
bool efb_scale_changed = old_efb_scale != g_ActiveConfig.iEFBScale;
|
||||||
bool aspect_changed = old_aspect_ratio != g_ActiveConfig.iAspectRatio;
|
bool aspect_changed = old_aspect_ratio != g_ActiveConfig.iAspectRatio;
|
||||||
bool use_xfb_changed = old_use_xfb != g_ActiveConfig.bUseXFB;
|
|
||||||
bool use_realxfb_changed = old_use_realxfb != g_ActiveConfig.bUseRealXFB;
|
|
||||||
|
|
||||||
// Update texture cache settings with any changed options.
|
// Update texture cache settings with any changed options.
|
||||||
TextureCache::GetInstance()->OnConfigChanged(g_ActiveConfig);
|
TextureCache::GetInstance()->OnConfigChanged(g_ActiveConfig);
|
||||||
|
|
||||||
// Handle settings that can cause the target rectangle to change.
|
// Handle settings that can cause the target rectangle to change.
|
||||||
if (efb_scale_changed || aspect_changed || use_xfb_changed || use_realxfb_changed)
|
if (efb_scale_changed || aspect_changed)
|
||||||
{
|
{
|
||||||
if (CalculateTargetSize())
|
if (CalculateTargetSize())
|
||||||
ResizeEFBTextures();
|
ResizeEFBTextures();
|
||||||
|
|
|
@ -40,15 +40,6 @@ FramebufferManagerBase::~FramebufferManagerBase()
|
||||||
void FramebufferManagerBase::CopyToXFB(u32 xfbAddr, u32 fbStride, u32 fbHeight,
|
void FramebufferManagerBase::CopyToXFB(u32 xfbAddr, u32 fbStride, u32 fbHeight,
|
||||||
const EFBRectangle& sourceRc, float Gamma)
|
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,
|
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,
|
void VideoBackendBase::Video_BeginField(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight,
|
||||||
u64 ticks)
|
u64 ticks)
|
||||||
{
|
{
|
||||||
if (m_initialized && g_ActiveConfig.bUseXFB && g_renderer)
|
if (m_initialized && g_renderer)
|
||||||
{
|
{
|
||||||
Fifo::SyncGPU(Fifo::SyncGPUReason::Swap);
|
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 efbcopy_text = g_ActiveConfig.bSkipEFBCopyToRam ? "to Texture" : "to RAM";
|
||||||
|
const char* const xfbcopy_text = g_ActiveConfig.bSkipXFBCopyToRam ? "to Texture" : "to RAM";
|
||||||
|
|
||||||
// The rows
|
// The rows
|
||||||
const std::string lines[] = {
|
const std::string lines[] = {
|
||||||
|
@ -338,6 +339,7 @@ void Renderer::DrawDebugText()
|
||||||
"Speed Limit: Unlimited" :
|
"Speed Limit: Unlimited" :
|
||||||
StringFromFormat("Speed Limit: %li%%",
|
StringFromFormat("Speed Limit: %li%%",
|
||||||
std::lround(SConfig::GetInstance().m_EmulationSpeed * 100.f)),
|
std::lround(SConfig::GetInstance().m_EmulationSpeed * 100.f)),
|
||||||
|
std::string("Copy XFB: ") + xfbcopy_text,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum
|
enum
|
||||||
|
@ -688,8 +690,7 @@ void Renderer::Swap(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight, const
|
||||||
// New frame
|
// New frame
|
||||||
stats.ResetFrame();
|
stats.ResetFrame();
|
||||||
|
|
||||||
Core::Callback_VideoCopiedToXFB(m_xfb_written ||
|
Core::Callback_VideoCopiedToXFB(m_xfb_written || !g_ActiveConfig.bSkipXFBCopyToRam);
|
||||||
(g_ActiveConfig.bUseXFB && g_ActiveConfig.bUseRealXFB));
|
|
||||||
m_xfb_written = false;
|
m_xfb_written = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1416,7 +1416,7 @@ void TextureCacheBase::CopyRenderTargetToTexture(u32 dstAddr, EFBCopyFormat dstF
|
||||||
ColorMask[3] = 0.0f;
|
ColorMask[3] = 0.0f;
|
||||||
fConstAdd[3] = 1.0f;
|
fConstAdd[3] = 1.0f;
|
||||||
cbufid = 30; // just re-use the RGBX8 cbufid from above
|
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;
|
is_xfb_copy = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -67,8 +67,6 @@ void VideoConfig::Refresh()
|
||||||
else
|
else
|
||||||
iAspectRatio = aspect_ratio;
|
iAspectRatio = aspect_ratio;
|
||||||
bCrop = Config::Get(Config::GFX_CROP);
|
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);
|
iSafeTextureCache_ColorSamples = Config::Get(Config::GFX_SAFE_TEXTURE_CACHE_COLOR_SAMPLES);
|
||||||
bShowFPS = Config::Get(Config::GFX_SHOW_FPS);
|
bShowFPS = Config::Get(Config::GFX_SHOW_FPS);
|
||||||
bShowNetPlayPing = Config::Get(Config::GFX_SHOW_NETPLAY_PING);
|
bShowNetPlayPing = Config::Get(Config::GFX_SHOW_NETPLAY_PING);
|
||||||
|
@ -138,6 +136,7 @@ void VideoConfig::Refresh()
|
||||||
Config::Get(Config::GFX_HACK_BBOX_PREFER_STENCIL_IMPLEMENTATION);
|
Config::Get(Config::GFX_HACK_BBOX_PREFER_STENCIL_IMPLEMENTATION);
|
||||||
bForceProgressive = Config::Get(Config::GFX_HACK_FORCE_PROGRESSIVE);
|
bForceProgressive = Config::Get(Config::GFX_HACK_FORCE_PROGRESSIVE);
|
||||||
bSkipEFBCopyToRam = Config::Get(Config::GFX_HACK_SKIP_EFB_COPY_TO_RAM);
|
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);
|
bCopyEFBScaled = Config::Get(Config::GFX_HACK_COPY_EFB_ENABLED);
|
||||||
bEFBEmulateFormatChanges = Config::Get(Config::GFX_HACK_EFB_EMULATE_FORMAT_CHANGES);
|
bEFBEmulateFormatChanges = Config::Get(Config::GFX_HACK_EFB_EMULATE_FORMAT_CHANGES);
|
||||||
bVertexRounding = Config::Get(Config::GFX_HACK_VERTEX_ROUDING);
|
bVertexRounding = Config::Get(Config::GFX_HACK_VERTEX_ROUDING);
|
||||||
|
@ -171,13 +170,6 @@ void VideoConfig::VerifyValidity()
|
||||||
10000);
|
10000);
|
||||||
iStereoMode = 0;
|
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;
|
bool bWidescreenHack;
|
||||||
int iAspectRatio;
|
int iAspectRatio;
|
||||||
bool bCrop; // Aspect ratio controls.
|
bool bCrop; // Aspect ratio controls.
|
||||||
bool bUseXFB;
|
|
||||||
bool bUseRealXFB;
|
|
||||||
bool bShaderCache;
|
bool bShaderCache;
|
||||||
|
|
||||||
// Enhancements
|
// Enhancements
|
||||||
|
@ -119,6 +117,7 @@ struct VideoConfig final
|
||||||
|
|
||||||
bool bEFBEmulateFormatChanges;
|
bool bEFBEmulateFormatChanges;
|
||||||
bool bSkipEFBCopyToRam;
|
bool bSkipEFBCopyToRam;
|
||||||
|
bool bSkipXFBCopyToRam;
|
||||||
bool bCopyEFBScaled;
|
bool bCopyEFBScaled;
|
||||||
int iSafeTextureCache_ColorSamples;
|
int iSafeTextureCache_ColorSamples;
|
||||||
ProjectionHackConfig phack;
|
ProjectionHackConfig phack;
|
||||||
|
@ -229,8 +228,6 @@ struct VideoConfig final
|
||||||
} backend_info;
|
} backend_info;
|
||||||
|
|
||||||
// Utility
|
// Utility
|
||||||
bool RealXFBEnabled() const { return bUseXFB && bUseRealXFB; }
|
|
||||||
bool VirtualXFBEnabled() const { return bUseXFB && !bUseRealXFB; }
|
|
||||||
bool MultisamplingEnabled() const { return iMultisamples > 1; }
|
bool MultisamplingEnabled() const { return iMultisamples > 1; }
|
||||||
bool ExclusiveFullscreenEnabled() const
|
bool ExclusiveFullscreenEnabled() const
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue