This commit is contained in:
hiker 2016-05-24 17:37:28 +10:00
commit 5f6f1ec448
7 changed files with 24 additions and 5 deletions

View File

@ -2,6 +2,7 @@
* Ghost replay races by Benau
* Battle mode AI by Benau
* Soccer mode AI by Benau
* New icy soccer field by samuncle and Benau
* New subsea track by samuncle
* New volcano track by Ponzino
* TTF font rendering by Benau

View File

@ -46,6 +46,7 @@ void CentralVideoSettings::init()
hasMultiDrawIndirect = false;
hasTextureCompression = false;
hasUBO = false;
hasExplicitAttribLocation = false;
hasGS = false;
m_GI_has_artifact = false;
@ -154,6 +155,11 @@ void CentralVideoSettings::init()
hasUBO = true;
Log::info("GLDriver", "ARB Uniform Buffer Object Present");
}
if (!GraphicsRestrictions::isDisabled(GraphicsRestrictions::GR_EXPLICIT_ATTRIB_LOCATION) &&
hasGLExtension("GL_ARB_explicit_attrib_location")) {
hasExplicitAttribLocation = true;
Log::info("GLDriver", "ARB Explicit Attrib Location Present");
}
if (!GraphicsRestrictions::isDisabled(GraphicsRestrictions::GR_GEOMETRY_SHADER) &&
(m_gl_major_version > 3 || (m_gl_major_version == 3 && m_gl_minor_version >= 2))) {
hasGS = true;
@ -229,7 +235,7 @@ bool CentralVideoSettings::needsSRGBCapableVisualWorkaround() const
return m_need_srgb_visual_workaround;
}
bool CentralVideoSettings::isARBGeometryShader4Usable() const
bool CentralVideoSettings::isARBGeometryShadersUsable() const
{
return hasGS;
}
@ -239,6 +245,11 @@ bool CentralVideoSettings::isARBUniformBufferObjectUsable() const
return hasUBO;
}
bool CentralVideoSettings::isARBExplicitAttribLocationUsable() const
{
return hasExplicitAttribLocation;
}
bool CentralVideoSettings::isEXTTextureCompressionS3TCUsable() const
{
return hasTextureCompression;
@ -311,12 +322,12 @@ bool CentralVideoSettings::isARBMultiDrawIndirectUsable() const
bool CentralVideoSettings::supportsShadows() const
{
return isARBGeometryShader4Usable() && isARBUniformBufferObjectUsable();
return isARBGeometryShadersUsable() && isARBUniformBufferObjectUsable() && isARBExplicitAttribLocationUsable();
}
bool CentralVideoSettings::supportsGlobalIllumination() const
{
return isARBGeometryShader4Usable() && isARBUniformBufferObjectUsable() && !m_GI_has_artifact;
return isARBGeometryShadersUsable() && isARBUniformBufferObjectUsable() && isARBExplicitAttribLocationUsable() && !m_GI_has_artifact;
}
bool CentralVideoSettings::supportsIndirectInstancingRendering() const

View File

@ -35,6 +35,7 @@ private:
bool hasTextureView;
bool hasBindlessTexture;
bool hasUBO;
bool hasExplicitAttribLocation;
bool hasGS;
bool hasTextureCompression;
bool hasAtomics;
@ -60,7 +61,7 @@ public:
bool isARBUniformBufferObjectUsable() const;
bool isEXTTextureCompressionS3TCUsable() const;
bool isARBTextureViewUsable() const;
bool isARBGeometryShader4Usable() const;
bool isARBGeometryShadersUsable() const;
bool isARBTextureStorageUsable() const;
bool isAMDVertexShaderLayerUsable() const;
bool isARBComputeShaderUsable() const;
@ -73,6 +74,7 @@ public:
bool isARBShaderStorageBufferObjectUsable() const;
bool isARBImageLoadStoreUsable() const;
bool isARBMultiDrawIndirectUsable() const;
bool isARBExplicitAttribLocationUsable() const;
// Are all required extensions available for feature support

View File

@ -56,6 +56,7 @@ namespace GraphicsRestrictions
"BindlessTexture",
"TextureCompressionS3TC",
"AMDVertexShaderLayer",
"ExplicitAttribLocation",
"DriverRecentEnough",
"HighDefinitionTextures",
"AdvancedPipeline",

View File

@ -50,6 +50,7 @@ namespace GraphicsRestrictions
GR_BINDLESS_TEXTURE,
GR_EXT_TEXTURE_COMPRESSION_S3TC,
GR_AMD_VERTEX_SHADER_LAYER,
GR_EXPLICIT_ATTRIB_LOCATION,
GR_DRIVER_RECENT_ENOUGH,
GR_HIGHDEFINITION_TEXTURES,
GR_ADVANCED_PIPELINE,

View File

@ -674,7 +674,7 @@ void IrrDriver::renderGlow(std::vector<GlowData>& glows)
node->render();
}
if (CVS->supportsIndirectInstancingRendering())
if (CVS->supportsIndirectInstancingRendering() && CVS->isARBExplicitAttribLocationUsable())
{
glBindBuffer(GL_DRAW_INDIRECT_BUFFER, GlowPassCmd::getInstance()->drawindirectcmd);
InstancedColorizeShader::getInstance()->use();

View File

@ -83,6 +83,9 @@ GLuint ShaderBase::loadShader(const std::string &file, unsigned type)
if (CVS->isAMDVertexShaderLayerUsable())
code << "#extension GL_AMD_vertex_shader_layer : enable\n";
if (CVS->isARBExplicitAttribLocationUsable())
code << "#extension GL_ARB_explicit_attrib_location : enable\n";
if (CVS->isAZDOEnabled())
{