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

Method translateIfStetement

src/GLSLCompiler.cpp:1439–1452  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1437 }
1438
1439 void GLSLCompiler::translateIfStetement(glsl::astIfStatement *statement) {
1440 m_exportLine(statement);
1441
1442 translateExpression(statement->condition);
1443 size_t pos = m_gen.Function.If();
1444 translateStatement(statement->thenStatement);
1445 size_t goto_ref = m_gen.Function.Goto();
1446 m_gen.Function.SetAddress(pos, m_gen.Function.GetCurrentAddress());
1447
1448 if (statement->elseStatement)
1449 translateStatement(statement->elseStatement);
1450
1451 m_gen.Function.SetAddress(goto_ref, m_gen.Function.GetCurrentAddress());
1452 }
1453
1454 void GLSLCompiler::translateSwitchStatement(glsl::astSwitchStatement *statement) {
1455 m_exportLine(statement);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected