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

Method CreateWithBinaryShader

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

Source from the content-addressed store, hash-verified

140}
141
142Status GlProgram::CreateWithBinaryShader(const BinaryShader& shader,
143 GlProgram* gl_program) {
144 GLuint program_id;
145 RETURN_IF_ERROR(CreateNewProgramId(&program_id));
146
147 // program_id needs to be properly deleted if there will be an error, hense
148 // wrap program_id into Program.
149 GlProgram program(program_id);
150
151 RETURN_IF_ERROR(TFLITE_GPU_CALL_GL(glProgramBinary, program.id(),
152 shader.format(), shader.binary().data(),
153 shader.binary().size()));
154 RETURN_IF_ERROR(CheckProgramLinked(program.id()));
155
156 *gl_program = std::move(program);
157 return OkStatus();
158}
159
160Status GlProgram::GetBinary(BinaryShader* binary_shader) {
161 GLint size = 0;

Callers

nothing calls this directly

Calls 7

CreateNewProgramIdFunction · 0.85
CheckProgramLinkedFunction · 0.85
OkStatusFunction · 0.85
idMethod · 0.45
formatMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected