void compile(const std::string& shaderString) { std::string infoLog; bool compilationSuccess = compileWithSettings(SH_ESSL_OUTPUT, shaderString, &mESSLCode, &infoLog); if (!compilationSuccess) { FAIL() << "Shader compilation into ESSL failed " << infoLog; } compilationSuccess = compileWithSettings(SH_GLSL_COMPATIBILITY_OUTPUT, shaderString, &mGLSLCode, &infoLog); if (!compilationSuccess) { FAIL() << "Shader compilation into GLSL failed " << infoLog; } }
void MatchOutputCodeTest::compile(const std::string &shaderString, const ShCompileOptions compileOptions) { std::string infoLog; for (auto &code : mOutputCode) { bool compilationSuccess = compileWithSettings(code.first, shaderString, compileOptions, &code.second, &infoLog); if (!compilationSuccess) { FAIL() << "Shader compilation failed:\n" << infoLog; } } }