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()
399 float FloatLiteral::getWeight (const GeneratorState& state, ConstValueRangeAccess valueRange) in getWeight() argument
402 const VariableType& type = valueRange.getType(); in getWeight()
405 float minVal = valueRange.getMin().asFloat(); in getWeight()
406 float maxVal = valueRange.getMax().asFloat(); in getWeight()
429 IntLiteral::IntLiteral (GeneratorState& state, ConstValueRangeAccess valueRange) in IntLiteral() argument
435 if (valueRange.getType() == VariableType(VariableType::TYPE_INT, 1)) in IntLiteral()
437 minVal = valueRange.getMin().component(0).asInt(); in IntLiteral()
438 maxVal = valueRange.getMax().component(0).asInt(); in IntLiteral()
454 float IntLiteral::getWeight (const GeneratorState& state, ConstValueRangeAccess valueRange) in getWeight() argument
457 const VariableType& type = valueRange.getType(); in getWeight()
460 int minVal = valueRange.getMin().asInt(); in getWeight()
461 int maxVal = valueRange.getMax().asInt(); in getWeight()
483 BoolLiteral::BoolLiteral (GeneratorState& state, ConstValueRangeAccess valueRange) in BoolLiteral() argument
489 if (valueRange.getType() == VariableType(VariableType::TYPE_BOOL, 1)) in BoolLiteral()
491 minVal = valueRange.getMin().component(0).asBool() ? 1 : 0; in BoolLiteral()
492 maxVal = valueRange.getMax().component(0).asBool() ? 1 : 0; in BoolLiteral()
515 float BoolLiteral::getWeight (const GeneratorState& state, ConstValueRangeAccess valueRange) in getWeight() argument
518 const VariableType& type = valueRange.getType(); in getWeight()
623 bool isConversionOk (ConstValueRangeAccess valueRange) in isConversionOk() argument
625 …rsionOk<SrcType>(getValueAccessValue<DstType>(valueRange.getMin()), getValueAccessValue<DstType>(v… in isConversionOk()
659 …ersionOk (VariableType::Type srcType, VariableType::Type dstType, ConstValueRangeAccess valueRange) in isConversionOk() argument
668 return convTable[getBaseTypeConvNdx(srcType)][getBaseTypeConvNdx(dstType)](valueRange); in isConversionOk()
699 ConstructorOp::ConstructorOp (GeneratorState& state, ConstValueRangeAccess valueRange) in ConstructorOp() argument
700 : m_valueRange(valueRange) in ConstructorOp()
702 if (valueRange.getType().isVoid()) in ConstructorOp()
786 float ConstructorOp::getWeight (const GeneratorState& state, ConstValueRangeAccess valueRange) in getWeight() argument
788 if (valueRange.getType().isVoid()) in getWeight()
791 …if (!valueRange.getType().isFloatOrVec() && !valueRange.getType().isIntOrVec() && !valueRange.getT… in getWeight()
794 …if (state.getExpressionDepth() + getTypeConstructorDepth(valueRange.getType()) > state.getShaderPa… in getWeight()
840 AssignOp::AssignOp (GeneratorState& state, ConstValueRangeAccess valueRange) in AssignOp() argument
841 : m_valueRange (valueRange) in AssignOp()
910 float AssignOp::getWeight (const GeneratorState& state, ConstValueRangeAccess valueRange) in getWeight() argument
912 if (!valueRange.getType().isVoid() && in getWeight()
913 !canAllocateVariable(state, valueRange.getType()) && in getWeight()
914 !state.getVariableManager().hasEntry(IsWritableIntersectingEntry(valueRange))) in getWeight()
917 …if (!valueRange.getType().isVoid() && state.getExpressionDepth() + getTypeConstructorDepth(valueRa… in getWeight()
920 if (valueRange.getType().isVoid() && in getWeight()
984 Variable* allocateNewVariable (GeneratorState& state, ConstValueRangeAccess valueRange) in allocateNewVariable() argument
986 Variable* variable = state.getVariableManager().allocate(valueRange.getType()); in allocateNewVariable()
989 state.getVariableManager().setValue(variable, valueRange); in allocateNewVariable()
1002 float dynWeight = computeDynamicRangeWeight(valueRange); in allocateNewVariable()
1003 int numScalars = valueRange.getType().getScalarSize(); in allocateNewVariable()
1005 bool shaderInOk = isShaderInOutSupportedType(valueRange.getType()) && in allocateNewVariable()
1107 VariableRead::VariableRead (GeneratorState& state, ConstValueRangeAccess valueRange) in VariableRead() argument
1109 if (valueRange.getType().isVoid()) in VariableRead()
1133 …irst = state.getVariableManager().getBegin(IsReadableIntersectingEntry(valueRange, state.getExpres… in VariableRead()
1134 …r end = state.getVariableManager().getEnd(IsReadableIntersectingEntry(valueRange, state.getExpres… in VariableRead()
1137 …bool createVar = canAllocateVariable(state, valueRange.getType()) && (first == end || getWeigh… in VariableRead()
1141 m_variable = allocateNewVariable(state, valueRange); in VariableRead()
1154 weights[ndx] = computeEntryReadWeight(availableVars[ndx]->getValueRange(), valueRange); in VariableRead()
1162 ValueRange::computeIntersection(intersection, entry->getValueRange(), valueRange); in VariableRead()
1173 float VariableRead::getWeight (const GeneratorState& state, ConstValueRangeAccess valueRange) in getWeight() argument
1175 if (valueRange.getType().isVoid()) in getWeight()
1184 if (!canAllocateVariable(state, valueRange.getType()) && in getWeight()
1185 …!state.getVariableManager().hasEntry(IsReadableIntersectingEntry(valueRange, state.getExpressionFl… in getWeight()
1191 VariableWrite::VariableWrite (GeneratorState& state, ConstValueRangeAccess valueRange) in VariableWrite() argument
1193 DE_ASSERT(!valueRange.getType().isVoid()); in VariableWrite()
1196 …etEntry::Iterator first = state.getVariableManager().getBegin(IsWritableSupersetEntry(valueRange)); in VariableWrite()
1197 …ersetEntry::Iterator end = state.getVariableManager().getEnd(IsWritableSupersetEntry(valueRange)); in VariableWrite()
1200 …bool createVar = canAllocateVariable(state, valueRange.getType()) && (first == end || getWeigh… in VariableWrite()
1204 m_variable = state.getVariableManager().allocate(valueRange.getType()); in VariableWrite()
1234 float VariableWrite::getWeight (const GeneratorState& state, ConstValueRangeAccess valueRange) in getWeight() argument
1236 if (!canAllocateVariable(state, valueRange.getType()) && in getWeight()
1237 !state.getVariableManager().hasEntry(IsWritableSupersetEntry(valueRange))) in getWeight()
1248 ParenOp::ParenOp (GeneratorState& state, ConstValueRangeAccess valueRange) in ParenOp() argument
1249 : m_valueRange (valueRange) in ParenOp()
1283 float ParenOp::getWeight (const GeneratorState& state, ConstValueRangeAccess valueRange) in getWeight() argument
1285 if (valueRange.getType().isVoid()) in getWeight()
1289 int requiredDepth = 1 + getConservativeValueExprDepth(state, valueRange); in getWeight()
1296 SwizzleOp::SwizzleOp (GeneratorState& state, ConstValueRangeAccess valueRange) in SwizzleOp() argument
1297 : m_outValueRange (valueRange) in SwizzleOp()
1388 float SwizzleOp::getWeight (const GeneratorState& state, ConstValueRangeAccess valueRange) in getWeight() argument
1396 if (!valueRange.getType().isFloatOrVec() && in getWeight()
1397 !valueRange.getType().isIntOrVec() && in getWeight()
1398 !valueRange.getType().isBoolOrVec()) in getWeight()
1437 TexLookup::TexLookup (GeneratorState& state, ConstValueRangeAccess valueRange) in TexLookup() argument
1444 DE_ASSERT(valueRange.getType() == VariableType(VariableType::TYPE_FLOAT, 4)); in TexLookup()
1445 DE_UNREF(valueRange); // Texture output value range is constant. in TexLookup()
1622 float TexLookup::getWeight (const GeneratorState& state, ConstValueRangeAccess valueRange) in getWeight() argument
1636 if (valueRange.getType() != VariableType(VariableType::TYPE_FLOAT, 4)) in getWeight()
1646 if (!valueRange.isSupersetOf(texOutputRange.asAccess())) in getWeight()