MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / CheckProgramLinked

Function CheckProgramLinked

tensorflow/lite/delegates/gpu/gl/gl_program.cc:40–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40Status CheckProgramLinked(GLuint program_id) {
41 GLint linked;
42 glGetProgramiv(program_id, GL_LINK_STATUS, &linked);
43 if (linked == GL_TRUE) {
44 return OkStatus();
45 }
46 GLint info_size;
47 glGetProgramiv(program_id, GL_INFO_LOG_LENGTH, &info_size);
48 std::string errors;
49 errors.resize(info_size + 1 /* plus \0 */);
50 glGetProgramInfoLog(program_id, info_size + 1, nullptr, &errors[0]);
51 // TODO(akulik): use glValidateProgram to gather more info.
52 return UnavailableError("Program is not properly linked: " + errors);
53}
54
55struct ParameterSetter {
56 Status operator()(int value) {

Callers 2

CreateWithShaderMethod · 0.85

Calls 3

OkStatusFunction · 0.85
UnavailableErrorFunction · 0.50
resizeMethod · 0.45

Tested by

no test coverage detected