mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
videoconfig: add BBoxPreferStencilImplementation
@JMC47 requested this to be able to do performance comparisons.
This commit is contained in:
@ -171,8 +171,7 @@ PixelShaderUid GetPixelShaderUid()
|
||||
uid_data->genMode_numtevstages = bpmem.genMode.numtevstages;
|
||||
uid_data->genMode_numtexgens = bpmem.genMode.numtexgens;
|
||||
uid_data->per_pixel_lighting = g_ActiveConfig.bEnablePixelLighting;
|
||||
uid_data->bounding_box = g_ActiveConfig.backend_info.bSupportsBBox &&
|
||||
g_ActiveConfig.backend_info.bSupportsFragmentStoresAndAtomics &&
|
||||
uid_data->bounding_box = g_ActiveConfig.BBoxUseFragmentShaderImplementation() &&
|
||||
g_ActiveConfig.bBBoxEnable && BoundingBox::active;
|
||||
uid_data->rgba6_format =
|
||||
bpmem.zcontrol.pixel_format == PEControl::RGBA6_Z24 && !g_ActiveConfig.bForceTrueColor;
|
||||
|
@ -119,6 +119,7 @@ void VideoConfig::Load(const std::string& ini_file)
|
||||
IniFile::Section* hacks = iniFile.GetOrCreateSection("Hacks");
|
||||
hacks->Get("EFBAccessEnable", &bEFBAccessEnable, true);
|
||||
hacks->Get("BBoxEnable", &bBBoxEnable, false);
|
||||
hacks->Get("BBoxPreferStencilImplementation", &bBBoxPreferStencilImplementation, false);
|
||||
hacks->Get("ForceProgressive", &bForceProgressive, true);
|
||||
hacks->Get("EFBToTextureEnable", &bSkipEFBCopyToRam, true);
|
||||
hacks->Get("EFBScaledCopy", &bCopyEFBScaled, true);
|
||||
@ -342,6 +343,7 @@ void VideoConfig::Save(const std::string& ini_file)
|
||||
IniFile::Section* hacks = iniFile.GetOrCreateSection("Hacks");
|
||||
hacks->Set("EFBAccessEnable", bEFBAccessEnable);
|
||||
hacks->Set("BBoxEnable", bBBoxEnable);
|
||||
hacks->Set("BBoxPreferStencilImplementation", bBBoxPreferStencilImplementation);
|
||||
hacks->Set("ForceProgressive", bForceProgressive);
|
||||
hacks->Set("EFBToTextureEnable", bSkipEFBCopyToRam);
|
||||
hacks->Set("EFBScaledCopy", bCopyEFBScaled);
|
||||
|
@ -114,6 +114,7 @@ struct VideoConfig final
|
||||
bool bEFBAccessEnable;
|
||||
bool bPerfQueriesEnable;
|
||||
bool bBBoxEnable;
|
||||
bool bBBoxPreferStencilImplementation; // OpenGL-only, to see how slow it is compared to SSBOs
|
||||
bool bForceProgressive;
|
||||
|
||||
bool bEFBEmulateFormatChanges;
|
||||
@ -203,6 +204,12 @@ struct VideoConfig final
|
||||
{
|
||||
return backend_info.bSupportsExclusiveFullscreen && !bBorderlessFullscreen;
|
||||
}
|
||||
bool BBoxUseFragmentShaderImplementation() const
|
||||
{
|
||||
if (backend_info.api_type == APIType::OpenGL && bBBoxPreferStencilImplementation)
|
||||
return false;
|
||||
return backend_info.bSupportsBBox && backend_info.bSupportsFragmentStoresAndAtomics;
|
||||
}
|
||||
};
|
||||
|
||||
extern VideoConfig g_Config;
|
||||
|
Reference in New Issue
Block a user