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

View File

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

View File

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