Home | History | Annotate | Download | only in stress

Lines Matching full:spec

44 static void genBasicSpec (gls::DrawTestSpec& spec, gls::DrawTestSpec::DrawMethod method)
46 spec.apiType = glu::ApiType::es(2,0);
47 spec.primitive = gls::DrawTestSpec::PRIMITIVE_TRIANGLES;
48 spec.primitiveCount = 5;
49 spec.drawMethod = method;
50 spec.indexType = gls::DrawTestSpec::INDEXTYPE_LAST;
51 spec.indexPointerOffset = 0;
52 spec.indexStorage = gls::DrawTestSpec::STORAGE_LAST;
53 spec.first = 0;
54 spec.indexMin = 0;
55 spec.indexMax = 0;
56 spec.instanceCount = 1;
58 spec.attribs.resize(2);
60 spec.attribs[0].inputType = gls::DrawTestSpec::INPUTTYPE_FLOAT;
61 spec.attribs[0].outputType = gls::DrawTestSpec::OUTPUTTYPE_VEC2;
62 spec.attribs[0].storage = gls::DrawTestSpec::STORAGE_BUFFER;
63 spec.attribs[0].usage = gls::DrawTestSpec::USAGE_STATIC_DRAW;
64 spec.attribs[0].componentCount = 4;
65 spec.attribs[0].offset = 0;
66 spec.attribs[0].stride = 0;
67 spec.attribs[0].normalize = false;
68 spec.attribs[0].instanceDivisor = 0;
69 spec.attribs[0].useDefaultAttribute = false;
71 spec.attribs[1].inputType = gls::DrawTestSpec::INPUTTYPE_FLOAT;
72 spec.attribs[1].outputType = gls::DrawTestSpec::OUTPUTTYPE_VEC2;
73 spec.attribs[1].storage = gls::DrawTestSpec::STORAGE_BUFFER;
74 spec.attribs[1].usage = gls::DrawTestSpec::USAGE_STATIC_DRAW;
75 spec.attribs[1].componentCount = 2;
76 spec.attribs[1].offset = 0;
77 spec.attribs[1].stride = 0;
78 spec.attribs[1].normalize = false;
79 spec.attribs[1].instanceDivisor = 0;
80 spec.attribs[1].useDefaultAttribute = false;
128 gls::DrawTestSpec spec;
135 genBasicSpec(spec, m_method);
151 spec.indexType = indexTest.type;
152 spec.indexStorage = indexTest.storage;
157 spec.indexPointerOffset = indexTest.offsets[iterationNdx];
158 test->addIteration(spec, iterationDesc.c_str());
161 if (spec.isCompatibilityTest() == gls::DrawTestSpec::COMPATIBILITY_UNALIGNED_OFFSET ||
162 spec.isCompatibilityTest() == gls::DrawTestSpec::COMPATIBILITY_UNALIGNED_STRIDE)
320 gls::DrawTestSpec spec;
322 spec.apiType = glu::ApiType::es(2,0);
323 spec.primitive = random.chooseWeighted<gls::DrawTestSpec::Primitive> (DE_ARRAY_BEGIN(primitives), DE_ARRAY_END(primitives), primitiveWeights.weights);
324 spec.primitiveCount = random.chooseWeighted<int, const int*, const float*> (DE_ARRAY_BEGIN(primitiveCounts), DE_ARRAY_END(primitiveCounts), primitiveCountWeights);
325 spec.drawMethod = random.chooseWeighted<gls::DrawTestSpec::DrawMethod> (DE_ARRAY_BEGIN(drawMethods), DE_ARRAY_END(drawMethods), drawMethodWeights.weights);
326 spec.indexType = random.chooseWeighted<gls::DrawTestSpec::IndexType> (DE_ARRAY_BEGIN(indexTypes), DE_ARRAY_END(indexTypes), indexTypeWeights.weights);
327 spec.indexPointerOffset = random.chooseWeighted<int, const int*, const float*> (DE_ARRAY_BEGIN(indexOffsets), DE_ARRAY_END(indexOffsets), indexOffsetWeights);
328 spec.indexStorage = random.chooseWeighted<gls::DrawTestSpec::Storage> (DE_ARRAY_BEGIN(storages), DE_ARRAY_END(storages), storageWeights.weights);
329 spec.first = random.chooseWeighted<int, const int*, const float*> (DE_ARRAY_BEGIN(firsts), DE_ARRAY_END(firsts), firstWeights);
330 spec.indexMin = 0;
331 spec.indexMax = 0;
332 spec.instanceCount = 0;
334 // check spec is legal
335 if (!spec.valid())
354 // check spec is legal
355 valid = attribSpec.valid(spec.apiType);
364 spec.attribs.push_back(attribSpec);
370 if (spec.primitive != gls::DrawTestSpec::PRIMITIVE_POINTS)
371 spec.attribs[0].instanceDivisor = 0;
376 if (spec.drawMethod == gls::DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_RANGED && spec.indexMin == spec.indexMax && spec.primitive != gls::DrawTestSpec::PRIMITIVE_POINTS)
378 if (spec.attribs[0].useDefaultAttribute && spec.primitive != gls::DrawTestSpec::PRIMITIVE_POINTS)
382 if (spec.primitive == gls::DrawTestSpec::PRIMITIVE_TRIANGLES || spec.primitive == gls::DrawTestSpec::PRIMITIVE_TRIANGLE_FAN || spec.primitive == gls::DrawTestSpec::PRIMITIVE_TRIANGLE_STRIP)
384 if (spec.attribs[0].componentCount == 1)
386 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)
388 if (spec.drawMethod == gls::DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_RANGED && (spec.indexMax - spec.indexMin) < 2)
395 deUint32 hash = spec.hash();
397 hash = (hash << 2) ^ (deUint32)spec.attribs[attrNdx].hash();
403 if (spec.isCompatibilityTest() == gls::DrawTestSpec::COMPATIBILITY_UNALIGNED_OFFSET ||
404 spec.isCompatibilityTest() == gls::DrawTestSpec::COMPATIBILITY_UNALIGNED_STRIDE)
405 this->addChild(new gls::DrawTest(m_testCtx, m_context.getRenderContext(), spec, de::toString(insertedCount).c_str(), spec.getDesc().c_str()));