| 56 | } |
| 57 | |
| 58 | static ASTNode* GetSamplerArg( ASTNode* arg ) |
| 59 | { |
| 60 | if( arg == nullptr ) |
| 61 | { |
| 62 | return nullptr; |
| 63 | } |
| 64 | switch( arg->GetNodeType() ) |
| 65 | { |
| 66 | case NT_VAR_IDENTIFIER: |
| 67 | return arg; |
| 68 | case NT_EXPRESSION: |
| 69 | if( arg->GetToken()->type == OP_LEFT_PAREN ) |
| 70 | { |
| 71 | return GetSamplerArg( arg->GetChildOrNull( 0 ) ); |
| 72 | } |
| 73 | default: |
| 74 | break; |
| 75 | } |
| 76 | return nullptr; |
| 77 | } |
| 78 | |
| 79 | static const char* GetTextureTypeName( int textureType ) |
| 80 | { |
no test coverage detected