GS: Remove CRC hack levels

Replace it with a boolean "Disable Render Fixes" option.
This commit is contained in:
Stenzek 2023-05-11 20:41:26 +10:00 committed by refractionpcsx2
parent 7ca28fc796
commit 7edc4e2cb3
13 changed files with 132 additions and 207 deletions

View File

@ -181,8 +181,6 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsDialog* dialog, QWidget*
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// HW Renderer Fixes // HW Renderer Fixes
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
SettingWidgetBinder::BindWidgetToIntSetting(
sif, m_ui.crcFixLevel, "EmuCore/GS", "crc_hack_level", static_cast<int>(CRCHackLevel::Automatic), -1);
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.halfScreenFix, "EmuCore/GS", "UserHacks_Half_Bottom_Override", -1, -1); SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.halfScreenFix, "EmuCore/GS", "UserHacks_Half_Bottom_Override", -1, -1);
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.cpuSpriteRenderBW, "EmuCore/GS", "UserHacks_CPUSpriteRenderBW", 0); SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.cpuSpriteRenderBW, "EmuCore/GS", "UserHacks_CPUSpriteRenderBW", 0);
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.cpuSpriteRenderLevel, "EmuCore/GS", "UserHacks_CPUSpriteRenderLevel", 0); SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.cpuSpriteRenderLevel, "EmuCore/GS", "UserHacks_CPUSpriteRenderLevel", 0);
@ -194,6 +192,7 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsDialog* dialog, QWidget*
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.frameBufferConversion, "EmuCore/GS", "UserHacks_CPU_FB_Conversion", false); SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.frameBufferConversion, "EmuCore/GS", "UserHacks_CPU_FB_Conversion", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.disableDepthEmulation, "EmuCore/GS", "UserHacks_DisableDepthSupport", false); SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.disableDepthEmulation, "EmuCore/GS", "UserHacks_DisableDepthSupport", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.disableSafeFeatures, "EmuCore/GS", "UserHacks_Disable_Safe_Features", false); SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.disableSafeFeatures, "EmuCore/GS", "UserHacks_Disable_Safe_Features", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.disableRenderFixes, "EmuCore/GS", "UserHacks_DisableRenderFixes", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.preloadFrameData, "EmuCore/GS", "preload_frame_with_gs_data", false); SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.preloadFrameData, "EmuCore/GS", "preload_frame_with_gs_data", false);
SettingWidgetBinder::BindWidgetToBoolSetting( SettingWidgetBinder::BindWidgetToBoolSetting(
sif, m_ui.disablePartialInvalidation, "EmuCore/GS", "UserHacks_DisablePartialInvalidation", false); sif, m_ui.disablePartialInvalidation, "EmuCore/GS", "UserHacks_DisablePartialInvalidation", false);
@ -471,9 +470,6 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsDialog* dialog, QWidget*
"Unscaled: Native Dithering / Lowest dithering effect does not increase size of squares when upscaling.<br> " "Unscaled: Native Dithering / Lowest dithering effect does not increase size of squares when upscaling.<br> "
"Scaled: Upscaling-aware / Highest dithering effect.")); "Scaled: Upscaling-aware / Highest dithering effect."));
dialog->registerWidgetHelp(m_ui.crcFixLevel, tr("CRC Fix Level"), tr("Automatic (Default)"),
tr("Control the number of Auto-CRC fixes and hacks applied to games."));
dialog->registerWidgetHelp(m_ui.blending, tr("Blending Accuracy"), tr("Basic (Recommended)"), dialog->registerWidgetHelp(m_ui.blending, tr("Blending Accuracy"), tr("Basic (Recommended)"),
tr("Control the accuracy level of the GS blending unit emulation.<br> " tr("Control the accuracy level of the GS blending unit emulation.<br> "
"The higher the setting, the more blending is emulated in the shader accurately, and the higher the speed penalty will " "The higher the setting, the more blending is emulated in the shader accurately, and the higher the speed penalty will "
@ -545,6 +541,9 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsDialog* dialog, QWidget*
"Disables accurate GS Memory Clearing to be done on the CPU, and let the GPU handle it, which can help Kingdom Hearts " "Disables accurate GS Memory Clearing to be done on the CPU, and let the GPU handle it, which can help Kingdom Hearts "
"games.")); "games."));
dialog->registerWidgetHelp(
m_ui.disableRenderFixes, tr("Disable Render Fixes"), tr("Unchecked"), tr("This option disables game-specific render fixes."));
dialog->registerWidgetHelp(m_ui.disablePartialInvalidation, tr("Disable Partial Source Invalidation"), tr("Unchecked"), dialog->registerWidgetHelp(m_ui.disablePartialInvalidation, tr("Disable Partial Source Invalidation"), tr("Unchecked"),
tr("By default, the texture cache handles partial invalidations. Unfortunately it is very costly to compute CPU wise. " tr("By default, the texture cache handles partial invalidations. Unfortunately it is very costly to compute CPU wise. "
"This hack replaces the partial invalidation with a complete deletion of the texture to reduce the CPU load. " "This hack replaces the partial invalidation with a complete deletion of the texture to reduce the CPU load. "
@ -1051,7 +1050,6 @@ void GraphicsSettingsWidget::resetManualHardwareFixes()
check_bool("EmuCore/GS", "UserHacks", false); check_bool("EmuCore/GS", "UserHacks", false);
check_int("EmuCore/GS", "crc_hack_level", static_cast<int>(CRCHackLevel::Automatic));
check_int("EmuCore/GS", "UserHacks_Half_Bottom_Override", -1); check_int("EmuCore/GS", "UserHacks_Half_Bottom_Override", -1);
check_int("EmuCore/GS", "UserHacks_CPUSpriteRenderBW", 0); check_int("EmuCore/GS", "UserHacks_CPUSpriteRenderBW", 0);
check_int("EmuCore/GS", "UserHacks_CPUCLUTRender", 0); check_int("EmuCore/GS", "UserHacks_CPUCLUTRender", 0);
@ -1062,6 +1060,7 @@ void GraphicsSettingsWidget::resetManualHardwareFixes()
check_bool("EmuCore/GS", "UserHacks_CPU_FB_Conversion", false); check_bool("EmuCore/GS", "UserHacks_CPU_FB_Conversion", false);
check_bool("EmuCore/GS", "UserHacks_DisableDepthSupport", false); check_bool("EmuCore/GS", "UserHacks_DisableDepthSupport", false);
check_bool("EmuCore/GS", "UserHacks_Disable_Safe_Features", false); check_bool("EmuCore/GS", "UserHacks_Disable_Safe_Features", false);
check_bool("EmuCore/GS", "UserHacks_DisableRenderFixes", false);
check_bool("EmuCore/GS", "preload_frame_with_gs_data", false); check_bool("EmuCore/GS", "preload_frame_with_gs_data", false);
check_bool("EmuCore/GS", "UserHacks_DisablePartialInvalidation", false); check_bool("EmuCore/GS", "UserHacks_DisablePartialInvalidation", false);
check_int("EmuCore/GS", "UserHacks_TextureInsideRt", static_cast<int>(GSTextureInRtMode::Disabled)); check_int("EmuCore/GS", "UserHacks_TextureInsideRt", static_cast<int>(GSTextureInRtMode::Disabled));

View File

@ -781,54 +781,13 @@
</attribute> </attribute>
<layout class="QFormLayout" name="hardwareFixesLayout"> <layout class="QFormLayout" name="hardwareFixesLayout">
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>CRC Fix Level:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="crcFixLevel">
<item>
<property name="text">
<string>Automatic (Default)</string>
</property>
</item>
<item>
<property name="text">
<string>None (Debug)</string>
</property>
</item>
<item>
<property name="text">
<string>Minimum (Debug)</string>
</property>
</item>
<item>
<property name="text">
<string>Partial (OpenGL)</string>
</property>
</item>
<item>
<property name="text">
<string>Full (Direct3D)</string>
</property>
</item>
<item>
<property name="text">
<string>Aggressive</string>
</property>
</item>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_10"> <widget class="QLabel" name="label_10">
<property name="text"> <property name="text">
<string>Half Screen Fix:</string> <string>Half Screen Fix:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="1"> <item row="0" column="1">
<widget class="QComboBox" name="halfScreenFix"> <widget class="QComboBox" name="halfScreenFix">
<item> <item>
<property name="text"> <property name="text">
@ -847,14 +806,14 @@
</item> </item>
</widget> </widget>
</item> </item>
<item row="2" column="0"> <item row="1" column="0">
<widget class="QLabel" name="label_36"> <widget class="QLabel" name="label_36">
<property name="text"> <property name="text">
<string>CPU Sprite Render Size:</string> <string>CPU Sprite Render Size:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="1"> <item row="1" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_5" stretch="1,0"> <layout class="QHBoxLayout" name="horizontalLayout_5" stretch="1,0">
<item> <item>
<widget class="QComboBox" name="cpuSpriteRenderBW"> <widget class="QComboBox" name="cpuSpriteRenderBW">
@ -936,14 +895,14 @@
</item> </item>
</layout> </layout>
</item> </item>
<item row="3" column="0"> <item row="2" column="0">
<widget class="QLabel" name="label_16"> <widget class="QLabel" name="label_16">
<property name="text"> <property name="text">
<string>Software CLUT Render:</string> <string>Software CLUT Render:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="1"> <item row="2" column="1">
<widget class="QComboBox" name="cpuCLUTRender"> <widget class="QComboBox" name="cpuCLUTRender">
<property name="currentText"> <property name="currentText">
<string extracomment="0 (Disabled)">0 (Disabled)</string> <string extracomment="0 (Disabled)">0 (Disabled)</string>
@ -968,14 +927,14 @@
</item> </item>
</widget> </widget>
</item> </item>
<item row="4" column="0"> <item row="3" column="0">
<widget class="QLabel" name="label_47"> <widget class="QLabel" name="label_47">
<property name="text"> <property name="text">
<string extracomment="CLUT: Color Look Up Table, often referred to as a palette in non-PS2 things. GPU Target CLUT: GPU handling of when a game uses data from a render target as a CLUT.">GPU Target CLUT:</string> <string extracomment="CLUT: Color Look Up Table, often referred to as a palette in non-PS2 things. GPU Target CLUT: GPU handling of when a game uses data from a render target as a CLUT.">GPU Target CLUT:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="1"> <item row="3" column="1">
<widget class="QComboBox" name="gpuTargetCLUTMode"> <widget class="QComboBox" name="gpuTargetCLUTMode">
<item> <item>
<property name="text"> <property name="text">
@ -994,40 +953,14 @@
</item> </item>
</widget> </widget>
</item> </item>
<item row="6" column="0"> <item row="4" column="0">
<widget class="QLabel" name="label_45">
<property name="text">
<string>Texture Inside RT:</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QComboBox" name="textureInsideRt">
<item>
<property name="text">
<string>Disabled (Default)</string>
</property>
</item>
<item>
<property name="text">
<string>Inside Target</string>
</property>
</item>
<item>
<property name="text">
<string>Merge Targets</string>
</property>
</item>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_30"> <widget class="QLabel" name="label_30">
<property name="text"> <property name="text">
<string>Auto Flush:</string> <string>Auto Flush:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="5" column="1"> <item row="4" column="1">
<widget class="QComboBox" name="hwAutoFlush"> <widget class="QComboBox" name="hwAutoFlush">
<item> <item>
<property name="text"> <property name="text">
@ -1046,14 +979,40 @@
</item> </item>
</widget> </widget>
</item> </item>
<item row="7" column="0"> <item row="5" column="0">
<widget class="QLabel" name="label_45">
<property name="text">
<string>Texture Inside RT:</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QComboBox" name="textureInsideRt">
<item>
<property name="text">
<string>Disabled (Default)</string>
</property>
</item>
<item>
<property name="text">
<string>Inside Target</string>
</property>
</item>
<item>
<property name="text">
<string>Merge Targets</string>
</property>
</item>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="label_12"> <widget class="QLabel" name="label_12">
<property name="text"> <property name="text">
<string>Skipdraw Range:</string> <string>Skipdraw Range:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="7" column="1"> <item row="6" column="1">
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<item> <item>
<widget class="QSpinBox" name="skipDrawStart"> <widget class="QSpinBox" name="skipDrawStart">
@ -1071,7 +1030,7 @@
</item> </item>
</layout> </layout>
</item> </item>
<item row="8" column="0" colspan="2"> <item row="7" column="0" colspan="2">
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="0" column="0"> <item row="0" column="0">
<widget class="QCheckBox" name="disableDepthEmulation"> <widget class="QCheckBox" name="disableDepthEmulation">
@ -1094,45 +1053,52 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="0"> <item row="4" column="1">
<widget class="QCheckBox" name="estimateTextureRegion"> <widget class="QCheckBox" name="targetPartialInvalidation">
<property name="text"> <property name="text">
<string>Estimate Texture Region</string> <string>Target Partial Invalidation</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="0"> <item row="3" column="1">
<widget class="QCheckBox" name="frameBufferConversion">
<property name="text">
<string>Frame Buffer Conversion</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="gpuPaletteConversion">
<property name="text">
<string>GPU Palette Conversion</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="preloadFrameData">
<property name="text">
<string>Preload Frame Data</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="readTCOnClose"> <widget class="QCheckBox" name="readTCOnClose">
<property name="text"> <property name="text">
<string>Read Targets When Closing</string> <string>Read Targets When Closing</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="1"> <item row="2" column="1">
<widget class="QCheckBox" name="targetPartialInvalidation"> <widget class="QCheckBox" name="preloadFrameData">
<property name="text"> <property name="text">
<string>Target Partial Invalidation</string> <string>Preload Frame Data</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="gpuPaletteConversion">
<property name="text">
<string>GPU Palette Conversion</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="frameBufferConversion">
<property name="text">
<string>Frame Buffer Conversion</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QCheckBox" name="estimateTextureRegion">
<property name="text">
<string>Estimate Texture Region</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="disableRenderFixes">
<property name="text">
<string>Disable Render Fixes</string>
</property> </property>
</widget> </widget>
</item> </item>

View File

@ -288,16 +288,6 @@ enum class HWMipmapLevel : s8
Full Full
}; };
enum class CRCHackLevel : s8
{
Automatic = -1,
Off,
Minimum,
Partial,
Full,
Aggressive
};
enum class AccBlendLevel : u8 enum class AccBlendLevel : u8
{ {
Minimum, Minimum,
@ -685,6 +675,7 @@ struct Pcsx2Config
UserHacks_DisableDepthSupport : 1, UserHacks_DisableDepthSupport : 1,
UserHacks_DisablePartialInvalidation : 1, UserHacks_DisablePartialInvalidation : 1,
UserHacks_DisableSafeFeatures : 1, UserHacks_DisableSafeFeatures : 1,
UserHacks_DisableRenderFixes : 1,
UserHacks_MergePPSprite : 1, UserHacks_MergePPSprite : 1,
UserHacks_WildHack : 1, UserHacks_WildHack : 1,
UserHacks_BilinearHack : 1, UserHacks_BilinearHack : 1,
@ -742,7 +733,6 @@ struct Pcsx2Config
HWMipmapLevel HWMipmap = HWMipmapLevel::Automatic; HWMipmapLevel HWMipmap = HWMipmapLevel::Automatic;
AccBlendLevel AccurateBlendingUnit = AccBlendLevel::Basic; AccBlendLevel AccurateBlendingUnit = AccBlendLevel::Basic;
CRCHackLevel CRCHack = CRCHackLevel::Automatic;
BiFiltering TextureFiltering = BiFiltering::PS2; BiFiltering TextureFiltering = BiFiltering::PS2;
TexturePreloadingLevel TexturePreloading = TexturePreloadingLevel::Full; TexturePreloadingLevel TexturePreloading = TexturePreloadingLevel::Full;
GSDumpCompressionMethod GSDumpCompression = GSDumpCompressionMethod::Zstandard; GSDumpCompressionMethod GSDumpCompression = GSDumpCompressionMethod::Zstandard;

View File

@ -3185,9 +3185,6 @@ void FullscreenUI::DrawGraphicsSettingsPage()
static constexpr const char* s_auto_flush_options[] = { static constexpr const char* s_auto_flush_options[] = {
"Disabled (Default)", "Enabled (Sprites Only)", "Enabled (All Primitives)"}; "Disabled (Default)", "Enabled (Sprites Only)", "Enabled (All Primitives)"};
DrawIntListSetting(bsi, "CRC Fix Level", "Applies manual fixes to difficult-to-emulate effects in the hardware renderers.",
"EmuCore/GS", "crc_hack_level", static_cast<int>(CRCHackLevel::Automatic), s_crc_fix_options, std::size(s_crc_fix_options),
-1);
DrawIntListSetting(bsi, "Half-Bottom Override", "Control the half-screen fix detection on texture shuffling.", "EmuCore/GS", DrawIntListSetting(bsi, "Half-Bottom Override", "Control the half-screen fix detection on texture shuffling.", "EmuCore/GS",
"UserHacks_Half_Bottom_Override", -1, s_generic_options, std::size(s_generic_options), -1); "UserHacks_Half_Bottom_Override", -1, s_generic_options, std::size(s_generic_options), -1);
DrawIntListSetting(bsi, "CPU Sprite Render Size", "Uses software renderer to draw texture decompression-like sprites.", DrawIntListSetting(bsi, "CPU Sprite Render Size", "Uses software renderer to draw texture decompression-like sprites.",
@ -3208,6 +3205,8 @@ void FullscreenUI::DrawGraphicsSettingsPage()
"UserHacks_DisableDepthSupport", false, manual_hw_fixes); "UserHacks_DisableDepthSupport", false, manual_hw_fixes);
DrawToggleSetting(bsi, "Disable Safe Features", "This option disables multiple safe features.", "EmuCore/GS", DrawToggleSetting(bsi, "Disable Safe Features", "This option disables multiple safe features.", "EmuCore/GS",
"UserHacks_Disable_Safe_Features", false, manual_hw_fixes); "UserHacks_Disable_Safe_Features", false, manual_hw_fixes);
DrawToggleSetting(bsi, "Disable Render Features", "This option disables game-specific render fixes.", "EmuCore/GS",
"UserHacks_DisableRenderFixes", false, manual_hw_fixes);
DrawToggleSetting(bsi, "Preload Frame", "Uploads GS data when rendering a new frame to reproduce some effects accurately.", DrawToggleSetting(bsi, "Preload Frame", "Uploads GS data when rendering a new frame to reproduce some effects accurately.",
"EmuCore/GS", "preload_frame_with_gs_data", false, manual_hw_fixes); "EmuCore/GS", "preload_frame_with_gs_data", false, manual_hw_fixes);
DrawToggleSetting(bsi, "Disable Partial Invalidation", DrawToggleSetting(bsi, "Disable Partial Invalidation",

View File

@ -392,8 +392,6 @@ void ImGuiManager::DrawSettingsOverlay()
APPEND("AF={} ", EmuConfig.GS.MaxAnisotropy); APPEND("AF={} ", EmuConfig.GS.MaxAnisotropy);
if (GSConfig.Dithering != 2) if (GSConfig.Dithering != 2)
APPEND("DI={} ", GSConfig.Dithering); APPEND("DI={} ", GSConfig.Dithering);
if (EmuConfig.GS.CRCHack != CRCHackLevel::Automatic)
APPEND("CRC={} ", static_cast<unsigned>(EmuConfig.GS.CRCHack));
if (GSConfig.UserHacks_HalfBottomOverride >= 0) if (GSConfig.UserHacks_HalfBottomOverride >= 0)
APPEND("HBO={} ", GSConfig.UserHacks_HalfBottomOverride); APPEND("HBO={} ", GSConfig.UserHacks_HalfBottomOverride);
if (GSConfig.UserHacks_HalfPixelOffset > 0) if (GSConfig.UserHacks_HalfPixelOffset > 0)
@ -436,6 +434,8 @@ void ImGuiManager::DrawSettingsOverlay()
APPEND("TPI "); APPEND("TPI ");
if (GSConfig.UserHacks_DisableSafeFeatures) if (GSConfig.UserHacks_DisableSafeFeatures)
APPEND("DSF "); APPEND("DSF ");
if (GSConfig.UserHacks_DisableRenderFixes)
APPEND("DRF ");
if (GSConfig.PreloadFrameWithGSData) if (GSConfig.PreloadFrameWithGSData)
APPEND("PLFD "); APPEND("PLFD ");
if (GSConfig.UserHacks_EstimateTextureRegion) if (GSConfig.UserHacks_EstimateTextureRegion)

View File

@ -774,8 +774,7 @@ void GSUpdateConfig(const Pcsx2Config::GSOptions& new_config)
} }
// Options which aren't using the global struct yet, so we need to recreate all GS objects. // Options which aren't using the global struct yet, so we need to recreate all GS objects.
if ( if (GSConfig.SWExtraThreads != old_config.SWExtraThreads ||
GSConfig.SWExtraThreads != old_config.SWExtraThreads ||
GSConfig.SWExtraThreadsHeight != old_config.SWExtraThreadsHeight) GSConfig.SWExtraThreadsHeight != old_config.SWExtraThreadsHeight)
{ {
if (!GSreopen(false, true, old_config)) if (!GSreopen(false, true, old_config))
@ -784,10 +783,7 @@ void GSUpdateConfig(const Pcsx2Config::GSOptions& new_config)
return; return;
} }
// This is where we would do finer-grained checks in the future. if (GSConfig.UserHacks_DisableRenderFixes != old_config.UserHacks_DisableRenderFixes ||
// For example, flushing the texture cache when mipmap settings change.
if (GSConfig.CRCHack != old_config.CRCHack ||
GSConfig.UpscaleMultiplier != old_config.UpscaleMultiplier || GSConfig.UpscaleMultiplier != old_config.UpscaleMultiplier ||
GSConfig.GetSkipCountFunctionId != old_config.GetSkipCountFunctionId || GSConfig.GetSkipCountFunctionId != old_config.GetSkipCountFunctionId ||
GSConfig.BeforeDrawFunctionId != old_config.BeforeDrawFunctionId) GSConfig.BeforeDrawFunctionId != old_config.BeforeDrawFunctionId)

View File

@ -2587,7 +2587,7 @@ void GSState::SetGameCRC(u32 crc)
void GSState::UpdateCRCHacks() void GSState::UpdateCRCHacks()
{ {
m_game = CRC::Lookup((GSConfig.CRCHack != CRCHackLevel::Off) ? m_crc : 0); m_game = CRC::Lookup(GSConfig.UserHacks_DisableRenderFixes ? 0 : m_crc);
} }
// //

View File

@ -196,11 +196,6 @@ u32 GSUtil::GetChannelMask(u32 spsm)
} }
} }
CRCHackLevel GSUtil::GetRecommendedCRCHackLevel(GSRendererType type)
{
return (type == GSRendererType::DX11 || type == GSRendererType::DX12) ? CRCHackLevel::Full : CRCHackLevel::Partial;
}
GSRendererType GSUtil::GetPreferredRenderer() GSRendererType GSUtil::GetPreferredRenderer()
{ {
#if defined(__APPLE__) #if defined(__APPLE__)

View File

@ -35,7 +35,6 @@ public:
static bool HasSameSwizzleBits(u32 spsm, u32 dpsm); static bool HasSameSwizzleBits(u32 spsm, u32 dpsm);
static u32 GetChannelMask(u32 spsm); static u32 GetChannelMask(u32 spsm);
static CRCHackLevel GetRecommendedCRCHackLevel(GSRendererType type);
static GSRendererType GetPreferredRenderer(); static GSRendererType GetPreferredRenderer();
}; };

