Commit 7e997e26 by John Kessenich

HLSL: Implicit bool conversions for conditional expressions and related.

Covers if(cond), while(cond), do-while(cond), for(;cond;), and (cond ? :). Fixes #778.
parent 8f9fdc98
...@@ -9,7 +9,7 @@ gl_FragCoord origin is upper left ...@@ -9,7 +9,7 @@ gl_FragCoord origin is upper left
0:11 Test condition and select ( temp void) 0:11 Test condition and select ( temp void)
0:11 Condition 0:11 Condition
0:11 Constant: 0:11 Constant:
0:11 0 (const int) 0:11 false (const bool)
0:11 true case is null 0:11 true case is null
0:2 Function Definition: PixelShaderFunction( ( temp void) 0:2 Function Definition: PixelShaderFunction( ( temp void)
0:2 Function Parameters: 0:2 Function Parameters:
...@@ -36,7 +36,7 @@ gl_FragCoord origin is upper left ...@@ -36,7 +36,7 @@ gl_FragCoord origin is upper left
0:11 Test condition and select ( temp void) 0:11 Test condition and select ( temp void)
0:11 Condition 0:11 Condition
0:11 Constant: 0:11 Constant:
0:11 0 (const int) 0:11 false (const bool)
0:11 true case is null 0:11 true case is null
0:2 Function Definition: PixelShaderFunction( ( temp void) 0:2 Function Definition: PixelShaderFunction( ( temp void)
0:2 Function Parameters: 0:2 Function Parameters:
...@@ -71,8 +71,8 @@ gl_FragCoord origin is upper left ...@@ -71,8 +71,8 @@ gl_FragCoord origin is upper left
7: TypeVector 6(float) 4 7: TypeVector 6(float) 4
8: TypePointer Function 7(fvec4) 8: TypePointer Function 7(fvec4)
9: TypeFunction 2 8(ptr) 9: TypeFunction 2 8(ptr)
13: TypeInt 32 1 13: TypeBool
14: 13(int) Constant 0 14: 13(bool) ConstantFalse
18: TypePointer Input 7(fvec4) 18: TypePointer Input 7(fvec4)
19(input): 18(ptr) Variable Input 19(input): 18(ptr) Variable Input
4(PixelShaderFunction): 2 Function None 3 4(PixelShaderFunction): 2 Function None 3
......
...@@ -25,10 +25,11 @@ gl_FragCoord origin is upper left ...@@ -25,10 +25,11 @@ gl_FragCoord origin is upper left
0:9 2 (const int) 0:9 2 (const int)
0:10 Test condition and select ( temp void) 0:10 Test condition and select ( temp void)
0:10 Condition 0:10 Condition
0:10 direct index ( temp float) 0:10 Convert float to bool ( temp bool)
0:10 'input' ( in 4-component vector of float) 0:10 direct index ( temp float)
0:10 Constant: 0:10 'input' ( in 4-component vector of float)
0:10 0 (const int) 0:10 Constant:
0:10 0 (const int)
0:10 true case 0:10 true case
0:11 Branch: Kill 0:11 Branch: Kill
0:12 Sequence 0:12 Sequence
...@@ -80,10 +81,11 @@ gl_FragCoord origin is upper left ...@@ -80,10 +81,11 @@ gl_FragCoord origin is upper left
0:9 2 (const int) 0:9 2 (const int)
0:10 Test condition and select ( temp void) 0:10 Test condition and select ( temp void)
0:10 Condition 0:10 Condition
0:10 direct index ( temp float) 0:10 Convert float to bool ( temp bool)
0:10 'input' ( in 4-component vector of float) 0:10 direct index ( temp float)
0:10 Constant: 0:10 'input' ( in 4-component vector of float)
0:10 0 (const int) 0:10 Constant:
0:10 0 (const int)
0:10 true case 0:10 true case
0:11 Branch: Kill 0:11 Branch: Kill
0:12 Sequence 0:12 Sequence
...@@ -107,12 +109,12 @@ gl_FragCoord origin is upper left ...@@ -107,12 +109,12 @@ gl_FragCoord origin is upper left
// Module Version 10000 // Module Version 10000
// Generated by (magic number): 80001 // Generated by (magic number): 80001
// Id's are bound by 48 // Id's are bound by 50
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "PixelShaderFunction" 43 EntryPoint Fragment 4 "PixelShaderFunction" 45
ExecutionMode 4 OriginUpperLeft ExecutionMode 4 OriginUpperLeft
Name 4 "PixelShaderFunction" Name 4 "PixelShaderFunction"
Name 10 "foo(f1;" Name 10 "foo(f1;"
...@@ -120,11 +122,11 @@ gl_FragCoord origin is upper left ...@@ -120,11 +122,11 @@ gl_FragCoord origin is upper left
Name 16 "@PixelShaderFunction(vf4;" Name 16 "@PixelShaderFunction(vf4;"
Name 15 "input" Name 15 "input"
Name 25 "param" Name 25 "param"
Name 37 "f" Name 39 "f"
Name 41 "input"
Name 43 "input" Name 43 "input"
Name 45 "param" Name 45 "input"
Decorate 43(input) Location 0 Name 47 "param"
Decorate 45(input) Location 0
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32
...@@ -138,17 +140,18 @@ gl_FragCoord origin is upper left ...@@ -138,17 +140,18 @@ gl_FragCoord origin is upper left
26: TypeInt 32 0 26: TypeInt 32 0
27: 26(int) Constant 2 27: 26(int) Constant 2
31: 26(int) Constant 0 31: 26(int) Constant 0
42: TypePointer Input 12(fvec4) 34: 6(float) Constant 0
43(input): 42(ptr) Variable Input 44: TypePointer Input 12(fvec4)
45(input): 44(ptr) Variable Input
4(PixelShaderFunction): 2 Function None 3 4(PixelShaderFunction): 2 Function None 3
5: Label 5: Label
41(input): 13(ptr) Variable Function 43(input): 13(ptr) Variable Function
45(param): 13(ptr) Variable Function 47(param): 13(ptr) Variable Function
44: 12(fvec4) Load 43(input) 46: 12(fvec4) Load 45(input)
Store 41(input) 44 Store 43(input) 46
46: 12(fvec4) Load 41(input) 48: 12(fvec4) Load 43(input)
Store 45(param) 46 Store 47(param) 48
47: 2 FunctionCall 16(@PixelShaderFunction(vf4;) 45(param) 49: 2 FunctionCall 16(@PixelShaderFunction(vf4;) 47(param)
Return Return
FunctionEnd FunctionEnd
10(foo(f1;): 2 Function None 8 10(foo(f1;): 2 Function None 8
...@@ -167,20 +170,21 @@ gl_FragCoord origin is upper left ...@@ -167,20 +170,21 @@ gl_FragCoord origin is upper left
15(input): 13(ptr) FunctionParameter 15(input): 13(ptr) FunctionParameter
17: Label 17: Label
25(param): 7(ptr) Variable Function 25(param): 7(ptr) Variable Function
37(f): 7(ptr) Variable Function 39(f): 7(ptr) Variable Function
28: 7(ptr) AccessChain 15(input) 27 28: 7(ptr) AccessChain 15(input) 27
29: 6(float) Load 28 29: 6(float) Load 28
Store 25(param) 29 Store 25(param) 29
30: 2 FunctionCall 10(foo(f1;) 25(param) 30: 2 FunctionCall 10(foo(f1;) 25(param)
32: 7(ptr) AccessChain 15(input) 31 32: 7(ptr) AccessChain 15(input) 31
33: 6(float) Load 32 33: 6(float) Load 32
SelectionMerge 35 None 35: 20(bool) FOrdNotEqual 33 34
BranchConditional 33 34 35 SelectionMerge 37 None
34: Label BranchConditional 35 36 37
36: Label
Kill Kill
35: Label 37: Label
38: 7(ptr) AccessChain 15(input) 31 40: 7(ptr) AccessChain 15(input) 31
39: 6(float) Load 38 41: 6(float) Load 40
Store 37(f) 39 Store 39(f) 41
Kill Kill
FunctionEnd FunctionEnd
...@@ -69,12 +69,13 @@ gl_FragCoord origin is upper left ...@@ -69,12 +69,13 @@ gl_FragCoord origin is upper left
0:26 'input' ( in 4-component vector of float) 0:26 'input' ( in 4-component vector of float)
0:30 Test condition and select ( temp void) 0:30 Test condition and select ( temp void)
0:30 Condition 0:30 Condition
0:30 move second child to first child ( temp float) 0:30 Convert float to bool ( temp bool)
0:30 'ii' ( temp float) 0:30 move second child to first child ( temp float)
0:30 direct index ( temp float) 0:30 'ii' ( temp float)
0:30 'input' ( in 4-component vector of float) 0:30 direct index ( temp float)
0:30 Constant: 0:30 'input' ( in 4-component vector of float)
0:30 2 (const int) 0:30 Constant:
0:30 2 (const int)
0:30 true case 0:30 true case
0:31 Pre-Increment ( temp float) 0:31 Pre-Increment ( temp float)
0:31 'ii' ( temp float) 0:31 'ii' ( temp float)
...@@ -178,12 +179,13 @@ gl_FragCoord origin is upper left ...@@ -178,12 +179,13 @@ gl_FragCoord origin is upper left
0:26 'input' ( in 4-component vector of float) 0:26 'input' ( in 4-component vector of float)
0:30 Test condition and select ( temp void) 0:30 Test condition and select ( temp void)
0:30 Condition 0:30 Condition
0:30 move second child to first child ( temp float) 0:30 Convert float to bool ( temp bool)
0:30 'ii' ( temp float) 0:30 move second child to first child ( temp float)
0:30 direct index ( temp float) 0:30 'ii' ( temp float)
0:30 'input' ( in 4-component vector of float) 0:30 direct index ( temp float)
0:30 Constant: 0:30 'input' ( in 4-component vector of float)
0:30 2 (const int) 0:30 Constant:
0:30 2 (const int)
0:30 true case 0:30 true case
0:31 Pre-Increment ( temp float) 0:31 Pre-Increment ( temp float)
0:31 'ii' ( temp float) 0:31 'ii' ( temp float)
...@@ -215,24 +217,24 @@ gl_FragCoord origin is upper left ...@@ -215,24 +217,24 @@ gl_FragCoord origin is upper left
// Module Version 10000 // Module Version 10000
// Generated by (magic number): 80001 // Generated by (magic number): 80001
// Id's are bound by 101 // Id's are bound by 103
Capability Shader Capability Shader
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "PixelShaderFunction" 94 97 EntryPoint Fragment 4 "PixelShaderFunction" 96 99
ExecutionMode 4 OriginUpperLeft ExecutionMode 4 OriginUpperLeft
Name 4 "PixelShaderFunction" Name 4 "PixelShaderFunction"
Name 11 "@PixelShaderFunction(vf4;" Name 11 "@PixelShaderFunction(vf4;"
Name 10 "input" Name 10 "input"
Name 68 "ii" Name 68 "ii"
Name 80 "ii" Name 82 "ii"
Name 92 "input"
Name 94 "input" Name 94 "input"
Name 97 "@entryPointOutput" Name 96 "input"
Name 98 "param" Name 99 "@entryPointOutput"
Decorate 94(input) Location 0 Name 100 "param"
Decorate 97(@entryPointOutput) Location 0 Decorate 96(input) Location 0
Decorate 99(@entryPointOutput) Location 0
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32
...@@ -244,31 +246,32 @@ gl_FragCoord origin is upper left ...@@ -244,31 +246,32 @@ gl_FragCoord origin is upper left
67: TypePointer Function 6(float) 67: TypePointer Function 6(float)
69: TypeInt 32 0 69: TypeInt 32 0
70: 69(int) Constant 2 70: 69(int) Constant 2
76: 6(float) Constant 1065353216 73: 6(float) Constant 0
78: TypeInt 32 1 78: 6(float) Constant 1065353216
79: TypePointer Function 78(int) 80: TypeInt 32 1
82: 78(int) Constant 1 81: TypePointer Function 80(int)
93: TypePointer Input 7(fvec4) 84: 80(int) Constant 1
94(input): 93(ptr) Variable Input 95: TypePointer Input 7(fvec4)
96: TypePointer Output 7(fvec4) 96(input): 95(ptr) Variable Input
97(@entryPointOutput): 96(ptr) Variable Output 98: TypePointer Output 7(fvec4)
99(@entryPointOutput): 98(ptr) Variable Output
4(PixelShaderFunction): 2 Function None 3 4(PixelShaderFunction): 2 Function None 3
5: Label 5: Label
92(input): 8(ptr) Variable Function 94(input): 8(ptr) Variable Function
98(param): 8(ptr) Variable Function 100(param): 8(ptr) Variable Function
95: 7(fvec4) Load 94(input) 97: 7(fvec4) Load 96(input)
Store 92(input) 95 Store 94(input) 97
99: 7(fvec4) Load 92(input) 101: 7(fvec4) Load 94(input)
Store 98(param) 99 Store 100(param) 101
100: 7(fvec4) FunctionCall 11(@PixelShaderFunction(vf4;) 98(param) 102: 7(fvec4) FunctionCall 11(@PixelShaderFunction(vf4;) 100(param)
Store 97(@entryPointOutput) 100 Store 99(@entryPointOutput) 102
Return Return
FunctionEnd FunctionEnd
11(@PixelShaderFunction(vf4;): 7(fvec4) Function None 9 11(@PixelShaderFunction(vf4;): 7(fvec4) Function None 9
10(input): 8(ptr) FunctionParameter 10(input): 8(ptr) FunctionParameter
12: Label 12: Label
68(ii): 67(ptr) Variable Function 68(ii): 67(ptr) Variable Function
80(ii): 79(ptr) Variable Function 82(ii): 81(ptr) Variable Function
13: 7(fvec4) Load 10(input) 13: 7(fvec4) Load 10(input)
14: 7(fvec4) Load 10(input) 14: 7(fvec4) Load 10(input)
17: 16(bvec4) FOrdEqual 13 14 17: 16(bvec4) FOrdEqual 13 14
...@@ -338,28 +341,29 @@ gl_FragCoord origin is upper left ...@@ -338,28 +341,29 @@ gl_FragCoord origin is upper left
71: 67(ptr) AccessChain 10(input) 70 71: 67(ptr) AccessChain 10(input) 70
72: 6(float) Load 71 72: 6(float) Load 71
Store 68(ii) 72 Store 68(ii) 72
SelectionMerge 74 None 74: 15(bool) FOrdNotEqual 72 73
BranchConditional 72 73 74 SelectionMerge 76 None
73: Label BranchConditional 74 75 76
75: 6(float) Load 68(ii) 75: Label
77: 6(float) FAdd 75 76 77: 6(float) Load 68(ii)
Store 68(ii) 77 79: 6(float) FAdd 77 78
Branch 74 Store 68(ii) 79
74: Label Branch 76
81: 78(int) Load 80(ii) 76: Label
83: 78(int) IAdd 81 82 83: 80(int) Load 82(ii)
Store 80(ii) 83 85: 80(int) IAdd 83 84
84: 78(int) Load 80(ii) Store 82(ii) 85
85: 6(float) ConvertSToF 84 86: 80(int) Load 82(ii)
86: 15(bool) FOrdEqual 85 76 87: 6(float) ConvertSToF 86
SelectionMerge 88 None 88: 15(bool) FOrdEqual 87 78
BranchConditional 86 87 88 SelectionMerge 90 None
87: Label BranchConditional 88 89 90
89: 78(int) Load 80(ii) 89: Label
90: 78(int) IAdd 89 82 91: 80(int) Load 82(ii)
Store 80(ii) 90 92: 80(int) IAdd 91 84
Branch 88 Store 82(ii) 92
88: Label Branch 90
91: 7(fvec4) Undef 90: Label
ReturnValue 91 93: 7(fvec4) Undef
ReturnValue 93
FunctionEnd FunctionEnd
float condf;
int condi;
float1 condf1;
int1 condi1;
float4 main() : SV_Target0
{
float4 a = float4(2.0, 2.0, 2.0, 2.0);
if (condi)
return a + 1.0;
if (condf)
return a + 2.0;
if (condf1)
return a + 3.0;
if (condi1)
return a + 4.0;
if (condi && condf || condf1)
return a + 5.0;
float f = condf;
while (f) { --f; }
int i = condi;
do { --i; } while (i);
for (; i; ) { --i; }
float g = condf ? 7.0 : 8.0;
a += g;
return a - 1.0;
}
\ No newline at end of file
...@@ -2,5 +2,5 @@ ...@@ -2,5 +2,5 @@
// For the version, it uses the latest git tag followed by the number of commits. // For the version, it uses the latest git tag followed by the number of commits.
// For the date, it uses the current date (when then script is run). // For the date, it uses the current date (when then script is run).
#define GLSLANG_REVISION "Overload400-PrecQual.1946" #define GLSLANG_REVISION "Overload400-PrecQual.1947"
#define GLSLANG_DATE "30-Mar-2017" #define GLSLANG_DATE "30-Mar-2017"
...@@ -127,6 +127,7 @@ INSTANTIATE_TEST_CASE_P( ...@@ -127,6 +127,7 @@ INSTANTIATE_TEST_CASE_P(
{"hlsl.hull.void.tesc", "main"}, {"hlsl.hull.void.tesc", "main"},
{"hlsl.identifier.sample.frag", "main"}, {"hlsl.identifier.sample.frag", "main"},
{"hlsl.if.frag", "PixelShaderFunction"}, {"hlsl.if.frag", "PixelShaderFunction"},
{"hlsl.implicitBool.frag", "main"},
{"hlsl.inoutquals.frag", "main"}, {"hlsl.inoutquals.frag", "main"},
{"hlsl.init.frag", "ShaderFunction"}, {"hlsl.init.frag", "ShaderFunction"},
{"hlsl.init2.frag", "main"}, {"hlsl.init2.frag", "main"},
......
...@@ -2527,6 +2527,10 @@ bool HlslGrammar::acceptConditionalExpression(TIntermTyped*& node) ...@@ -2527,6 +2527,10 @@ bool HlslGrammar::acceptConditionalExpression(TIntermTyped*& node)
if (! acceptTokenClass(EHTokQuestion)) if (! acceptTokenClass(EHTokQuestion))
return true; return true;
node = parseContext.convertConditionalExpression(token.loc, node);
if (node == nullptr)
return false;
TIntermTyped* trueNode = nullptr; TIntermTyped* trueNode = nullptr;
if (! acceptExpression(trueNode)) { if (! acceptExpression(trueNode)) {
expected("expression after ?"); expected("expression after ?");
...@@ -3197,6 +3201,9 @@ bool HlslGrammar::acceptSelectionStatement(TIntermNode*& statement) ...@@ -3197,6 +3201,9 @@ bool HlslGrammar::acceptSelectionStatement(TIntermNode*& statement)
TIntermTyped* condition; TIntermTyped* condition;
if (! acceptParenExpression(condition)) if (! acceptParenExpression(condition))
return false; return false;
condition = parseContext.convertConditionalExpression(loc, condition);
if (condition == nullptr)
return false;
// create the child statements // create the child statements
TIntermNodePair thenElse = { nullptr, nullptr }; TIntermNodePair thenElse = { nullptr, nullptr };
...@@ -3280,6 +3287,9 @@ bool HlslGrammar::acceptIterationStatement(TIntermNode*& statement) ...@@ -3280,6 +3287,9 @@ bool HlslGrammar::acceptIterationStatement(TIntermNode*& statement)
// LEFT_PAREN condition RIGHT_PAREN // LEFT_PAREN condition RIGHT_PAREN
if (! acceptParenExpression(condition)) if (! acceptParenExpression(condition))
return false; return false;
condition = parseContext.convertConditionalExpression(loc, condition);
if (condition == nullptr)
return false;
// statement // statement
if (! acceptScopedStatement(statement)) { if (! acceptScopedStatement(statement)) {
...@@ -3319,6 +3329,9 @@ bool HlslGrammar::acceptIterationStatement(TIntermNode*& statement) ...@@ -3319,6 +3329,9 @@ bool HlslGrammar::acceptIterationStatement(TIntermNode*& statement)
TIntermTyped* condition; TIntermTyped* condition;
if (! acceptParenExpression(condition)) if (! acceptParenExpression(condition))
return false; return false;
condition = parseContext.convertConditionalExpression(loc, condition);
if (condition == nullptr)
return false;
if (! acceptTokenClass(EHTokSemicolon)) if (! acceptTokenClass(EHTokSemicolon))
expected(";"); expected(";");
...@@ -3356,6 +3369,11 @@ bool HlslGrammar::acceptIterationStatement(TIntermNode*& statement) ...@@ -3356,6 +3369,11 @@ bool HlslGrammar::acceptIterationStatement(TIntermNode*& statement)
acceptExpression(condition); acceptExpression(condition);
if (! acceptTokenClass(EHTokSemicolon)) if (! acceptTokenClass(EHTokSemicolon))
expected(";"); expected(";");
if (condition != nullptr) {
condition = parseContext.convertConditionalExpression(loc, condition);
if (condition == nullptr)
return false;
}
// iterator SEMI_COLON // iterator SEMI_COLON
TIntermTyped* iterator = nullptr; TIntermTyped* iterator = nullptr;
......
...@@ -4285,6 +4285,18 @@ void HlslParseContext::handleRegister(const TSourceLoc& loc, TQualifier& qualifi ...@@ -4285,6 +4285,18 @@ void HlslParseContext::handleRegister(const TSourceLoc& loc, TQualifier& qualifi
} }
} }
// Convert to a scalar boolean, or if not allowed by HLSL semantics,
// report an error and return nullptr.
TIntermTyped* HlslParseContext::convertConditionalExpression(const TSourceLoc& loc, TIntermTyped* condition)
{
if (!condition->getType().isScalarOrVec1()) {
error(loc, "requires a scalar", "conditional expression", "");
return nullptr;
}
return intermediate.addConversion(EOpConstructBool, TType(EbtBool), condition);
}
// //
// Same error message for all places assignments don't work. // Same error message for all places assignments don't work.
// //
...@@ -4607,13 +4619,6 @@ bool HlslParseContext::voidErrorCheck(const TSourceLoc& loc, const TString& iden ...@@ -4607,13 +4619,6 @@ bool HlslParseContext::voidErrorCheck(const TSourceLoc& loc, const TString& iden
return false; return false;
} }
// Checks to see if the node (for the expression) contains a scalar boolean expression or not
void HlslParseContext::boolCheck(const TSourceLoc& loc, const TIntermTyped* type)
{
if (type->getBasicType() != EbtBool || type->isArray() || type->isMatrix() || type->isVector())
error(loc, "boolean expression expected", "", "");
}
// //
// Fix just a full qualifier (no variables or types yet, but qualifier is complete) at global level. // Fix just a full qualifier (no variables or types yet, but qualifier is complete) at global level.
// //
......
...@@ -101,7 +101,7 @@ public: ...@@ -101,7 +101,7 @@ public:
const glslang::TString* component); const glslang::TString* component);
void handleRegister(const TSourceLoc&, TQualifier&, const glslang::TString* profile, const glslang::TString& desc, void handleRegister(const TSourceLoc&, TQualifier&, const glslang::TString* profile, const glslang::TString& desc,
int subComponent, const glslang::TString*); int subComponent, const glslang::TString*);
TIntermTyped* convertConditionalExpression(const TSourceLoc&, TIntermTyped*);
TIntermAggregate* handleSamplerTextureCombine(const TSourceLoc& loc, TIntermTyped* argTex, TIntermTyped* argSampler); TIntermAggregate* handleSamplerTextureCombine(const TSourceLoc& loc, TIntermTyped* argTex, TIntermTyped* argSampler);
bool parseMatrixSwizzleSelector(const TSourceLoc&, const TString&, int cols, int rows, TSwizzleSelectors<TMatrixSelector>&); bool parseMatrixSwizzleSelector(const TSourceLoc&, const TString&, int cols, int rows, TSwizzleSelectors<TMatrixSelector>&);
...@@ -120,7 +120,6 @@ public: ...@@ -120,7 +120,6 @@ public:
void structArrayCheck(const TSourceLoc&, const TType& structure); void structArrayCheck(const TSourceLoc&, const TType& structure);
void arrayDimMerge(TType& type, const TArraySizes* sizes); void arrayDimMerge(TType& type, const TArraySizes* sizes);
bool voidErrorCheck(const TSourceLoc&, const TString&, TBasicType); bool voidErrorCheck(const TSourceLoc&, const TString&, TBasicType);
void boolCheck(const TSourceLoc&, const TIntermTyped*);
void globalQualifierFix(const TSourceLoc&, TQualifier&); void globalQualifierFix(const TSourceLoc&, TQualifier&);
bool structQualifierErrorCheck(const TSourceLoc&, const TPublicType& pType); bool structQualifierErrorCheck(const TSourceLoc&, const TPublicType& pType);
void mergeQualifiers(TQualifier& dst, const TQualifier& src); void mergeQualifiers(TQualifier& dst, const TQualifier& src);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment