Lines Matching refs:optimized

189 	virtual ProgramData		generateProgramData (bool optimized) const = 0;
205 …ProgramData& programData (bool optimized) { return optimized ? m_optimizedData : m_unoptimi… in programData() argument
206 …SharedPtr<const ShaderProgram>& program (bool optimized) { return optimized ? m_optimizedProgra… in program() argument
207 …ShaderPerformanceMeasurer::Result& result (bool optimized) { return optimized ? m_optimizedResul… in result() argument
229 const bool optimized = ndx == 1; in init() local
231 programData(optimized) = generateProgramData(optimized); in init()
233 for (int i = 0; i < (int)programData(optimized).attributes.size(); i++) in init()
234 …DE_ASSERT(programData(optimized).attributes[i].name != "a_position"); // \note Position attribute … in init()
236 …program(optimized) = SharedPtr<const ShaderProgram>(new ShaderProgram(renderCtx, programData(optim… in init()
239 const tcu::ScopedLogSection section(log, optimized ? "OptimizedProgram" : "UnoptimizedProgram", in init()
240 optimized ? "Hand-optimized program" : "Unoptimized program"); in init()
241 log << *program(optimized); in init()
244 if (!program(optimized)->isOk()) in init()
257 const bool optimized = m_state == STATE_INIT_OPTIMIZED; in iterate() local
258 m_measurer.init(program(optimized)->getProgram(), programData(optimized).attributes, 1); in iterate()
259 m_state = optimized ? STATE_MEASURE_OPTIMIZED : STATE_MEASURE_UNOPTIMIZED; in iterate()
269 const bool optimized = m_state == STATE_MEASURE_OPTIMIZED; in iterate() local
270 …const tcu::ScopedLogSection section (log, optimized ? "OptimizedResult" : "UnoptimizedRe… in iterate()
271optimized ? "Measurement results for hand-optimized program" : "Measurement result for unoptimized… in iterate()
273 result(optimized) = m_measurer.getResult(); in iterate()
275 m_state = optimized ? STATE_FINISHED : STATE_INIT_OPTIMIZED; in iterate()
322 ProgramData generateProgramData (bool optimized) const in generateProgramData()
324 …const string repetition = optimized ? repeatIndexedTemplate("\t" + expressionTemplate(m_caseType) … in generateProgramData()
362 ProgramData generateProgramData (bool optimized) const in generateProgramData()
370 const string statements = optimized ? " " + precision + " vec4 valueOrig = value;\n" in generateProgramData()
405 ProgramData generateProgramData (bool optimized) const in generateProgramData()
409 …const string maybeFuncDefs = optimized ? "" : funcDefinitions(m_callNestingDepth, precision, exp… in generateProgramData()
410 …const string mainValueStatement = (optimized ? "\tvalue = " + expression : "\tvalue = func" + toS… in generateProgramData()
449 ProgramData generateProgramData (bool optimized) const in generateProgramData()
453 …eType == CASETYPE_BUILT_IN_FUNCTIONS ? builtinFunctionsCaseStatements (optimized, m_useConstantEx… in generateProgramData()
454 …: m_caseType == CASETYPE_ARRAY ? arrayCaseStatements (optimized, m_useConstantExpressionsOn… in generateProgramData()
455 …: m_caseType == CASETYPE_STRUCT ? structCaseStatements (optimized, m_useConstantExpressions… in generateProgramData()
465 …static inline string builtinFunctionsCaseStatements (bool optimized, bool constantExpressionsOnly,… in builtinFunctionsCaseStatements() argument
470 …return optimized ? " value = vec4(0.4, 0.5, 0.6, 0.7) * value; // NOTE: factor doesn't necessarily… in builtinFunctionsCaseStatements()
482 …static inline string arrayCaseStatements (bool optimized, bool constantExpressionsOnly, const stri… in arrayCaseStatements() argument
487 …return optimized ? " value = vec4(0.4, 0.5, 0.6, 0.7) * value; // NOTE: factor doesn't necessarily… in arrayCaseStatements()
510 …static inline string structCaseStatements (bool optimized, bool constantExpressionsOnly, const str… in structCaseStatements() argument
515 …return optimized ? " value = vec4(0.4, 0.5, 0.6, 0.7) * value; // NOTE: factor doesn't necessarily… in structCaseStatements()
558 ProgramData generateProgramData (bool optimized) const in generateProgramData()
562 …aseType == CASETYPE_SINGLE_STATEMENT ? singleStatementCaseStatements (optimized, precision, isVe… in generateProgramData()
563 …ype == CASETYPE_MULTIPLE_STATEMENTS ? multipleStatementsCaseStatements (optimized, precision, isVe… in generateProgramData()
564 …: m_caseType == CASETYPE_STATIC_BRANCH ? staticBranchCaseStatements (optimized, precision, isVe… in generateProgramData()
565 … : m_caseType == CASETYPE_LOOP ? loopCaseStatements (optimized, precision, isVertexCase) in generateProgramData()
574 …static inline string singleStatementCaseStatements (bool optimized, const string& precision, bool … in singleStatementCaseStatements() argument
578 return optimized ? " " + precision + " vec4 s = sin(value);\n" in singleStatementCaseStatements()
586 …static inline string multipleStatementsCaseStatements (bool optimized, const string& precision, bo… in multipleStatementsCaseStatements() argument
591 return optimized ? " " + precision + " vec4 a = sin(value) + cos(exp(value));\n" in multipleStatementsCaseStatements()
606 …static inline string staticBranchCaseStatements (bool optimized, const string& precision, bool use… in staticBranchCaseStatements() argument
611 if (optimized) in staticBranchCaseStatements()
650 …static inline string loopCaseStatements (bool optimized, const string& precision, bool useHeavierW… in loopCaseStatements() argument
654 return optimized ? " " + precision + " vec4 acc = value;\n" in loopCaseStatements()
699 ProgramData generateProgramData (bool optimized) const in generateProgramData()
703 …aseType == CASETYPE_DEAD_BRANCH_FUNC_CALL ? deadBranchFuncCallCaseFuncDefs (optimized, precision) in generateProgramData()
704 …ASETYPE_UNUSED_VALUE_AFTER_RETURN ? unusedValueAfterReturnCaseFuncDefs (optimized, precision, isVe… in generateProgramData()
707 …Type == CASETYPE_DEAD_BRANCH_SIMPLE ? deadBranchSimpleCaseStatements (optimized, isVertexCase) in generateProgramData()
708 … == CASETYPE_DEAD_BRANCH_COMPLEX ? deadBranchComplexCaseStatements (optimized, precision, true… in generateProgramData()
709 …ETYPE_DEAD_BRANCH_COMPLEX_NO_CONST ? deadBranchComplexCaseStatements (optimized, precision, fals… in generateProgramData()
710 … == CASETYPE_DEAD_BRANCH_FUNC_CALL ? deadBranchFuncCallCaseStatements (optimized, isVertexCase) in generateProgramData()
711 …e == CASETYPE_UNUSED_VALUE_BASIC ? unusedValueBasicCaseStatements (optimized, precision, isVe… in generateProgramData()
712 …pe == CASETYPE_UNUSED_VALUE_LOOP ? unusedValueLoopCaseStatements (optimized, precision, isVe… in generateProgramData()
713 …ETYPE_UNUSED_VALUE_DEAD_BRANCH ? unusedValueDeadBranchCaseStatements (optimized, precision, isVe… in generateProgramData()
715 … CASETYPE_UNUSED_VALUE_MUL_ZERO ? unusedValueMulZeroCaseStatements (optimized, precision, isVe… in generateProgramData()
724 static inline string deadBranchSimpleCaseStatements (bool optimized, bool useHeavierWorkload) in deadBranchSimpleCaseStatements() argument
728 return optimized ? " value = vec4(0.6, 0.7, 0.8, 0.9) * value;\n" in deadBranchSimpleCaseStatements()
739 …static inline string deadBranchComplexCaseStatements (bool optimized, const string& precision, boo… in deadBranchComplexCaseStatements() argument
744 return optimized ? " value = vec4(0.6, 0.7, 0.8, 0.9) * value;\n" in deadBranchComplexCaseStatements()
760 static inline string deadBranchFuncCallCaseFuncDefs (bool optimized, const string& precision) in deadBranchFuncCallCaseFuncDefs() argument
762 return optimized ? "" : precision + " float func (" + precision + " float x) { return 2.0*x; }\n"; in deadBranchFuncCallCaseFuncDefs()
765 static inline string deadBranchFuncCallCaseStatements (bool optimized, bool useHeavierWorkload) in deadBranchFuncCallCaseStatements() argument
769 return optimized ? " value = vec4(0.6, 0.7, 0.8, 0.9) * value;\n" in deadBranchFuncCallCaseStatements()
780 …static inline string unusedValueBasicCaseStatements (bool optimized, const string& precision, bool… in unusedValueBasicCaseStatements() argument
784 return optimized ? " " + precision + " vec4 used = vec4(0.6, 0.7, 0.8, 0.9) * value;\n" in unusedValueBasicCaseStatements()
793 …static inline string unusedValueLoopCaseStatements (bool optimized, const string& precision, bool … in unusedValueLoopCaseStatements() argument
797 return optimized ? " " + precision + " vec4 used = vec4(0.6, 0.7, 0.8, 0.9) * value;\n" in unusedValueLoopCaseStatements()
807 …static inline string unusedValueAfterReturnCaseFuncDefs (bool optimized, const string& precision, … in unusedValueAfterReturnCaseFuncDefs() argument
811 return optimized ? precision + " vec4 func (" + precision + " vec4 v)\n" in unusedValueAfterReturnCaseFuncDefs()
833 …static inline string unusedValueDeadBranchCaseStatements (bool optimized, const string& precision,… in unusedValueDeadBranchCaseStatements() argument
837 return optimized ? " " + precision + " vec4 used = vec4(0.6, 0.7, 0.8, 0.9) * value;\n" in unusedValueDeadBranchCaseStatements()
848 …static inline string unusedValueMulZeroCaseStatements (bool optimized, const string& precision, bo… in unusedValueMulZeroCaseStatements() argument
852 return optimized ? " " + precision + " vec4 used = vec4(0.6, 0.7, 0.8, 0.9) * value;\n" in unusedValueMulZeroCaseStatements()