View File

@ -19,11 +19,6 @@
#include "GS/GSGL.h" #include "GS/GSGL.h"
static bool s_nativeres; static bool s_nativeres;
static CRCHackLevel s_crc_hack_level = CRCHackLevel::Full;
#define CRC_Partial (s_crc_hack_level >= CRCHackLevel::Partial)
#define CRC_Full (s_crc_hack_level >= CRCHackLevel::Full)
#define CRC_Aggressive (s_crc_hack_level >= CRCHackLevel::Aggressive)
#define RPRIM r.PRIM #define RPRIM r.PRIM
#define RCONTEXT r.m_context #define RCONTEXT r.m_context
@ -64,11 +59,13 @@ bool GSHwHack::GSC_DeathByDegreesTekkenNinaWilliams(GSRendererHW& r, int& skip)
// Upscaling issue similar to Tekken 5. // Upscaling issue similar to Tekken 5.
skip = 1; // Animation pane skip = 1; // Animation pane
} }
else if (CRC_Aggressive && RFBP == 0x3500 && RTPSM == PSMT8 && RFBMSK == 0xFFFF00FF) #if 0
else if (RFBP == 0x3500 && RTPSM == PSMT8 && RFBMSK == 0xFFFF00FF)
{ {
// Needs to be further tested so put it on Aggressive for now, likely channel shuffle. // Needs to be further tested so put it on Aggressive for now, likely channel shuffle.
skip = 4; // Underwater white fog skip = 4; // Underwater white fog
} }
#endif
} }
else else
{ {
@ -532,10 +529,6 @@ bool GSHwHack::GSC_SteambotChronicles(GSRendererHW& r, int& skip)
{ {
skip = 100; // deletes most others(too high deletes the buggy sea completely;c, too low causes glitches to be visible) skip = 100; // deletes most others(too high deletes the buggy sea completely;c, too low causes glitches to be visible)
} }
else if (CRC_Aggressive && RFBP != 0)
{
skip = 19; // "speedhack", makes the game very light, vaporized water can disappear when not looked at directly, possibly some interface still, other value to try: 6 breaks menu background, possibly nothing(?) during gameplay, but it's slower, hence not much of a speedhack anymore
}
} }
} }
@ -1006,66 +999,62 @@ bool GSHwHack::OI_HauntingGround(GSRendererHW& r, GSTexture* rt, GSTexture* ds,
#undef RZMSK #undef RZMSK
#undef RZTST #undef RZTST
#undef CRC_Partial
#undef CRC_Full
#undef CRC_Aggressive
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
#define CRC_F(name, level) { #name, &GSHwHack::name, level } #define CRC_F(name) { #name, &GSHwHack::name }
const GSHwHack::Entry<GSRendererHW::GSC_Ptr> GSHwHack::s_get_skip_count_functions[] = { const GSHwHack::Entry<GSRendererHW::GSC_Ptr> GSHwHack::s_get_skip_count_functions[] = {
CRC_F(GSC_GodHand, CRCHackLevel::Partial), CRC_F(GSC_GodHand),
CRC_F(GSC_KnightsOfTheTemple2, CRCHackLevel::Partial), CRC_F(GSC_KnightsOfTheTemple2),
CRC_F(GSC_Kunoichi, CRCHackLevel::Partial), CRC_F(GSC_Kunoichi),
CRC_F(GSC_Manhunt2, CRCHackLevel::Partial), CRC_F(GSC_Manhunt2),
CRC_F(GSC_MidnightClub3, CRCHackLevel::Partial), CRC_F(GSC_MidnightClub3),
CRC_F(GSC_SacredBlaze, CRCHackLevel::Partial), CRC_F(GSC_SacredBlaze),
CRC_F(GSC_SakuraTaisen, CRCHackLevel::Partial), CRC_F(GSC_SakuraTaisen),
CRC_F(GSC_SakuraWarsSoLongMyLove, CRCHackLevel::Partial), CRC_F(GSC_SakuraWarsSoLongMyLove),
CRC_F(GSC_Simple2000Vol114, CRCHackLevel::Partial), CRC_F(GSC_Simple2000Vol114),
CRC_F(GSC_SFEX3, CRCHackLevel::Partial), CRC_F(GSC_SFEX3),
CRC_F(GSC_TalesOfLegendia, CRCHackLevel::Partial), CRC_F(GSC_TalesOfLegendia),
CRC_F(GSC_TalesofSymphonia, CRCHackLevel::Partial), CRC_F(GSC_TalesofSymphonia),
CRC_F(GSC_UrbanReign, CRCHackLevel::Partial), CRC_F(GSC_UrbanReign),
CRC_F(GSC_ZettaiZetsumeiToshi2, CRCHackLevel::Partial), CRC_F(GSC_ZettaiZetsumeiToshi2),
CRC_F(GSC_BlackAndBurnoutSky, CRCHackLevel::Partial), CRC_F(GSC_BlackAndBurnoutSky),
CRC_F(GSC_BlueTongueGames, CRCHackLevel::Partial), CRC_F(GSC_BlueTongueGames),
CRC_F(GSC_Battlefield2, CRCHackLevel::Partial), CRC_F(GSC_Battlefield2),
CRC_F(GSC_NFSUndercover, CRCHackLevel::Partial), CRC_F(GSC_NFSUndercover),
CRC_F(GSC_PolyphonyDigitalGames, CRCHackLevel::Partial), CRC_F(GSC_PolyphonyDigitalGames),
// Channel Effect // Channel Effect
CRC_F(GSC_GiTS, CRCHackLevel::Partial), CRC_F(GSC_GiTS),
CRC_F(GSC_SteambotChronicles, CRCHackLevel::Partial), CRC_F(GSC_SteambotChronicles),
// Depth Issue // Depth Issue
CRC_F(GSC_BurnoutGames, CRCHackLevel::Partial), CRC_F(GSC_BurnoutGames),
// Half Screen bottom issue // Half Screen bottom issue
CRC_F(GSC_Tekken5, CRCHackLevel::Partial), CRC_F(GSC_Tekken5),
// Texture shuffle // Texture shuffle
CRC_F(GSC_DeathByDegreesTekkenNinaWilliams, CRCHackLevel::Partial), // + Upscaling issues CRC_F(GSC_DeathByDegreesTekkenNinaWilliams), // + Upscaling issues
// Upscaling hacks // Upscaling hacks
CRC_F(GSC_UltramanFightingEvolution, CRCHackLevel::Partial), CRC_F(GSC_UltramanFightingEvolution),
// Accurate Blending // Accurate Blending
CRC_F(GSC_GetawayGames, CRCHackLevel::Partial), CRC_F(GSC_GetawayGames),
}; };
const GSHwHack::Entry<GSRendererHW::OI_Ptr> GSHwHack::s_before_draw_functions[] = { const GSHwHack::Entry<GSRendererHW::OI_Ptr> GSHwHack::s_before_draw_functions[] = {
CRC_F(OI_PointListPalette, CRCHackLevel::Minimum), CRC_F(OI_PointListPalette),
CRC_F(OI_BigMuthaTruckers, CRCHackLevel::Minimum), CRC_F(OI_BigMuthaTruckers),
CRC_F(OI_DBZBTGames, CRCHackLevel::Minimum), CRC_F(OI_DBZBTGames),
CRC_F(OI_FFX, CRCHackLevel::Minimum), CRC_F(OI_FFX),
CRC_F(OI_RozenMaidenGebetGarden, CRCHackLevel::Minimum), CRC_F(OI_RozenMaidenGebetGarden),
CRC_F(OI_SonicUnleashed, CRCHackLevel::Minimum), CRC_F(OI_SonicUnleashed),
CRC_F(OI_ArTonelico2, CRCHackLevel::Minimum), CRC_F(OI_ArTonelico2),
CRC_F(OI_BurnoutGames, CRCHackLevel::Minimum), CRC_F(OI_BurnoutGames),
CRC_F(OI_Battlefield2, CRCHackLevel::Minimum), CRC_F(OI_Battlefield2),
CRC_F(OI_HauntingGround, CRCHackLevel::Minimum) CRC_F(OI_HauntingGround)
}; };
#undef CRC_F #undef CRC_F
@ -1096,28 +1085,22 @@ void GSRendererHW::UpdateCRCHacks()
{ {
GSRenderer::UpdateCRCHacks(); GSRenderer::UpdateCRCHacks();
const CRCHackLevel real_level = (GSConfig.CRCHack == CRCHackLevel::Automatic) ?
GSUtil::GetRecommendedCRCHackLevel(GSConfig.Renderer) : GSConfig.CRCHack;
m_nativeres = (GSConfig.UpscaleMultiplier == 1.0f); m_nativeres = (GSConfig.UpscaleMultiplier == 1.0f);
s_nativeres = m_nativeres; s_nativeres = m_nativeres;
s_crc_hack_level = real_level;
m_gsc = nullptr; m_gsc = nullptr;
m_oi = nullptr; m_oi = nullptr;
if (real_level != CRCHackLevel::Off) if (!GSConfig.UserHacks_DisableRenderFixes)
{ {
if (GSConfig.GetSkipCountFunctionId >= 0 && if (GSConfig.GetSkipCountFunctionId >= 0 &&
static_cast<size_t>(GSConfig.GetSkipCountFunctionId) < std::size(GSHwHack::s_get_skip_count_functions) && static_cast<size_t>(GSConfig.GetSkipCountFunctionId) < std::size(GSHwHack::s_get_skip_count_functions))
real_level >= GSHwHack::s_get_skip_count_functions[GSConfig.GetSkipCountFunctionId].level)
{ {
m_gsc = GSHwHack::s_get_skip_count_functions[GSConfig.GetSkipCountFunctionId].ptr; m_gsc = GSHwHack::s_get_skip_count_functions[GSConfig.GetSkipCountFunctionId].ptr;
} }
if (GSConfig.BeforeDrawFunctionId >= 0 && if (GSConfig.BeforeDrawFunctionId >= 0 &&
static_cast<size_t>(GSConfig.BeforeDrawFunctionId) < std::size(GSHwHack::s_before_draw_functions) && static_cast<size_t>(GSConfig.BeforeDrawFunctionId) < std::size(GSHwHack::s_before_draw_functions))
real_level >= GSHwHack::s_before_draw_functions[GSConfig.BeforeDrawFunctionId].level)
{ {
m_oi = GSHwHack::s_before_draw_functions[GSConfig.BeforeDrawFunctionId].ptr; m_oi = GSHwHack::s_before_draw_functions[GSConfig.BeforeDrawFunctionId].ptr;
} }

View File

@ -61,7 +61,6 @@ public:
{ {
const char* name; const char* name;
F ptr; F ptr;
CRCHackLevel level;
}; };
static const Entry<GSRendererHW::GSC_Ptr> s_get_skip_count_functions[]; static const Entry<GSRendererHW::GSC_Ptr> s_get_skip_count_functions[];

View File

@ -445,6 +445,7 @@ Pcsx2Config::GSOptions::GSOptions()
UserHacks_DisableDepthSupport = false; UserHacks_DisableDepthSupport = false;
UserHacks_DisablePartialInvalidation = false; UserHacks_DisablePartialInvalidation = false;
UserHacks_DisableSafeFeatures = false; UserHacks_DisableSafeFeatures = false;
UserHacks_DisableRenderFixes = false;
UserHacks_MergePPSprite = false; UserHacks_MergePPSprite = false;
UserHacks_WildHack = false; UserHacks_WildHack = false;
UserHacks_BilinearHack = false; UserHacks_BilinearHack = false;
@ -506,7 +507,6 @@ bool Pcsx2Config::GSOptions::OptionsAreEqual(const GSOptions& right) const
OpEqu(HWMipmap) && OpEqu(HWMipmap) &&
OpEqu(AccurateBlendingUnit) && OpEqu(AccurateBlendingUnit) &&
OpEqu(CRCHack) &&
OpEqu(TextureFiltering) && OpEqu(TextureFiltering) &&
OpEqu(TexturePreloading) && OpEqu(TexturePreloading) &&
OpEqu(GSDumpCompression) && OpEqu(GSDumpCompression) &&
@ -662,6 +662,7 @@ void Pcsx2Config::GSOptions::LoadSave(SettingsWrapper& wrap)
GSSettingBoolEx(UserHacks_DisableDepthSupport, "UserHacks_DisableDepthSupport"); GSSettingBoolEx(UserHacks_DisableDepthSupport, "UserHacks_DisableDepthSupport");
GSSettingBoolEx(UserHacks_DisablePartialInvalidation, "UserHacks_DisablePartialInvalidation"); GSSettingBoolEx(UserHacks_DisablePartialInvalidation, "UserHacks_DisablePartialInvalidation");
GSSettingBoolEx(UserHacks_DisableSafeFeatures, "UserHacks_Disable_Safe_Features"); GSSettingBoolEx(UserHacks_DisableSafeFeatures, "UserHacks_Disable_Safe_Features");
GSSettingBoolEx(UserHacks_DisableRenderFixes, "UserHacks_DisableRenderFixes");
GSSettingBoolEx(UserHacks_MergePPSprite, "UserHacks_merge_pp_sprite"); GSSettingBoolEx(UserHacks_MergePPSprite, "UserHacks_merge_pp_sprite");
GSSettingBoolEx(UserHacks_WildHack, "UserHacks_WildHack"); GSSettingBoolEx(UserHacks_WildHack, "UserHacks_WildHack");
GSSettingBoolEx(UserHacks_BilinearHack, "UserHacks_BilinearHack"); GSSettingBoolEx(UserHacks_BilinearHack, "UserHacks_BilinearHack");
@ -703,7 +704,6 @@ void Pcsx2Config::GSOptions::LoadSave(SettingsWrapper& wrap)
GSSettingIntEnumEx(HWMipmap, "mipmap_hw"); GSSettingIntEnumEx(HWMipmap, "mipmap_hw");
GSSettingIntEnumEx(AccurateBlendingUnit, "accurate_blending_unit"); GSSettingIntEnumEx(AccurateBlendingUnit, "accurate_blending_unit");
GSSettingIntEnumEx(CRCHack, "crc_hack_level");
GSSettingIntEnumEx(TextureFiltering, "filter"); GSSettingIntEnumEx(TextureFiltering, "filter");
GSSettingIntEnumEx(TexturePreloading, "texture_preloading"); GSSettingIntEnumEx(TexturePreloading, "texture_preloading");
GSSettingIntEnumEx(GSDumpCompression, "GSDumpCompression"); GSSettingIntEnumEx(GSDumpCompression, "GSDumpCompression");
@ -787,6 +787,7 @@ void Pcsx2Config::GSOptions::MaskUserHacks()
UserHacks_BilinearHack = false; UserHacks_BilinearHack = false;
UserHacks_NativePaletteDraw = false; UserHacks_NativePaletteDraw = false;
UserHacks_DisableSafeFeatures = false; UserHacks_DisableSafeFeatures = false;
UserHacks_DisableRenderFixes = false;
UserHacks_HalfBottomOverride = -1; UserHacks_HalfBottomOverride = -1;
UserHacks_HalfPixelOffset = 0; UserHacks_HalfPixelOffset = 0;
UserHacks_RoundSprite = 0; UserHacks_RoundSprite = 0;

View File

@ -1949,8 +1949,6 @@ void VMManager::WarnAboutUnsafeSettings()
messages += ICON_FA_PAGER " Trilinear filtering is not set to automatic. This may break rendering in some games.\n"; messages += ICON_FA_PAGER " Trilinear filtering is not set to automatic. This may break rendering in some games.\n";
if (EmuConfig.GS.AccurateBlendingUnit <= AccBlendLevel::Minimum) if (EmuConfig.GS.AccurateBlendingUnit <= AccBlendLevel::Minimum)
messages += ICON_FA_BLENDER " Blending is below basic, this may break effects in some games.\n"; messages += ICON_FA_BLENDER " Blending is below basic, this may break effects in some games.\n";
if (EmuConfig.GS.CRCHack != CRCHackLevel::Automatic)
messages += ICON_FA_FIRST_AID " CRC Fix Level is not set to default, this may break effects in some games.\n";
if (EmuConfig.GS.HWDownloadMode != GSHardwareDownloadMode::Enabled) if (EmuConfig.GS.HWDownloadMode != GSHardwareDownloadMode::Enabled)
messages += ICON_FA_DOWNLOAD " Hardware Download Mode is not set to Accurate, this may break rendering in some games.\n"; messages += ICON_FA_DOWNLOAD " Hardware Download Mode is not set to Accurate, this may break rendering in some games.\n";
if (EmuConfig.Cpu.sseMXCSR.GetRoundMode() != SSEround_Chop) if (EmuConfig.Cpu.sseMXCSR.GetRoundMode() != SSEround_Chop)