Lines Matching full:spec
2048 DE_ASSERT(((const deUint8*)indexOffset - (const deUint8*)DE_NULL) % gls::DrawTestSpec::indexTypeSize(indexType) == 0); // \note This is checked in spec validation
2126 DrawTestSpec::AttributeSpec spec;
2128 spec.inputType = inputType;
2129 spec.outputType = outputType;
2130 spec.storage = storage;
2131 spec.usage = usage;
2132 spec.componentCount = componentCount;
2133 spec.offset = offset;
2134 spec.stride = stride;
2135 spec.normalize = normalize;
2136 spec.instanceDivisor = instanceDivisor;
2138 spec.useDefaultAttribute= false;
2140 return spec;
2148 DrawTestSpec::AttributeSpec spec;
2150 spec.inputType = inputType;
2151 spec.outputType = outputType;
2152 spec.storage = DrawTestSpec::STORAGE_LAST;
2153 spec.usage = DrawTestSpec::USAGE_LAST;
2154 spec.componentCount = componentCount;
2155 spec.offset = 0;
2156 spec.stride = 0;
2157 spec.normalize = 0;
2158 spec.instanceDivisor = 0;
2160 spec.useDefaultAttribute = true;
2162 return spec;
3118 DrawTest::DrawTest (tcu::TestContext& testCtx, glu::RenderContext& renderCtx, const DrawTestSpec& spec, const char* name, const char* desc)
3132 addIteration(spec);
3156 void DrawTest::addIteration (const DrawTestSpec& spec, const char* description)
3158 // Validate spec
3159 const bool validSpec = spec.valid();
3168 const bool validContext = m_specs[0].apiType == spec.apiType;
3175 m_specs.push_back(spec);
3240 const DrawTestSpec& spec = m_specs[specNdx];
3246 const MethodInfo methodInfo = getMethodInfo(spec.drawMethod);
3253 const size_t primitiveElementCount = getElementCount(spec.primitive, spec.primitiveCount); // !< elements to be drawn
3254 const int indexMin = (ranged) ? (spec.indexMin) : (0);
3255 const int firstAddition = (hasFirst) ? (spec.first) : (0);
3256 const int baseVertexAddition = (hasBaseVtx && spec.baseVertex > 0) ? ( spec.baseVertex) : (0); // spec.baseVertex > 0 => Create bigger attribute buffer
3257 const int indexBase = (hasBaseVtx && spec.baseVertex < 0) ? (-spec.baseVertex) : (0); // spec.baseVertex < 0 => Create bigger indices
3260 const int indexMax = de::max(0, (ranged) ? (de::clamp<int>(spec.indexMax, 0, maxElementIndex)) : (maxElementIndex));
3261 float coordScale = getCoordScale(spec);
3262 float colorScale = getColorScale(spec);
3267 m_testCtx.getLog() << TestLog::Message << spec.getMultilineDesc() << TestLog::EndMessage;
3275 for (int attribNdx = 0; attribNdx < (int)spec.attribs.size(); attribNdx++)
3277 DrawTestSpec::AttributeSpec attribSpec = spec.attribs[attribNdx];
3282 const int seed = 10 * attribSpec.hash() + 100 * spec.hash() + attribNdx;
3293 const int seed = attribSpec.hash() + 100 * spec.hash() + attribNdx;
3296 const size_t evaluatedElementCount = (instanced && attribSpec.instanceDivisor > 0) ? (spec.instanceCount / attribSpec.instanceDivisor + 1) : (elementCount);
3297 const size_t referencedElementCount = (ranged) ? (de::max<size_t>(evaluatedElementCount, spec.indexMax + 1)) : (evaluatedElementCount);
3336 const int seed = spec.hash();
3337 const size_t indexElementSize = DrawTestSpec::indexTypeSize(spec.indexType);
3338 const size_t indexArraySize = spec.indexPointerOffset + indexElementSize * elementCount;
3339 const char* indexArray = RandomArrayGenerator::generateIndices(seed, (int)elementCount, spec.indexType, spec.indexPointerOffset, indexMin, indexMax, indexBase);
3340 const char* indexPointerBase = (spec.indexStorage == DrawTestSpec::STORAGE_USER) ? (indexArray) : ((char*)DE_NULL);
3341 const char* indexPointer = indexPointerBase + spec.indexPointerOffset;
3343 de::UniquePtr<AttributeArray> glArray (new AttributeArray(spec.indexStorage, *m_glesContext));
3344 de::UniquePtr<AttributeArray> rrArray (new AttributeArray(spec.indexStorage, *m_refContext));
3351 m_glArrayPack->render(spec.primitive, spec.drawMethod, 0, (int)primitiveElementCount, spec.indexType, indexPointer, spec.indexMin, spec.indexMax, spec.instanceCount, spec.indirectOffset, spec.baseVertex, coordScale, colorScale, glArray.get());
3352 m_rrArrayPack->render(spec.primitive, spec.drawMethod, 0, (int)primitiveElementCount, spec.indexType, indexPointer, spec.indexMin, spec.indexMax, spec.instanceCount, spec.indirectOffset, spec.baseVertex, coordScale, colorScale, rrArray.get());
3365 m_glArrayPack->render(spec.primitive, spec.drawMethod, spec.first, (int)primitiveElementCount, DrawTestSpec::INDEXTYPE_LAST, DE_NULL, 0, 0, spec.instanceCount, spec.indirectOffset, 0, coordScale, colorScale, DE_NULL);
3366 m_rrArrayPack->render(spec.primitive, spec.drawMethod, spec.first, (int)primitiveElementCount, DrawTestSpec::INDEXTYPE_LAST, DE_NULL, 0, 0, spec.instanceCount, spec.indirectOffset, 0, coordScale, colorScale, DE_NULL);
3373 const DrawTestSpec::CompatibilityTestType ctype = spec.isCompatibilityTest();
3387 if (!compare(spec.primitive))
3389 const DrawTestSpec::CompatibilityTestType ctype = spec.isCompatibilityTest();
3834 float DrawTest::getCoordScale (const DrawTestSpec& spec) const
3838 for (int arrayNdx = 0; arrayNdx < (int)spec.attribs.size(); arrayNdx++)
3840 DrawTestSpec::AttributeSpec attribSpec = spec.attribs[arrayNdx];
3879 float DrawTest::getColorScale (const DrawTestSpec& spec) const
3883 for (int arrayNdx = 1; arrayNdx < (int)spec.attribs.size(); arrayNdx++)
3885 DrawTestSpec::AttributeSpec attribSpec = spec.attribs[arrayNdx];