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;
302 gls::DrawTestSpec spec;
307 genBasicSpec(spec, m_method);
323 spec.indexType = indexTest.type;
324 spec.indexStorage = indexTest.storage;
328 spec.indexMin = 0;
329 spec.indexMax = 55;
335 spec.indexPointerOffset = indexTest.offsets[iterationNdx];
336 test->addIteration(spec, iterationDesc.c_str());
339 DE_ASSERT(spec.isCompatibilityTest() == gls::DrawTestSpec::COMPATIBILITY_UNALIGNED_OFFSET ||
340 spec.isCompatibilityTest() == gls::DrawTestSpec::COMPATIBILITY_UNALIGNED_STRIDE);
523 gls::DrawTestSpec spec;
525 spec.apiType = glu::ApiType::es(3,0);
526 spec.primitive = random.chooseWeighted<gls::DrawTestSpec::Primitive> (DE_ARRAY_BEGIN(primitives), DE_ARRAY_END(primitives), primitiveWeights.weights);
527 spec.primitiveCount = random.chooseWeighted<int, const int*, const float*> (DE_ARRAY_BEGIN(primitiveCounts), DE_ARRAY_END(primitiveCounts), primitiveCountWeights);
528 spec.drawMethod = random.chooseWeighted<gls::DrawTestSpec::DrawMethod> (DE_ARRAY_BEGIN(drawMethods), DE_ARRAY_END(drawMethods), drawMethodWeights.weights);
529 spec.indexType = random.chooseWeighted<gls::DrawTestSpec::IndexType> (DE_ARRAY_BEGIN(indexTypes), DE_ARRAY_END(indexTypes), indexTypeWeights.weights);
530 spec.indexPointerOffset = random.chooseWeighted<int, const int*, const float*> (DE_ARRAY_BEGIN(indexOffsets), DE_ARRAY_END(indexOffsets), indexOffsetWeights);
531 spec.indexStorage = random.chooseWeighted<gls::DrawTestSpec::Storage> (DE_ARRAY_BEGIN(storages), DE_ARRAY_END(storages), storageWeights.weights);
532 spec.first = random.chooseWeighted<int, const int*, const float*> (DE_ARRAY_BEGIN(firsts), DE_ARRAY_END(firsts), firstWeights);
533 spec.indexMin = random.chooseWeighted<int, const int*, const float*> (DE_ARRAY_BEGIN(indexMins), DE_ARRAY_END(indexMins), indexWeights);
534 spec.indexMax = random.chooseWeighted<int, const int*, const float*> (DE_ARRAY_BEGIN(indexMaxs), DE_ARRAY_END(indexMaxs), indexWeights);
535 spec.instanceCount = random.chooseWeighted<int, const int*, const float*> (DE_ARRAY_BEGIN(instanceCounts), DE_ARRAY_END(instanceCounts), instanceWeights);
537 // check spec is legal
538 if (!spec.valid())
557 // check spec is legal
558 valid = attribSpec.valid(spec.apiType);
567 spec.attribs.push_back(attribSpec);
573 if (spec.primitive != gls::DrawTestSpec::PRIMITIVE_POINTS)
574 spec.attribs[0].instanceDivisor = 0;
579 if (spec.drawMethod == gls::DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_RANGED && spec.indexMin == spec.indexMax && spec.primitive != gls::DrawTestSpec::PRIMITIVE_POINTS)
581 if (spec.attribs[0].useDefaultAttribute && spec.primitive != gls::DrawTestSpec::PRIMITIVE_POINTS)
585 if (spec.primitive == gls::DrawTestSpec::PRIMITIVE_TRIANGLES || spec.primitive == gls::DrawTestSpec::PRIMITIVE_TRIANGLE_FAN || spec.primitive == gls::DrawTestSpec::PRIMITIVE_TRIANGLE_STRIP)
587 if (spec.attribs[0].componentCount == 1)
589 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)
591 if (spec.drawMethod == gls::DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_RANGED && (spec.indexMax - spec.indexMin) < 2)
598 deUint32 hash = spec.hash();
600 hash = (hash << 2) ^ (deUint32)spec.attribs[attrNdx].hash();
605 if (spec.isCompatibilityTest() == gls::DrawTestSpec::COMPATIBILITY_UNALIGNED_OFFSET ||
606 spec.isCompatibilityTest() == gls::DrawTestSpec::COMPATIBILITY_UNALIGNED_STRIDE)
607 this->addChild(new gls::DrawTest(m_testCtx, m_context.getRenderContext(), spec, de::toString(insertedCount).c_str(), spec.getDesc().c_str()));