mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 13:27:45 -07:00
OGL: Don't generate a geometry shader if the backend doesn't support it.
This commit repurposes the bSupportsStereoscopy flag as the bSupportsGeometryShaders flag.
This commit is contained in:
parent
782a5adb94
commit
7e8f96f0d3
@ -449,7 +449,7 @@ VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string &title, con
|
||||
|
||||
// - stereoscopy
|
||||
|
||||
if (vconfig.backend_info.bSupportsStereoscopy && vconfig.iStereoMode > 0)
|
||||
if (vconfig.backend_info.bSupportsGeometryShaders && vconfig.iStereoMode > 0)
|
||||
{
|
||||
wxFlexGridSizer* const szr_stereo = new wxFlexGridSizer(2, 5, 5);
|
||||
|
||||
|
@ -80,7 +80,7 @@ void InitBackendInfo()
|
||||
g_Config.backend_info.bSupportsDualSourceBlend = true;
|
||||
g_Config.backend_info.bSupportsPrimitiveRestart = true;
|
||||
g_Config.backend_info.bSupportsOversizedViewports = false;
|
||||
g_Config.backend_info.bSupportsStereoscopy = true;
|
||||
g_Config.backend_info.bSupportsGeometryShaders = true;
|
||||
g_Config.backend_info.bSupports3DVision = true;
|
||||
|
||||
IDXGIFactory* factory;
|
||||
|
@ -211,7 +211,7 @@ SHADER* ProgramShaderCache::SetShader(DSTALPHA_MODE dstAlphaMode, u32 components
|
||||
ShaderCode gcode;
|
||||
GenerateVertexShaderCode(vcode, components, API_OPENGL);
|
||||
GeneratePixelShaderCode(pcode, dstAlphaMode, API_OPENGL, components);
|
||||
if (!IsPassthroughGeometryShader(uid.guid))
|
||||
if (g_ActiveConfig.backend_info.bSupportsGeometryShaders && !IsPassthroughGeometryShader(uid.guid))
|
||||
GenerateGeometryShaderCode(gcode, primitive_type, API_OPENGL);
|
||||
|
||||
if (g_ActiveConfig.bEnableShaderDebugging)
|
||||
|
@ -498,7 +498,7 @@ Renderer::Renderer()
|
||||
{
|
||||
g_ogl_config.eSupportedGLSLVersion = GLSLES_300;
|
||||
g_ogl_config.bSupportsAEP = false;
|
||||
g_Config.backend_info.bSupportsStereoscopy = false;
|
||||
g_Config.backend_info.bSupportsGeometryShaders = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -506,7 +506,7 @@ Renderer::Renderer()
|
||||
g_ogl_config.bSupportsAEP = GLExtensions::Supports("GL_ANDROID_extension_pack_es31a");
|
||||
g_Config.backend_info.bSupportsBindingLayout = true;
|
||||
g_Config.backend_info.bSupportsEarlyZ = true;
|
||||
g_Config.backend_info.bSupportsStereoscopy = g_ogl_config.bSupportsAEP;
|
||||
g_Config.backend_info.bSupportsGeometryShaders = g_ogl_config.bSupportsAEP;
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -522,13 +522,13 @@ Renderer::Renderer()
|
||||
{
|
||||
g_ogl_config.eSupportedGLSLVersion = GLSL_130;
|
||||
g_Config.backend_info.bSupportsEarlyZ = false; // layout keyword is only supported on glsl150+
|
||||
g_Config.backend_info.bSupportsStereoscopy = false; // geometry shaders are only supported on glsl150+
|
||||
g_Config.backend_info.bSupportsGeometryShaders = false; // geometry shaders are only supported on glsl150+
|
||||
}
|
||||
else if (strstr(g_ogl_config.glsl_version, "1.40"))
|
||||
{
|
||||
g_ogl_config.eSupportedGLSLVersion = GLSL_140;
|
||||
g_Config.backend_info.bSupportsEarlyZ = false; // layout keyword is only supported on glsl150+
|
||||
g_Config.backend_info.bSupportsStereoscopy = false; // geometry shaders are only supported on glsl150+
|
||||
g_Config.backend_info.bSupportsGeometryShaders = false; // geometry shaders are only supported on glsl150+
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -565,7 +565,7 @@ Renderer::Renderer()
|
||||
bSuccess = false;
|
||||
}
|
||||
|
||||
if (g_Config.iStereoMode > 0 && !g_Config.backend_info.bSupportsStereoscopy)
|
||||
if (g_Config.iStereoMode > 0 && !g_Config.backend_info.bSupportsGeometryShaders)
|
||||
OSD::AddMessage("Stereoscopic 3D isn't supported by your GPU, support for OpenGL 3.2 is required.", 10000);
|
||||
|
||||
if (!bSuccess)
|
||||
|
@ -139,7 +139,7 @@ static void InitBackendInfo()
|
||||
//g_Config.backend_info.bSupportsDualSourceBlend = true; // is gpu dependent and must be set in renderer
|
||||
//g_Config.backend_info.bSupportsEarlyZ = true; // is gpu dependent and must be set in renderer
|
||||
g_Config.backend_info.bSupportsOversizedViewports = true;
|
||||
g_Config.backend_info.bSupportsStereoscopy = true;
|
||||
g_Config.backend_info.bSupportsGeometryShaders = true;
|
||||
g_Config.backend_info.bSupports3DVision = false;
|
||||
|
||||
g_Config.backend_info.Adapters.clear();
|
||||
|
@ -214,7 +214,7 @@ void VideoConfig::VerifyValidity()
|
||||
// TODO: Check iMaxAnisotropy value
|
||||
if (iAdapter < 0 || iAdapter > ((int)backend_info.Adapters.size() - 1)) iAdapter = 0;
|
||||
if (iMultisampleMode < 0 || iMultisampleMode >= (int)backend_info.AAModes.size()) iMultisampleMode = 0;
|
||||
if (!backend_info.bSupportsStereoscopy) iStereoMode = 0;
|
||||
if (!backend_info.bSupportsGeometryShaders) iStereoMode = 0;
|
||||
}
|
||||
|
||||
void VideoConfig::Save(const std::string& ini_file)
|
||||
|
@ -151,7 +151,7 @@ struct VideoConfig final
|
||||
bool bSupportsDualSourceBlend;
|
||||
bool bSupportsPrimitiveRestart;
|
||||
bool bSupportsOversizedViewports;
|
||||
bool bSupportsStereoscopy;
|
||||
bool bSupportsGeometryShaders;
|
||||
bool bSupports3DVision;
|
||||
bool bSupportsEarlyZ; // needed by PixelShaderGen, so must stay in VideoCommon
|
||||
bool bSupportsBindingLayout; // Needed by ShaderGen, so must stay in VideoCommon
|
||||
|
Loading…
Reference in New Issue
Block a user