MCPcopy Create free account
hub / github.com/tensorflow/tfjs / linkProgram

Function linkProgram

tfjs-backend-webgl/src/webgl_util.ts:150–159  ·  view source on GitHub ↗
(gl: WebGLRenderingContext, program: WebGLProgram)

Source from the content-addressed store, hash-verified

148}
149
150export function linkProgram(gl: WebGLRenderingContext, program: WebGLProgram) {
151 callAndCheck(gl, () => gl.linkProgram(program));
152 if (env().get('ENGINE_COMPILE_ONLY')) {
153 return;
154 }
155 if (gl.getProgramParameter(program, gl.LINK_STATUS) === false) {
156 console.log(gl.getProgramInfoLog(program));
157 throw new Error('Failed to link vertex and fragment shaders.');
158 }
159}
160
161/// validateProgram is effectively "If we `useProgram(program); drawArrays();`,
162/// give feedback in log about perf/correctness warnings or errors that would

Callers

nothing calls this directly

Calls 4

envFunction · 0.90
callAndCheckFunction · 0.85
logMethod · 0.65
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…