MCPcopy Create free account
hub / github.com/dfranx/ShaderDebugger / m_mergeBaseType

Method m_mergeBaseType

src/GLSLCompiler.cpp:1298–1316  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1296 return GLSLCompiler::ExpressionType("void", ag::Type::Void, 1, 1);
1297 }
1298 ag::Type GLSLCompiler::m_mergeBaseType(ag::Type type1, ag::Type type2)
1299 {
1300 if (type1 == ag::Type::Float || type2 == ag::Type::Float)
1301 return ag::Type::Float;
1302 else if (type1 == ag::Type::UInt || type2 == ag::Type::UInt)
1303 return ag::Type::UInt;
1304 else if (type1 == ag::Type::Int || type2 == ag::Type::Int)
1305 return ag::Type::Int;
1306 else if (type1 == ag::Type::UShort || type2 == ag::Type::UShort)
1307 return ag::Type::UShort;
1308 else if (type1 == ag::Type::Short || type2 == ag::Type::Short)
1309 return ag::Type::Short;
1310 else if (type1 == ag::Type::UChar || type2 == ag::Type::UChar)
1311 return ag::Type::UChar;
1312 else if (type1 == ag::Type::Char || type2 == ag::Type::Char)
1313 return ag::Type::Char;
1314
1315 return type1;
1316 }
1317
1318 ag::Type GLSLCompiler::m_convertBaseType(const std::string& str)
1319 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected