From 13a3e08c25a79520abdf4852e6e5e0b2122b78b7 Mon Sep 17 00:00:00 2001 From: Sean Harmer Date: Thu, 4 Apr 2013 10:36:42 +0100 Subject: Special case to work around upstream bug in gl.spec MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Samuel Rødal --- util/glgen/specparser.cpp | 7 ++++++- util/glgen/specparser.h | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'util/glgen') diff --git a/util/glgen/specparser.cpp b/util/glgen/specparser.cpp index 514a700644..91a906bca9 100644 --- a/util/glgen/specparser.cpp +++ b/util/glgen/specparser.cpp @@ -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")); +} diff --git a/util/glgen/specparser.h b/util/glgen/specparser.h index e455f6579c..19357841ca 100644 --- a/util/glgen/specparser.h +++ b/util/glgen/specparser.h @@ -192,6 +192,7 @@ protected: bool parseTypeMap(); void parseEnums(); void parseFunctions(QTextStream &stream); + bool inDeprecationException(const QString &functionName) const; private: QString m_specFileName; -- cgit v1.2.3