Fixed shadows and GI for mesa drivers.

The check for GL_ARB_geometry_shader4 doesn't have sense at all because we don't use this extension and our geometry shaders use functionality which is available in core OpenGL 3.2.

The reason that it wasn't working for older mesa versions must be a bug in mesa or maybe missing other functionality (but not GL_ARB_geometry_shader4).

I checked it with mesa 11.2 and current git version and it works fine on intel, nouveau and with software rendering.

It needs some testing because it potentially affects all drivers with OpenGL >= 3.2 on every platform.

If someone could test it with Radeon drivers, I would be really happy to enable it in upcoming release, at least on linux.
This commit is contained in:
Deve 2016-05-18 22:18:24 +02:00
parent 9a815b4e65
commit edfc7d285c
4 changed files with 8 additions and 7 deletions

View File

@ -5,6 +5,7 @@
<card is="Intel(R) HD Graphics 3000" os="windows" disable="FramebufferSRGBWorking"/>
<card contains="Intel" os="osx" disable="GI"/>
<card contains="Intel" os="linux" version="<11.2" disable="ComputeShader"/>
<card contains="Intel" os="linux" version="<11.2" disable="GeometryShader"/>
<card contains="Intel" os="linux" version="<16.0" disable="FramebufferSRGBCapable"/>
<card contains="Intel" os="linux" version="<11.2" disable="TextureCompressionS3TC"/>
<card contains="Intel" os="windows" disable="TextureCompressionS3TC"/>
@ -15,11 +16,11 @@
<card contains="NVIDIA" disable="ShaderAtomicCounters"/>
<card contains="Mesa" os="linux" version="<10.3" disable="BufferStorage"/>
<card contains="Mesa" os="linux" version="<10.3" disable="DriverRecentEnough"/>
<card contains="Mesa" os="linux" version="<10.6" disable="GeometryShader4"/>
<card contains="Mesa" os="linux" version="<11.2" disable="GeometryShader"/>
<card contains="Mesa" os="linux" version="<11.2" disable="TextureCompressionS3TC"/>
<card contains="Gallium" os="linux" version="<10.3" disable="BufferStorage"/>
<card contains="Gallium" os="linux" version="<10.3" disable="DriverRecentEnough"/>
<card contains="Gallium" os="linux" version="<10.6" disable="GeometryShader4"/>
<card contains="Gallium" os="linux" version="<11.2" disable="GeometryShader"/>
<card contains="Gallium" os="linux" version="<11.2" disable="TextureCompressionS3TC"/>
<!-- On osx radeon appears to have different version numbers, e.g.
1.32.20 -->

View File

@ -154,10 +154,10 @@ void CentralVideoSettings::init()
hasUBO = true;
Log::info("GLDriver", "ARB Uniform Buffer Object Present");
}
if (!GraphicsRestrictions::isDisabled(GraphicsRestrictions::GR_GEOMETRY_SHADER4) &&
hasGLExtension("GL_ARB_geometry_shader4")) {
if (!GraphicsRestrictions::isDisabled(GraphicsRestrictions::GR_GEOMETRY_SHADER) &&
(m_gl_major_version > 3 || (m_gl_major_version == 3 && m_gl_minor_version >= 2))) {
hasGS = true;
Log::info("GLDriver", "ARB Geometry Shader 4 Present");
Log::info("GLDriver", "Geometry Shaders Present");
}
// Only unset the high def textures if they are set as default. If the

View File

@ -41,7 +41,7 @@ namespace GraphicsRestrictions
const char *m_names_of_restrictions[] = {
"UniformBufferObject",
"GeometryShader4",
"GeometryShader",
"DrawIndirect",
"TextureView",
"TextureStorage",

View File

@ -35,7 +35,7 @@ namespace GraphicsRestrictions
enum GraphicsRestrictionsType
{
GR_UNIFORM_BUFFER_OBJECT,
GR_GEOMETRY_SHADER4,
GR_GEOMETRY_SHADER,
GR_DRAW_INDIRECT,
GR_TEXTURE_VIEW,
GR_TEXTURE_STORAGE,