24 const std::string& glsl,
41 stats->incShaderCompilations();
60 glsl.c_str(), infoLen > 0 ? (
const char*)
log.get() :
"", shaderWasCached);
70 GR_GL_CALL(gli, AttachShader(programId, shaderId));
84 if (!linked && errorHandler) {
85 std::string allShaders;
88 "// Fragment SKSL\n%s\n",
94 "// Fragment GLSL\n%s\n",
107 const char* errorMsg = (infoLen > 0) ? (
const char*)
log.get()
108 :
"link failed but did not provide an info log";
109 errorHandler->
compileError(allShaders.c_str(), errorMsg, shaderWasCached);
#define GR_GL_LINK_STATUS
#define GR_GL_INFO_LOG_LENGTH
#define GR_GL_COMPILE_STATUS
bool GrGLCheckLinkStatus(const GrGLGpu *gpu, GrGLuint programID, bool shaderWasCached, GrContextOptions::ShaderErrorHandler *errorHandler, const std::string *sksl[kGrShaderTypeCount], const std::string glsl[kGrShaderTypeCount])
GrGLuint GrGLCompileAndAttachShader(const GrGLContext &glCtx, GrGLuint programId, GrGLenum type, const std::string &glsl, bool shaderWasCached, GrThreadSafePipelineBuilder::Stats *stats, GrContextOptions::ShaderErrorHandler *errorHandler)
#define GR_GL_CALL(IFACE, X)
#define GR_GL_CALL_RET(IFACE, RET, X)
static const int kGrShaderTypeCount
constexpr int SkToInt(S x)
static constexpr bool SkToBool(const T &x)
#define ATRACE_ANDROID_FRAMEWORK(fmt,...)
#define TRACE_EVENT0_ALWAYS(category_group, name)
const GrGLInterface * glInterface() const
const GrGLInterface * glInterface() const
virtual void compileError(const char *shader, const char *errors)
std::string void appendf(std::string *str, const char *fmt,...) SK_PRINTF_LIKE(2
static std::string GetShaderInfoLog(const ProcTableGLES &gl, GLuint shader)