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

Method translateReturnStatement

src/GLSLCompiler.cpp:1618–1631  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1616 }
1617
1618 void GLSLCompiler::translateReturnStatement(glsl::astReturnStatement *statement) {
1619 m_exportLine(statement);
1620
1621 if (statement->expression) {
1622 translateExpression(statement->expression);
1623
1624 if (!m_isImmediate) {
1625 GLSLCompiler::ExpressionType rType = m_convertExprType(m_curFuncData->ReturnType);
1626 generateConvert(rType);
1627 }
1628 }
1629
1630 m_gen.Function.Return();
1631 }
1632
1633 void GLSLCompiler::translateDiscardStatement() {
1634 m_gen.Function.Call("$$discard", 0);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected