| 859 | } |
| 860 | |
| 861 | ASTNode* CreateShaderTableArgument( ParserState& state, const Type& payloadType, ScopeSymbolTable* scope ) |
| 862 | { |
| 863 | std::string shaderTableTypeName = "ShaderTableT<" + payloadType.ToString() + ",__RtGlobalInput>"; |
| 864 | auto t = scope->AddSymbol( state.AllocateName( shaderTableTypeName.c_str() ), DISALOW_OVERRIDES ); |
| 865 | t->isTypeName = true; |
| 866 | |
| 867 | auto shaderTable = state.NewNode( NT_FUNCTION_PARAMETER ); |
| 868 | auto symbol = scope->AddSymbol( MakeInlineString( "__rtShaderTable" ), DISALOW_OVERRIDES ); |
| 869 | symbol->type = TypeFromSymbol( t ); |
| 870 | symbol->definition = shaderTable; |
| 871 | symbol->registerSpecifier[MakeInlineString( "" )] = RegisterSpecifier::Register( MetalRegister::SRV, 2 ); |
| 872 | symbol->addressSpace = AddressSpace::Constant; |
| 873 | shaderTable->SetType( symbol->type ); |
| 874 | shaderTable->SetSymbol( symbol ); |
| 875 | shaderTable->AddChild( nullptr ); |
| 876 | shaderTable->SetToken( ScannerToken::FromTokenType( OP_INOUT ) ); |
| 877 | |
| 878 | return shaderTable; |
| 879 | } |
| 880 | |
| 881 | void AddShaderTableArguments( ParserState& state, const std::map<Symbol*, ASTNode*>& functions ) |
| 882 | { |
no test coverage detected