Special case to work around upstream bug in gl.spec
This commit fixes glTexImage3D to be non-deprecated. This function is incorrectly marked as deprecated in gl.spec. For more info see https://www.khronos.org/bugzilla/show_bug.cgi?id=449 Change-Id: Ic9021b184a10d1b162158a3476b7272f4c6917fd Reviewed-by: James Turner <james.turner@kdab.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
This commit is contained in:
parent
f46787b48a
commit
13a3e08c25
@ -253,7 +253,7 @@ void SpecParser::parseFunctions(QTextStream &stream)
|
||||
// Extract the OpenGL version in which this function was deprecated.
|
||||
// If it is OpenGL 3.1 then it must be a compatibility profile function
|
||||
QString deprecatedVersion = deprecatedRegExp.cap(1).simplified();
|
||||
if (deprecatedVersion == QStringLiteral("3.1"))
|
||||
if (deprecatedVersion == QStringLiteral("3.1") && !inDeprecationException(currentFunction.name))
|
||||
currentVersionProfile.profile = VersionProfile::CompatibilityProfile;
|
||||
|
||||
} else if (categoryRegExp.indexIn(line) != -1) {
|
||||
@ -305,3 +305,8 @@ void SpecParser::parseFunctions(QTextStream &stream)
|
||||
m_versions = versions.toList();
|
||||
qSort(m_versions);
|
||||
}
|
||||
|
||||
bool SpecParser::inDeprecationException(const QString &functionName) const
|
||||
{
|
||||
return (functionName == QStringLiteral("TexImage3D"));
|
||||
}
|
||||
|
@ -192,6 +192,7 @@ protected:
|
||||
bool parseTypeMap();
|
||||
void parseEnums();
|
||||
void parseFunctions(QTextStream &stream);
|
||||
bool inDeprecationException(const QString &functionName) const;
|
||||
|
||||
private:
|
||||
QString m_specFileName;
|
||||
|
Loading…
Reference in New Issue
Block a user