#include "hecl/Backend/ProgrammableCommon.hpp" #include namespace hecl { namespace Backend { unsigned ProgrammableCommon::addTexCoordGen(TexGenSrc src, int uvIdx, int mtx) { for (unsigned i=0 ; i 3) diag.reportBackendErr(loc, "unable to use swizzle as RGB value"); retval += SWIZZLE_CHARS[swiz[i]]; } return retval; } std::string ProgrammableCommon::EmitSwizzle1(Diagnostics& diag, const SourceLocation& loc, const std::string& a, const atInt8 swiz[4]) const { std::string retval = a + '.'; if (swiz[0] < 0 || swiz[0] > 3) diag.reportBackendErr(loc, "unable to use swizzle as Alpha value"); retval += SWIZZLE_CHARS[swiz[0]]; return retval; } } }