Lines Matching +full:x +full:- +full:access +full:- +full:token
1 /*-------------------------------------------------------------------------
3 * ----------------------------------------------------
11 * http://www.apache.org/licenses/LICENSE-2.0
22 *//*--------------------------------------------------------------------*/
51 if ((m_exprFlags & CONST_EXPR) && (entry->getVariable()->getStorage() != Variable::STORAGE_CONST)) in operator ()()
77 if (entry->getValueRange().getType() != m_valueRange.getType()) in operator ()()
80 if (!entry->getValueRange().intersects(m_valueRange)) in operator ()()
103 entry->getVariable()->getType() == m_valueRange.getType() && in operator ()()
104 entry->getValueRange().intersects(m_valueRange); in operator ()()
124 entry->getVariable()->getType() == m_valueRange.getType() && in operator ()()
125 entry->getValueRange().isSupersetOf(m_valueRange); in operator ()()
145 if (entry->getVariable()->getType() == VariableType(m_type, 1)) in operator ()()
147 DE_ASSERT(entry->getVariable()->getStorage() == Variable::STORAGE_UNIFORM); in operator ()()
182 const int minIntVal = -16; in computeRandomValueRangeForInfElements()
184 const int maxRangeLen = maxIntVal - minIntVal; in computeRandomValueRangeForInfElements()
187 int minVal = minIntVal + rnd.getInt(0, maxRangeLen-rangeLen); in computeRandomValueRangeForInfElements()
204 const float minFloatVal = -16.0f; in computeRandomValueRangeForInfElements()
207 int minStep = rnd.getInt(0, maxSteps-rangeLen); in computeRandomValueRangeForInfElements()
351 …, s_expressionSpecs, (int)DE_LENGTH_OF_ARRAY(s_expressionSpecs), valueRange)->create(state, valueR… in createRandom()
356 …return chooseExpression(state, s_lvalueSpecs, (int)DE_LENGTH_OF_ARRAY(s_lvalueSpecs), valueRange)-… in createRandomLValue()
362 float minVal = -10.0f; in FloatLiteral()
372 minVal = -10.0f; in FloatLiteral()
378 int numSteps = (int)((maxVal-minVal)/step) + 1; in FloatLiteral()
381 ExecValueAccess access = m_value.getValue(VariableType::getScalarType(VariableType::TYPE_FLOAT)); in FloatLiteral() local
384 access.asFloat(ndx) = value; in FloatLiteral()
391 // of two same floats produced different results - this was resolved by in FloatLiteral()
393 ExecValueAccess access = m_value.getValue(VariableType::getScalarType(VariableType::TYPE_FLOAT)); in FloatLiteral() local
396 access.asFloat(ndx) = customValue; in FloatLiteral()
412 float rangeLength = maxVal - minVal; in getWeight()
415 return deFloatMax(0.1f, 1.0f - rangeLength); in getWeight()
426 str << Token(m_value.getValue(VariableType::getScalarType(VariableType::TYPE_FLOAT)).asFloat(0)); in tokenize()
432 int minVal = -16; in IntLiteral()
441 minVal = -16; in IntLiteral()
448 ExecValueAccess access = m_value.getValue(VariableType::getScalarType(VariableType::TYPE_INT)); in IntLiteral() local
451 access.asInt(ndx) = value; in IntLiteral()
466 int rangeLength = maxVal - minVal; in getWeight()
469 return deFloatMax(0.1f, 1.0f - (float)rangeLength/4.0f); in getWeight()
480 str << Token(m_value.getValue(VariableType::getScalarType(VariableType::TYPE_INT)).asInt(0)); in tokenize()
496 ExecValueAccess access = m_value.getValue(VariableType::getScalarType(VariableType::TYPE_BOOL)); in BoolLiteral() local
499 access.asBool(ndx) = value; in BoolLiteral()
506 // of two same floats produced different results - this was resolved by in BoolLiteral()
508 ExecValueAccess access = m_value.getValue(VariableType::getScalarType(VariableType::TYPE_BOOL)); in BoolLiteral() local
511 access.asBool(ndx) = customValue; in BoolLiteral()
530 str << Token(m_value.getValue(VariableType::getScalarType(VariableType::TYPE_BOOL)).asBool(0)); in tokenize()
536 // \note int-bool and float-bool conversions handled in a special way.
608 // Work-around for non-deterministic float behavior
611 // \todo [2011-03-26 pyry] Provide this in ValueAccess?
612 template <typename T> T getValueAccessValue (ConstValueAccess access);
613 template<> inline float getValueAccessValue<float> (ConstValueAccess access) { return access.asF… in getValueAccessValue() argument
614 template<> inline int getValueAccessValue<int> (ConstValueAccess access) { return access.asInt(… in getValueAccessValue() argument
615 template<> inline bool getValueAccessValue<bool> (ConstValueAccess access) { return access.asBo… in getValueAccessValue() argument
617 template <typename T> T& getValueAccessValue (ValueAccess access);
618 template<> inline float& getValueAccessValue<float> (ValueAccess access) { return access.asFloat… in getValueAccessValue() argument
619 template<> inline int& getValueAccessValue<int> (ValueAccess access) { return access.asInt(); } in getValueAccessValue() argument
620 template<> inline bool& getValueAccessValue<bool> (ValueAccess access) { return access.asBool();… in getValueAccessValue() argument
655 default: return -1; in getBaseTypeConvNdx()
710 // \todo [2011-03-26 pyry] Vector conversions in ConstructorOp()
711 // int remainingDepth = state.getShaderParameters().maxExpressionDepth - state.getExpressionDe… in ConstructorOp()
718 // \todo [2011-03-26 pyry] Separate op for struct constructors! in ConstructorOp()
770 const ValueRange& inValueRange = m_inputValueRanges[m_inputValueRanges.size()-1-numChildren]; in createNextChild()
806 str << Token::LEFT_PAREN; in tokenize()
811 str << Token::COMMA; in tokenize()
812 (*i)->tokenize(state, str); in tokenize()
815 str << Token::RIGHT_PAREN; in tokenize()
822 (*i)->evaluate(evalCtx); in evaluate()
833 ExecConstValueAccess src = (*i)->getValue(); in evaluate()
848 …int maxScalars = state.getShaderParameters().maxCombinedVariableScalars - state.getVariableManag… in AssignOp()
860 // \todo [2011-02-28 pyry] Give lower weight to entries without range? Choose subtype range? in AssignOp()
862 m_valueRange = ValueRange(entry->getValueRange()); in AssignOp()
886 if ((*i)->getValueRange().isSupersetOf(m_valueRange.asAccess())) in AssignOp()
896 // \todo [2011-02-03 pyry] Use some heuristics to select the range? in AssignOp()
897 …ConstValueRangeAccess selectedRange = state.getRandom().choose<const ValueEntry*>(first, end)->get… in AssignOp()
936 // \todo [2011-03-14 pyry] Proper l-value generation: in createNextChild()
937 // - pure L-value part is generated first in createNextChild()
938 // - variable valuerange is made unbound in createNextChild()
939 // - R-value is generated in createNextChild()
940 // - R-values in L-value are generated in createNextChild()
956 m_lvalueExpr->tokenize(state, str); in tokenize()
957 str << Token::EQUAL; in tokenize()
958 m_rvalueExpr->tokenize(state, str); in tokenize()
963 // Evaluate l-value in evaluate()
964 m_lvalueExpr->evaluate(evalCtx); in evaluate()
967 m_rvalueExpr->evaluate(evalCtx); in evaluate()
969 m_value.getValue(m_valueRange.getType()) = m_rvalueExpr->getValue().value(); in evaluate()
972 …assignMasked(m_lvalueExpr->getLValue(), m_value.getValue(m_valueRange.getType()), evalCtx.getExecu… in evaluate()
980 // \todo [2011-03-11 pyry] Float arrays, structs? in isShaderInOutSupportedType()
1008 weights[0] = de::max(1.0f-dynWeight, 0.1f); in allocateNewVariable()
1041 // Check for -inf..inf ranges - they don't bring down the weight. in computeEntryReadWeight()
1048 float entryRangeLen = entryMax - entryMin; in computeEntryReadWeight()
1049 float readRangeLen = readMax - readMin; in computeEntryReadWeight()
1050 float intersectionLen = intersectionMax - intersectionMin; in computeEntryReadWeight()
1069 // Check for -inf..inf ranges - they don't bring down the weight. in computeEntryReadWeight()
1076 deInt64 entryRangeLen = (deInt64)entryMax - (deInt64)entryMin; in computeEntryReadWeight()
1077 deInt64 readRangeLen = (deInt64)readMax - (deInt64)readMin; in computeEntryReadWeight()
1078 deInt64 intersectionLen = (deInt64)intersectionMax - (deInt64)intersectionMin; in computeEntryReadWeight()
1112 …int maxScalars = state.getShaderParameters().maxCombinedVariableScalars - state.getVariableMan… in VariableRead()
1126 // Use random entry \todo [pyry] Handle -inf..inf ranges? in VariableRead()
1127 …e.getVariableManager().getBegin(filter), state.getVariableManager().getEnd(filter))->getVariable(); in VariableRead()
1154 weights[ndx] = computeEntryReadWeight(availableVars[ndx]->getValueRange(), valueRange); in VariableRead()
1158 m_variable = entry->getVariable(); in VariableRead()
1161 ValueRange intersection(m_variable->getType()); in VariableRead()
1162 ValueRange::computeIntersection(intersection, entry->getValueRange(), valueRange); in VariableRead()
1212 m_variable = entry->getVariable(); in VariableWrite()
1222 state.getVariableManager().setValue(m_variable, parentEntry->getValueRange()); in VariableWrite()
1227 ValueRange infRange(m_variable->getType()); in VariableWrite()
1273 str << Token::LEFT_PAREN; in tokenize()
1274 m_child->tokenize(state, str); in tokenize()
1275 str << Token::RIGHT_PAREN; in tokenize()
1301 DE_ASSERT(!m_outValueRange.getType().isVoid()); // \todo [2011-06-13 pyry] Void support in SwizzleOp()
1311 // \todo [2011-06-13 pyry] Use components multiple times. in SwizzleOp()
1346 // Initialize all inputs to -inf..inf in createNextChild()
1368 const char* xyzwSet[] = { "x", "y", "z", "w" }; in tokenize()
1384 m_child->tokenize(state, str); in tokenize()
1385 str << Token::DOT << Token(swizzleStr.c_str()); in tokenize()
1401 int availableLevels = state.getShaderParameters().maxExpressionDepth - state.getExpressionDepth(); in getWeight()
1412 m_child->evaluate(execCtx); in evaluate()
1414 ExecConstValueAccess inValue = m_child->getValue(); in evaluate()
1499 state.getVariableManager().getEnd(IsSamplerEntry(samplerType)))->getVariable(); in TexLookup()
1537 coordRange.getMin().component(ndx) = neg ? -4.0f : 2.25f; in createNextChild()
1538 coordRange.getMax().component(ndx) = neg ? -2.25f : 4.0f; in createNextChild()
1542 coordRange.getMin().component(ndx) = -2.0f; in createNextChild()
1555 setInfiniteRange(coordRange); // Initialize base range with -inf..inf in createNextChild()
1561 coordRange.getMin().component(2) = neg ? -4.0f : 0.25f; in createNextChild()
1562 coordRange.getMax().component(2) = neg ? -0.25f : 4.0f; in createNextChild()
1608 str << Token::LEFT_PAREN; in tokenize()
1609 str << m_sampler->getName(); in tokenize()
1610 str << Token::COMMA; in tokenize()
1611 m_coordExpr->tokenize(state, str); in tokenize()
1615 str << Token::COMMA; in tokenize()
1616 m_lodBiasExpr->tokenize(state, str); in tokenize()
1619 str << Token::RIGHT_PAREN; in tokenize()
1627 int availableLevels = state.getShaderParameters().maxExpressionDepth - state.getExpressionDepth(); in getWeight()
1655 m_coordExpr->evaluate(execCtx); in evaluate()
1657 m_lodBiasExpr->evaluate(execCtx); in evaluate()
1659 ExecConstValueAccess coords = m_coordExpr->getValue(); in evaluate()
1681 ExecConstValueAccess lod = m_lodBiasExpr->getValue(); in evaluate()
1714 ExecConstValueAccess lod = m_lodBiasExpr->getValue(); in evaluate()
1748 ExecConstValueAccess lod = m_lodBiasExpr->getValue(); in evaluate()