videoconfig: add BBoxPreferStencilImplementation

@JMC47 requested this to be able to do performance comparisons.
This commit is contained in:
Michael Maltese
2017-03-10 00:07:49 -08:00
parent 53224d41d0
commit 134317e07f
5 changed files with 18 additions and 11 deletions

View File

@ -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;