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

Method translateLiteralExpression

src/HLSLCompiler.cpp:826–843  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

824 }
825 }
826 void HLSLCompiler::translateLiteralExpression(M4::HLSLLiteralExpression* expr)
827 {
828 switch (expr->type)
829 {
830 case M4::HLSLBaseType_Half:
831 case M4::HLSLBaseType_Float:
832 m_gen.Function.PushStack(expr->fValue);
833 break;
834 case M4::HLSLBaseType_Int:
835 m_gen.Function.PushStack(expr->iValue);
836 break;
837 case M4::HLSLBaseType_Bool:
838 m_gen.Function.PushStack(expr->bValue);
839 break;
840 default:
841 ASSERT(0);
842 }
843 }
844 void HLSLCompiler::translateTernary(M4::HLSLConditionalExpression* expr)
845 {
846 translateExpression(expr->condition);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected