Lines Matching defs:spec

1985 			DE_ASSERT(offsetAsInteger % gls::DrawTestSpec::indexTypeSize(indexType) == 0); // \note This is checked in spec validation
2063 DrawTestSpec::AttributeSpec spec;
2065 spec.inputType = inputType;
2066 spec.outputType = outputType;
2067 spec.storage = storage;
2068 spec.usage = usage;
2069 spec.componentCount = componentCount;
2070 spec.offset = offset;
2071 spec.stride = stride;
2072 spec.normalize = normalize;
2073 spec.instanceDivisor = instanceDivisor;
2075 spec.useDefaultAttribute= false;
2077 return spec;
2085 DrawTestSpec::AttributeSpec spec;
2087 spec.inputType = inputType;
2088 spec.outputType = outputType;
2089 spec.storage = DrawTestSpec::STORAGE_LAST;
2090 spec.usage = DrawTestSpec::USAGE_LAST;
2091 spec.componentCount = componentCount;
2092 spec.offset = 0;
2093 spec.stride = 0;
2094 spec.normalize = 0;
2095 spec.instanceDivisor = 0;
2097 spec.useDefaultAttribute = true;
2099 return spec;
3055 DrawTest::DrawTest (tcu::TestContext& testCtx, glu::RenderContext& renderCtx, const DrawTestSpec& spec, const char* name, const char* desc)
3070 addIteration(spec);
3095 void DrawTest::addIteration (const DrawTestSpec& spec, const char* description)
3097 // Validate spec
3098 const bool validSpec = spec.valid();
3107 const bool validContext = m_specs[0].apiType == spec.apiType;
3114 m_specs.push_back(spec);
3179 const DrawTestSpec& spec = m_specs[specNdx];
3181 if (spec.drawMethod == DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_BASEVERTEX ||
3182 spec.drawMethod == DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_INSTANCED_BASEVERTEX ||
3183 spec.drawMethod == DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_RANGED_BASEVERTEX)
3198 const MethodInfo methodInfo = getMethodInfo(spec.drawMethod);
3205 const size_t primitiveElementCount = getElementCount(spec.primitive, spec.primitiveCount); // !< elements to be drawn
3206 const int indexMin = (ranged) ? (spec.indexMin) : (0);
3207 const int firstAddition = (hasFirst) ? (spec.first) : (0);
3208 const int baseVertexAddition = (hasBaseVtx && spec.baseVertex > 0) ? ( spec.baseVertex) : (0); // spec.baseVertex > 0 => Create bigger attribute buffer
3209 const int indexBase = (hasBaseVtx && spec.baseVertex < 0) ? (-spec.baseVertex) : (0); // spec.baseVertex < 0 => Create bigger indices
3212 const int indexMax = de::max(0, (ranged) ? (de::clamp<int>(spec.indexMax, 0, maxElementIndex)) : (maxElementIndex));
3213 float coordScale = getCoordScale(spec);
3214 float colorScale = getColorScale(spec);
3219 m_testCtx.getLog() << TestLog::Message << spec.getMultilineDesc() << TestLog::EndMessage;
3227 for (int attribNdx = 0; attribNdx < (int)spec.attribs.size(); attribNdx++)
3229 DrawTestSpec::AttributeSpec attribSpec = spec.attribs[attribNdx];
3234 const int seed = 10 * attribSpec.hash() + 100 * spec.hash() + attribNdx;
3245 const int seed = attribSpec.hash() + 100 * spec.hash() + attribNdx;
3248 const size_t evaluatedElementCount = (instanced && attribSpec.instanceDivisor > 0) ? (spec.instanceCount / attribSpec.instanceDivisor + 1) : (elementCount);
3249 const size_t referencedElementCount = (ranged) ? (de::max<size_t>(evaluatedElementCount, spec.indexMax + 1)) : (evaluatedElementCount);
3288 const int seed = spec.hash();
3289 const size_t indexElementSize = DrawTestSpec::indexTypeSize(spec.indexType);
3290 const size_t indexArraySize = spec.indexPointerOffset + indexElementSize * elementCount;
3291 const char* indexArray = RandomArrayGenerator::generateIndices(seed, (int)elementCount, spec.indexType, spec.indexPointerOffset, indexMin, indexMax, indexBase);
3292 const char* indexPointerBase = (spec.indexStorage == DrawTestSpec::STORAGE_USER) ? (indexArray) : ((char*)DE_NULL);
3293 const char* indexPointer = indexPointerBase + spec.indexPointerOffset;
3295 de::UniquePtr<AttributeArray> glArray (new AttributeArray(spec.indexStorage, *m_glesContext));
3296 de::UniquePtr<AttributeArray> rrArray (new AttributeArray(spec.indexStorage, *m_refContext));
3303 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());
3304 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());
3317 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);
3319 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);
3326 const DrawTestSpec::CompatibilityTestType ctype = spec.isCompatibilityTest();
3340 if (!compare(spec.primitive))
3342 const DrawTestSpec::CompatibilityTestType ctype = spec.isCompatibilityTest();
3787 float DrawTest::getCoordScale (const DrawTestSpec& spec) const
3791 for (int arrayNdx = 0; arrayNdx < (int)spec.attribs.size(); arrayNdx++)
3793 DrawTestSpec::AttributeSpec attribSpec = spec.attribs[arrayNdx];
3832 float DrawTest::getColorScale (const DrawTestSpec& spec) const
3836 for (int arrayNdx = 1; arrayNdx < (int)spec.attribs.size(); arrayNdx++)
3838 DrawTestSpec::AttributeSpec attribSpec = spec.attribs[arrayNdx];