Lines Matching refs:valueRange

66 	IsReadableIntersectingEntry (ConstValueRangeAccess valueRange, deUint32 exprFlags)  in IsReadableIntersectingEntry()  argument
68 , m_valueRange (valueRange) in IsReadableIntersectingEntry()
95 IsWritableIntersectingEntry (ConstValueRangeAccess valueRange) in IsWritableIntersectingEntry() argument
96 : m_valueRange(valueRange) in IsWritableIntersectingEntry()
116 IsWritableSupersetEntry (ConstValueRangeAccess valueRange) in IsWritableSupersetEntry() argument
117 : m_valueRange(valueRange) in IsWritableSupersetEntry()
164 void computeRandomValueRangeForInfElements (GeneratorState& state, ValueRangeAccess valueRange) in computeRandomValueRangeForInfElements() argument
166 const VariableType& type = valueRange.getType(); in computeRandomValueRangeForInfElements()
178 if (valueRange.getMin().component(ndx).asScalar() != Scalar::min<int>() || in computeRandomValueRangeForInfElements()
179 valueRange.getMax().component(ndx).asScalar() != Scalar::max<int>()) in computeRandomValueRangeForInfElements()
190 valueRange.getMin().component(ndx).asInt() = minVal; in computeRandomValueRangeForInfElements()
191 valueRange.getMax().component(ndx).asInt() = maxVal; in computeRandomValueRangeForInfElements()
198 if (valueRange.getMin().component(ndx).asScalar() != Scalar::min<float>() || in computeRandomValueRangeForInfElements()
199 valueRange.getMax().component(ndx).asScalar() != Scalar::max<float>()) in computeRandomValueRangeForInfElements()
212 valueRange.getMin().component(ndx).asFloat() = minVal; in computeRandomValueRangeForInfElements()
213 valueRange.getMax().component(ndx).asFloat() = maxVal; in computeRandomValueRangeForInfElements()
223 void setInfiniteRange (ValueRangeAccess valueRange) in setInfiniteRange() argument
225 const VariableType& type = valueRange.getType(); in setInfiniteRange()
232 valueRange.getMin().component(ndx) = Scalar::min<bool>(); in setInfiniteRange()
233 valueRange.getMax().component(ndx) = Scalar::max<bool>(); in setInfiniteRange()
240 valueRange.getMin().component(ndx) = Scalar::min<int>(); in setInfiniteRange()
241 valueRange.getMax().component(ndx) = Scalar::max<int>(); in setInfiniteRange()
248 valueRange.getMin().component(ndx) = Scalar::min<float>(); in setInfiniteRange()
249 valueRange.getMax().component(ndx) = Scalar::max<float>(); in setInfiniteRange()
272 …const GeneratorState& state, ConstValueRangeAccess valueRange) { return T::getWeight(state, valueR… in getWeight() argument
273 …create (GeneratorState& state, ConstValueRangeAccess valueRange) { return new T(state, valueRang… in create() argument
277 float (*getWeight) (const GeneratorState& state, ConstValueRangeAccess valueRange);
278 Expression* (*create) (GeneratorState& state, ConstValueRangeAccess valueRange);
329 …GeneratorState& state, const ExpressionSpec* specs, int numSpecs, ConstValueRangeAccess valueRange) in chooseExpression() argument
337 weights[ndx] = specs[ndx].getWeight(state, valueRange); in chooseExpression()
349 Expression* Expression::createRandom (GeneratorState& state, ConstValueRangeAccess valueRange) in createRandom() argument
351 …xpressionSpecs, (int)DE_LENGTH_OF_ARRAY(s_expressionSpecs), valueRange)->create(state, valueRange); in createRandom()
354 Expression* Expression::createRandomLValue (GeneratorState& state, ConstValueRangeAccess valueRange) in createRandomLValue() argument
356 …ate, s_lvalueSpecs, (int)DE_LENGTH_OF_ARRAY(s_lvalueSpecs), valueRange)->create(state, valueRange); in createRandomLValue()
359 FloatLiteral::FloatLiteral (GeneratorState& state, ConstValueRangeAccess valueRange) in FloatLiteral() argument
366 if (valueRange.getType() == VariableType(VariableType::TYPE_FLOAT, 1)) in FloatLiteral()
368 minVal = valueRange.getMin().component(0).asFloat(); in FloatLiteral()
369 maxVal = valueRange.getMax().component(0).asFloat(); in FloatLiteral()
387 float FloatLiteral::getWeight (const GeneratorState& state, ConstValueRangeAccess valueRange) in getWeight() argument
390 const VariableType& type = valueRange.getType(); in getWeight()
393 float minVal = valueRange.getMin().asFloat(); in getWeight()
394 float maxVal = valueRange.getMax().asFloat(); in getWeight()
417 IntLiteral::IntLiteral (GeneratorState& state, ConstValueRangeAccess valueRange) in IntLiteral() argument
423 if (valueRange.getType() == VariableType(VariableType::TYPE_INT, 1)) in IntLiteral()
425 minVal = valueRange.getMin().component(0).asInt(); in IntLiteral()
426 maxVal = valueRange.getMax().component(0).asInt(); in IntLiteral()
442 float IntLiteral::getWeight (const GeneratorState& state, ConstValueRangeAccess valueRange) in getWeight() argument
445 const VariableType& type = valueRange.getType(); in getWeight()
448 int minVal = valueRange.getMin().asInt(); in getWeight()
449 int maxVal = valueRange.getMax().asInt(); in getWeight()
471 BoolLiteral::BoolLiteral (GeneratorState& state, ConstValueRangeAccess valueRange) in BoolLiteral() argument
477 if (valueRange.getType() == VariableType(VariableType::TYPE_BOOL, 1)) in BoolLiteral()
479 minVal = valueRange.getMin().component(0).asBool() ? 1 : 0; in BoolLiteral()
480 maxVal = valueRange.getMax().component(0).asBool() ? 1 : 0; in BoolLiteral()
490 float BoolLiteral::getWeight (const GeneratorState& state, ConstValueRangeAccess valueRange) in getWeight() argument
493 const VariableType& type = valueRange.getType(); in getWeight()
598 bool isConversionOk (ConstValueRangeAccess valueRange) in isConversionOk() argument
600 …rsionOk<SrcType>(getValueAccessValue<DstType>(valueRange.getMin()), getValueAccessValue<DstType>(v… in isConversionOk()
634 …ersionOk (VariableType::Type srcType, VariableType::Type dstType, ConstValueRangeAccess valueRange) in isConversionOk() argument
643 return convTable[getBaseTypeConvNdx(srcType)][getBaseTypeConvNdx(dstType)](valueRange); in isConversionOk()
674 ConstructorOp::ConstructorOp (GeneratorState& state, ConstValueRangeAccess valueRange) in ConstructorOp() argument
675 : m_valueRange(valueRange) in ConstructorOp()
677 if (valueRange.getType().isVoid()) in ConstructorOp()
761 float ConstructorOp::getWeight (const GeneratorState& state, ConstValueRangeAccess valueRange) in getWeight() argument
763 if (valueRange.getType().isVoid()) in getWeight()
766 …if (!valueRange.getType().isFloatOrVec() && !valueRange.getType().isIntOrVec() && !valueRange.getT… in getWeight()
769 …if (state.getExpressionDepth() + getTypeConstructorDepth(valueRange.getType()) > state.getShaderPa… in getWeight()
815 AssignOp::AssignOp (GeneratorState& state, ConstValueRangeAccess valueRange) in AssignOp() argument
816 : m_valueRange (valueRange) in AssignOp()
885 float AssignOp::getWeight (const GeneratorState& state, ConstValueRangeAccess valueRange) in getWeight() argument
887 if (!valueRange.getType().isVoid() && in getWeight()
888 !canAllocateVariable(state, valueRange.getType()) && in getWeight()
889 !state.getVariableManager().hasEntry(IsWritableIntersectingEntry(valueRange))) in getWeight()
892 …if (!valueRange.getType().isVoid() && state.getExpressionDepth() + getTypeConstructorDepth(valueRa… in getWeight()
895 if (valueRange.getType().isVoid() && in getWeight()
959 Variable* allocateNewVariable (GeneratorState& state, ConstValueRangeAccess valueRange) in allocateNewVariable() argument
961 Variable* variable = state.getVariableManager().allocate(valueRange.getType()); in allocateNewVariable()
964 state.getVariableManager().setValue(variable, valueRange); in allocateNewVariable()
977 float dynWeight = computeDynamicRangeWeight(valueRange); in allocateNewVariable()
978 int numScalars = valueRange.getType().getScalarSize(); in allocateNewVariable()
980 bool shaderInOk = isShaderInOutSupportedType(valueRange.getType()) && in allocateNewVariable()
1082 VariableRead::VariableRead (GeneratorState& state, ConstValueRangeAccess valueRange) in VariableRead() argument
1084 if (valueRange.getType().isVoid()) in VariableRead()
1108 …irst = state.getVariableManager().getBegin(IsReadableIntersectingEntry(valueRange, state.getExpres… in VariableRead()
1109 …r end = state.getVariableManager().getEnd(IsReadableIntersectingEntry(valueRange, state.getExpres… in VariableRead()
1112 …bool createVar = canAllocateVariable(state, valueRange.getType()) && (first == end || getWeigh… in VariableRead()
1116 m_variable = allocateNewVariable(state, valueRange); in VariableRead()
1129 weights[ndx] = computeEntryReadWeight(availableVars[ndx]->getValueRange(), valueRange); in VariableRead()
1137 ValueRange::computeIntersection(intersection, entry->getValueRange(), valueRange); in VariableRead()
1148 float VariableRead::getWeight (const GeneratorState& state, ConstValueRangeAccess valueRange) in getWeight() argument
1150 if (valueRange.getType().isVoid()) in getWeight()
1159 if (!canAllocateVariable(state, valueRange.getType()) && in getWeight()
1160 …!state.getVariableManager().hasEntry(IsReadableIntersectingEntry(valueRange, state.getExpressionFl… in getWeight()
1166 VariableWrite::VariableWrite (GeneratorState& state, ConstValueRangeAccess valueRange) in VariableWrite() argument
1168 DE_ASSERT(!valueRange.getType().isVoid()); in VariableWrite()
1171 …etEntry::Iterator first = state.getVariableManager().getBegin(IsWritableSupersetEntry(valueRange)); in VariableWrite()
1172 …ersetEntry::Iterator end = state.getVariableManager().getEnd(IsWritableSupersetEntry(valueRange)); in VariableWrite()
1175 …bool createVar = canAllocateVariable(state, valueRange.getType()) && (first == end || getWeigh… in VariableWrite()
1179 m_variable = state.getVariableManager().allocate(valueRange.getType()); in VariableWrite()
1209 float VariableWrite::getWeight (const GeneratorState& state, ConstValueRangeAccess valueRange) in getWeight() argument
1211 if (!canAllocateVariable(state, valueRange.getType()) && in getWeight()
1212 !state.getVariableManager().hasEntry(IsWritableSupersetEntry(valueRange))) in getWeight()
1223 ParenOp::ParenOp (GeneratorState& state, ConstValueRangeAccess valueRange) in ParenOp() argument
1224 : m_valueRange (valueRange) in ParenOp()
1253 float ParenOp::getWeight (const GeneratorState& state, ConstValueRangeAccess valueRange) in getWeight() argument
1255 if (valueRange.getType().isVoid()) in getWeight()
1259 int requiredDepth = 1 + getConservativeValueExprDepth(state, valueRange); in getWeight()
1266 SwizzleOp::SwizzleOp (GeneratorState& state, ConstValueRangeAccess valueRange) in SwizzleOp() argument
1267 : m_outValueRange (valueRange) in SwizzleOp()
1358 float SwizzleOp::getWeight (const GeneratorState& state, ConstValueRangeAccess valueRange) in getWeight() argument
1366 if (!valueRange.getType().isFloatOrVec() && in getWeight()
1367 !valueRange.getType().isIntOrVec() && in getWeight()
1368 !valueRange.getType().isBoolOrVec()) in getWeight()
1407 TexLookup::TexLookup (GeneratorState& state, ConstValueRangeAccess valueRange) in TexLookup() argument
1414 DE_ASSERT(valueRange.getType() == VariableType(VariableType::TYPE_FLOAT, 4)); in TexLookup()
1415 DE_UNREF(valueRange); // Texture output value range is constant. in TexLookup()
1592 float TexLookup::getWeight (const GeneratorState& state, ConstValueRangeAccess valueRange) in getWeight() argument
1606 if (valueRange.getType() != VariableType(VariableType::TYPE_FLOAT, 4)) in getWeight()
1616 if (!valueRange.isSupersetOf(texOutputRange)) in getWeight()