Make vulkan-flavored GLSL known to QShaderFormat

Change-Id: I6a3799c35aafa38095b316ee01d14b9db3af5e04
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
This commit is contained in:
Jean-Michaël Celerier 2020-03-12 15:20:47 +01:00
parent 65a7648329
commit 6dbe03c4d1
2 changed files with 4 additions and 2 deletions

View File

@ -66,7 +66,8 @@ public:
OpenGLNoProfile,
OpenGLCoreProfile,
OpenGLCompatibilityProfile,
OpenGLES
OpenGLES,
VulkanFlavoredGLSL
};
enum ShaderType : int {

View File

@ -217,9 +217,10 @@ void QShaderNodesLoader::load(const QJsonObject &prototypesObject)
: api == QStringLiteral("OpenGLNoProfile") ? QShaderFormat::OpenGLNoProfile
: api == QStringLiteral("OpenGLCoreProfile") ? QShaderFormat::OpenGLCoreProfile
: api == QStringLiteral("OpenGLCompatibilityProfile") ? QShaderFormat::OpenGLCompatibilityProfile
: api == QStringLiteral("VulkanFlavoredGLSL") ? QShaderFormat::VulkanFlavoredGLSL
: QShaderFormat::NoApi);
if (format.api() == QShaderFormat::NoApi) {
qWarning() << "Format API must be one of: OpenGLES, OpenGLNoProfile, OpenGLCoreProfile or OpenGLCompatibilityProfile";
qWarning() << "Format API must be one of: OpenGLES, OpenGLNoProfile, OpenGLCoreProfile or OpenGLCompatibilityProfile, VulkanFlavoredGLSL";
hasError = true;
break;
}