Lines Matching full:spec
225 static void genBasicSpec (gls::DrawTestSpec& spec, gls::DrawTestSpec::DrawMethod method)
227 spec.apiType = glu::ApiType::es(3,0);
228 spec.primitive = gls::DrawTestSpec::PRIMITIVE_TRIANGLES;
229 spec.primitiveCount = 5;
230 spec.drawMethod = method;
231 spec.indexType = gls::DrawTestSpec::INDEXTYPE_LAST;
232 spec.indexPointerOffset = 0;
233 spec.indexStorage = gls::DrawTestSpec::STORAGE_LAST;
234 spec.first = 0;
235 spec.indexMin = 0;
236 spec.indexMax = 0;
237 spec.instanceCount = 1;
239 spec.attribs.resize(2);
241 spec.attribs[0].inputType = gls::DrawTestSpec::INPUTTYPE_FLOAT;
242 spec.attribs[0].outputType = gls::DrawTestSpec::OUTPUTTYPE_VEC2;
243 spec.attribs[0].storage = gls::DrawTestSpec::STORAGE_BUFFER;
244 spec.attribs[0].usage = gls::DrawTestSpec::USAGE_STATIC_DRAW;
245 spec.attribs[0].componentCount = 4;
246 spec.attribs[0].offset = 0;
247 spec.attribs[0].stride = 0;
248 spec.attribs[0].normalize = false;
249 spec.attribs[0].instanceDivisor = 0;
250 spec.attribs[0].useDefaultAttribute = false;
252 spec.attribs[1].inputType = gls::DrawTestSpec::INPUTTYPE_FLOAT;
253 spec.attribs[1].outputType = gls::DrawTestSpec::OUTPUTTYPE_VEC2;
254 spec.attribs[1].storage = gls::DrawTestSpec::STORAGE_BUFFER;
255 spec.attribs[1].usage = gls::DrawTestSpec::USAGE_STATIC_DRAW;
256 spec.attribs[1].componentCount = 2;
257 spec.attribs[1].offset = 0;
258 spec.attribs[1].stride = 0;
259 spec.attribs[1].normalize = false;
260 spec.attribs[1].instanceDivisor = 0;
261 spec.attribs[1].useDefaultAttribute = false;
313 gls::DrawTestSpec spec;
321 genBasicSpec(spec, m_method);
337 spec.indexType = indexTest.type;
338 spec.indexStorage = indexTest.storage;
342 spec.indexMin = 0;
343 spec.indexMax = 55;
349 spec.indexPointerOffset = indexTest.offsets[iterationNdx];
350 test->addIteration(spec, iterationDesc.c_str());
353 if (spec.isCompatibilityTest() == gls::DrawTestSpec::COMPATIBILITY_UNALIGNED_OFFSET ||
354 spec.isCompatibilityTest() == gls::DrawTestSpec::COMPATIBILITY_UNALIGNED_STRIDE)
537 gls::DrawTestSpec spec;
539 spec.apiType = glu::ApiType::es(3,0);
540 spec.primitive = random.chooseWeighted<gls::DrawTestSpec::Primitive> (DE_ARRAY_BEGIN(primitives), DE_ARRAY_END(primitives), primitiveWeights.weights);
541 spec.primitiveCount = random.chooseWeighted<int, const int*, const float*> (DE_ARRAY_BEGIN(primitiveCounts), DE_ARRAY_END(primitiveCounts), primitiveCountWeights);
542 spec.drawMethod = random.chooseWeighted<gls::DrawTestSpec::DrawMethod> (DE_ARRAY_BEGIN(drawMethods), DE_ARRAY_END(drawMethods), drawMethodWeights.weights);
543 spec.indexType = random.chooseWeighted<gls::DrawTestSpec::IndexType> (DE_ARRAY_BEGIN(indexTypes), DE_ARRAY_END(indexTypes), indexTypeWeights.weights);
544 spec.indexPointerOffset = random.chooseWeighted<int, const int*, const float*> (DE_ARRAY_BEGIN(indexOffsets), DE_ARRAY_END(indexOffsets), indexOffsetWeights);
545 spec.indexStorage = random.chooseWeighted<gls::DrawTestSpec::Storage> (DE_ARRAY_BEGIN(storages), DE_ARRAY_END(storages), storageWeights.weights);
546 spec.first = random.chooseWeighted<int, const int*, const float*> (DE_ARRAY_BEGIN(firsts), DE_ARRAY_END(firsts), firstWeights);
547 spec.indexMin = random.chooseWeighted<int, const int*, const float*> (DE_ARRAY_BEGIN(indexMins), DE_ARRAY_END(indexMins), indexWeights);
548 spec.indexMax = random.chooseWeighted<int, const int*, const float*> (DE_ARRAY_BEGIN(indexMaxs), DE_ARRAY_END(indexMaxs), indexWeights);
549 spec.instanceCount = random.chooseWeighted<int, const int*, const float*> (DE_ARRAY_BEGIN(instanceCounts), DE_ARRAY_END(instanceCounts), instanceWeights);
551 // check spec is legal
552 if (!spec.valid())
571 // check spec is legal
572 valid = attribSpec.valid(spec.apiType);
581 spec.attribs.push_back(attribSpec);
587 if (spec.primitive != gls::DrawTestSpec::PRIMITIVE_POINTS)
588 spec.attribs[0].instanceDivisor = 0;
593 if (spec.drawMethod == gls::DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_RANGED && spec.indexMin == spec.indexMax && spec.primitive != gls::DrawTestSpec::PRIMITIVE_POINTS)
595 if (spec.attribs[0].useDefaultAttribute && spec.primitive != gls::DrawTestSpec::PRIMITIVE_POINTS)
599 if (spec.primitive == gls::DrawTestSpec::PRIMITIVE_TRIANGLES || spec.primitive == gls::DrawTestSpec::PRIMITIVE_TRIANGLE_FAN || spec.primitive == gls::DrawTestSpec::PRIMITIVE_TRIANGLE_STRIP)
601 if (spec.attribs[0].componentCount == 1)
603 if (spec.attribs[0].outputType == gls::DrawTestSpec::OUTPUTTYPE_FLOAT || spec.attribs[0].outputType == gls::DrawTestSpec::OUTPUTTYPE_INT || spec.attribs[0].outputType == gls::DrawTestSpec::OUTPUTTYPE_UINT)
605 if (spec.drawMethod == gls::DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_RANGED && (spec.indexMax - spec.indexMin) < 2)
612 deUint32 hash = spec.hash();
614 hash = (hash << 2) ^ (deUint32)spec.attribs[attrNdx].hash();
619 if (spec.isCompatibilityTest() == gls::DrawTestSpec::COMPATIBILITY_UNALIGNED_OFFSET ||
620 spec.isCompatibilityTest() == gls::DrawTestSpec::COMPATIBILITY_UNALIGNED_STRIDE)
621 this->addChild(new gls::DrawTest(m_testCtx, m_context.getRenderContext(), spec, de::toString(insertedCount).c_str(), spec.getDesc().c_str()));