455 {
459
460 return false;
461 }
462
464
467
472
476 return false;
477 }
478
481 if (0 == programID) {
482 return false;
483 }
484
486
488 std::string glsl;
491 sksl,
492 kind,
494 &glsl,
495 &unusedInterface,
496 errorHandler)) {
497 return false;
498 }
499
501 programID,
503 glsl,
504 false,
506 errorHandler)) {
508 return true;
509 } else {
510 return false;
511 }
512 };
513
521 return false;
522 }
523
527 }
528
530 if (
caps.bindFragDataLocationSupport()) {
533 BindFragDataLocation(programID, 0,
534 GrGLSLFragmentShaderBuilder::DeclaredColorOutputName()));
535
538 BindFragDataLocationIndexed(programID, 0, 1,
539 GrGLSLFragmentShaderBuilder::DeclaredSecondaryColorOutputName()));
540 }
541 }
542
546 if (!linked) {
548 return false;
549 }
550
552
555 return true;
556}
#define GR_GL_LINK_STATUS
#define GR_GL_FRAGMENT_SHADER
#define GR_GL_VERTEX_SHADER
static void cleanup_program(GrGLGpu *gpu, GrGLuint programID, const SkTDArray< GrGLuint > &shaderIDs)
static void cleanup_shaders(GrGLGpu *gpu, const SkTDArray< GrGLuint > &shaderIDs)
static constexpr SkFourByteTag kSKSL_Tag
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
GrContextOptions::ShaderErrorHandler * getShaderErrorHandler() const
const GrShaderCaps * shaderCaps() const
const GrGLCaps & glCaps() const
GrThreadSafePipelineBuilder * pipelineBuilder() override
const GrGLInterface * glInterface() const
const GrGLContext & glContext() const
const GrCaps * caps() const override
static sk_sp< GrGLProgram > CreateProgram(GrDirectContext *, const GrProgramDesc &, const GrProgramInfo &, const GrGLPrecompiledProgram *=nullptr)
const void * data() const
void push_back(const T &v)
bool UnpackCachedShaders(SkReadBuffer *reader, std::string shaders[], SkSL::Program::Interface interfaces[], int numInterfaces, ShaderMetadata *meta)
SkFourByteTag GetType(SkReadBuffer *reader)
static bool LinkProgram(const ReactorGLES &reactor, const std::shared_ptr< PipelineGLES > &pipeline, const std::shared_ptr< const ShaderFunction > &vert_function, const std::shared_ptr< const ShaderFunction > &frag_function)
bool SkSLToGLSL(const SkSL::ShaderCaps *caps, const std::string &sksl, SkSL::ProgramKind programKind, const SkSL::ProgramSettings &settings, std::string *glsl, SkSL::ProgramInterface *outInterface, ShaderErrorHandler *errorHandler)
SkSL::Program::Interface fInterface
bool mustDeclareFragmentShaderOutput() const