Lines Matching defs:program
333 string getProgramInfoLog (const glw::Functions& gl, deUint32 program)
338 gl.getProgramiv(program, GL_INFO_LOG_LENGTH, &length);
343 gl.getProgramInfoLog(program, (glw::GLsizei)infoLog.length(), DE_NULL, &(infoLog[0]));
349 bool getProgramLinkStatus (const glw::Functions& gl, deUint32 program)
353 gl.getProgramiv(program, GL_LINK_STATUS, &status);
359 void logProgram (TestLog& log, const glw::Functions& gl, deUint32 program)
361 const bool programLinkOk = getProgramLinkStatus(gl, program);
362 const string programInfoLog = getProgramInfoLog(gl, program);
412 pair<deUint32, deUint32> createAndAttachShaders (TestLog& log, glu::RenderContext& renderCtx, deUint32 program, const vector<Attribute>& attributes, bool attributeAliasing)
439 gl.attachShader(program, vertexShader);
440 gl.attachShader(program, fragmentShader);
473 void bindAttributes (TestLog& log, const glw::Functions& gl, deUint32 program, const vector<Bind>& binds)
478 gl.bindAttribLocation(program, iter->getLocation(), iter->getAttributeName().c_str());
497 bool checkActiveAttribQuery (TestLog& log, const glw::Functions& gl, deUint32 program, const vector<Attribute>& attributes)
503 gl.getProgramiv(program, GL_ACTIVE_ATTRIBUTES, &activeAttribCount);
504 GLU_EXPECT_NO_ERROR(gl.getError(), "glGetProgramiv(program, GL_ACTIVE_ATTRIBUTES, &activeAttribCount)");
516 gl.getActiveAttrib(program, activeAttribNdx, maxNameSize, &length, &size, &type, name);
520 << "glGetActiveAttrib(program"
602 bool checkAttribLocationQuery (TestLog& log, const glw::Functions& gl, deUint32 program, const vector<Attribute>& attributes, const map<string, deUint32>& bindings)
610 const deInt32 location = gl.getAttribLocation(program, attrib.getName().c_str());
615 << location << " = glGetAttribLocation(program, \"" << attrib.getName() << "\")"
631 bool checkQuery (TestLog& log, const glw::Functions& gl, deUint32 program, const vector<Attribute>& attributes, const map<string, deUint32>& bindings)
633 bool isOk = checkActiveAttribQuery(log, gl, program, attributes);
635 if (!checkAttribLocationQuery(log, gl, program, attributes, bindings))
698 deUint32 program = 0;
717 log << TestLog::Message << "Create program." << TestLog::EndMessage;
718 program = gl.createProgram();
722 bindAttributes(log, gl, program, preAttachBind);
724 log << TestLog::Message << "Create and attach shaders to program." << TestLog::EndMessage;
725 shaders = createAndAttachShaders(log, renderCtx, program, attributes, hasAttributeAliasing(attributes, activeBindings));
728 bindAttributes(log, gl, program, preLinkBind);
730 log << TestLog::Message << "Link program." << TestLog::EndMessage;
732 gl.linkProgram(program);
735 logProgram(log, gl, program);
736 TCU_CHECK_MSG(getProgramLinkStatus(gl, program), "Program link failed");
738 if (!checkQuery(log, gl, program, attributes, activeBindings))
743 bindAttributes(log, gl, program, postLinkBind);
745 if (!checkQuery(log, gl, program, attributes, activeBindings))
751 log << TestLog::Message << "Relink program." << TestLog::EndMessage;
752 gl.linkProgram(program);
755 logProgram(log, gl, program);
756 TCU_CHECK_MSG(getProgramLinkStatus(gl, program), "Program link failed");
761 if (!checkQuery(log, gl, program, attributes, activeBindings))
767 gl.detachShader(program, shaders.first);
768 gl.detachShader(program, shaders.second);
771 log << TestLog::Message << "Create and attach shaders to program." << TestLog::EndMessage;
772 createAndAttachShaders(log, renderCtx, program, reattachAttributes, hasAttributeAliasing(reattachAttributes, activeBindings));
774 log << TestLog::Message << "Relink program." << TestLog::EndMessage;
775 gl.linkProgram(program);
778 logProgram(log, gl, program);
779 TCU_CHECK_MSG(getProgramLinkStatus(gl, program), "Program link failed");
781 if (!checkQuery(log, gl, program, reattachAttributes, activeBindings))
785 gl.deleteProgram(program);
795 if (program)
796 gl.deleteProgram(program);