Enable BuiltIn input in the shader graph builder

BuiltIn inputs shouldnt be translated into a code input. We comment the
input line for this variables

Change-Id: I3b7d2fd06afc6a122d90a999fc5a5246fc93234e
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
This commit is contained in:
Juan Jose Casafranca 2018-03-17 15:47:01 +01:00 committed by Rafael Roquetto
parent 436a6fbb83
commit 95c8f24b71
3 changed files with 9 additions and 0 deletions

View File

@ -61,6 +61,8 @@ namespace
return ""; // Although fragment shaders for <=2 only have fixed outputs
case QShaderLanguage::Uniform:
return "uniform";
case QShaderLanguage::BuiltIn:
return "//";
}
} else {
switch (qualifier) {
@ -72,6 +74,8 @@ namespace
return "out";
case QShaderLanguage::Uniform:
return "uniform";
case QShaderLanguage::BuiltIn:
return "//";
}
}

View File

@ -64,6 +64,7 @@ namespace QShaderLanguage
enum StorageQualifier : char {
Const = 1,
Input,
BuiltIn,
Output,
Uniform
};

View File

@ -372,6 +372,8 @@ namespace {
return "const";
case QShaderLanguage::Input:
return "varying";
case QShaderLanguage::BuiltIn:
return "//";
case QShaderLanguage::Output:
return ""; // Although fragment shaders for <=2 only have fixed outputs
case QShaderLanguage::Uniform:
@ -383,6 +385,8 @@ namespace {
return "const";
case QShaderLanguage::Input:
return "in";
case QShaderLanguage::BuiltIn:
return "//";
case QShaderLanguage::Output:
return "out";
case QShaderLanguage::Uniform: