| 932 | } |
| 933 | |
| 934 | void MSLGenerator::OutputDeclaration(HLSLDeclaration* declaration) |
| 935 | { |
| 936 | if (IsSamplerType(declaration->type)) { |
| 937 | m_writer.Write("%s sampler& %s", GetAddressSpaceName(declaration->type.baseType, declaration->type.addressSpace), declaration->name); |
| 938 | } |
| 939 | else if (IsTextureType(declaration->type)) { |
| 940 | const char* textureName = GetTypeName(declaration->type, true); |
| 941 | if (textureName) |
| 942 | m_writer.Write("%s %s& %s", GetAddressSpaceName(declaration->type.baseType, declaration->type.addressSpace), textureName, declaration->name); |
| 943 | else |
| 944 | Error("Unknown texture"); |
| 945 | } |
| 946 | else { |
| 947 | OutputDeclaration(declaration->type, declaration->name, declaration->assignment); |
| 948 | |
| 949 | declaration = declaration->nextDeclaration; |
| 950 | while (declaration != NULL) { |
| 951 | m_writer.Write(","); |
| 952 | OutputDeclarationBody(declaration->type, declaration->name, declaration->assignment); |
| 953 | declaration = declaration->nextDeclaration; |
| 954 | } |
| 955 | } |
| 956 | } |
| 957 | |
| 958 | void MSLGenerator::OutputStruct(int indent, HLSLStruct* structure) |
| 959 | { |
nothing calls this directly
no test coverage detected