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

Function validateProgram

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

Source from the content-addressed store, hash-verified

164/// So make sure we set up all vertex/texture/sampler/uniform data before
165/// calling validateProgram!
166export function validateProgram(
167 gl: WebGLRenderingContext, program: WebGLProgram) {
168 callAndCheck(gl, () => gl.validateProgram(program));
169 if (gl.getProgramParameter(program, gl.VALIDATE_STATUS) === false) {
170 console.log(gl.getProgramInfoLog(program));
171 throw new Error('Shader program validation failed.');
172 }
173}
174
175export function createStaticVertexBuffer(
176 gl: WebGLRenderingContext, data: Float32Array): WebGLBuffer {

Callers

nothing calls this directly

Calls 2

callAndCheckFunction · 0.85
logMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…