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;
120 gls::DrawTestSpec spec;
124 genBasicSpec(spec, m_method);
140 spec.indexType = indexTest.type;
141 spec.indexStorage = indexTest.storage;
146 spec.indexPointerOffset = indexTest.offsets[iterationNdx];
147 test->addIteration(spec, iterationDesc.c_str());
150 DE_ASSERT(spec.isCompatibilityTest() == gls::DrawTestSpec::COMPATIBILITY_UNALIGNED_OFFSET ||
151 spec.isCompatibilityTest() == gls::DrawTestSpec::COMPATIBILITY_UNALIGNED_STRIDE);
309 gls::DrawTestSpec spec;
311 spec.apiType = glu::ApiType::es(2,0);
312 spec.primitive = random.chooseWeighted<gls::DrawTestSpec::Primitive> (DE_ARRAY_BEGIN(primitives), DE_ARRAY_END(primitives), primitiveWeights.weights);
313 spec.primitiveCount = random.chooseWeighted<int, const int*, const float*> (DE_ARRAY_BEGIN(primitiveCounts), DE_ARRAY_END(primitiveCounts), primitiveCountWeights);
314 spec.drawMethod = random.chooseWeighted<gls::DrawTestSpec::DrawMethod> (DE_ARRAY_BEGIN(drawMethods), DE_ARRAY_END(drawMethods), drawMethodWeights.weights);
315 spec.indexType = random.chooseWeighted<gls::DrawTestSpec::IndexType> (DE_ARRAY_BEGIN(indexTypes), DE_ARRAY_END(indexTypes), indexTypeWeights.weights);
316 spec.indexPointerOffset = random.chooseWeighted<int, const int*, const float*> (DE_ARRAY_BEGIN(indexOffsets), DE_ARRAY_END(indexOffsets), indexOffsetWeights);
317 spec.indexStorage = random.chooseWeighted<gls::DrawTestSpec::Storage> (DE_ARRAY_BEGIN(storages), DE_ARRAY_END(storages), storageWeights.weights);
318 spec.first = random.chooseWeighted<int, const int*, const float*> (DE_ARRAY_BEGIN(firsts), DE_ARRAY_END(firsts), firstWeights);
319 spec.indexMin = 0;
320 spec.indexMax = 0;
321 spec.instanceCount = 0;
323 // check spec is legal
324 if (!spec.valid())
343 // check spec is legal
344 valid = attribSpec.valid(spec.apiType);
353 spec.attribs.push_back(attribSpec);
359 if (spec.primitive != gls::DrawTestSpec::PRIMITIVE_POINTS)
360 spec.attribs[0].instanceDivisor = 0;
365 if (spec.drawMethod == gls::DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_RANGED && spec.indexMin == spec.indexMax && spec.primitive != gls::DrawTestSpec::PRIMITIVE_POINTS)
367 if (spec.attribs[0].useDefaultAttribute && spec.primitive != gls::DrawTestSpec::PRIMITIVE_POINTS)
371 if (spec.primitive == gls::DrawTestSpec::PRIMITIVE_TRIANGLES || spec.primitive == gls::DrawTestSpec::PRIMITIVE_TRIANGLE_FAN || spec.primitive == gls::DrawTestSpec::PRIMITIVE_TRIANGLE_STRIP)
373 if (spec.attribs[0].componentCount == 1)
375 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)
377 if (spec.drawMethod == gls::DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_RANGED && (spec.indexMax - spec.indexMin) < 2)
384 deUint32 hash = spec.hash();
386 hash = (hash << 2) ^ (deUint32)spec.attribs[attrNdx].hash();
392 if (spec.isCompatibilityTest() == gls::DrawTestSpec::COMPATIBILITY_UNALIGNED_OFFSET ||
393 spec.isCompatibilityTest() == gls::DrawTestSpec::COMPATIBILITY_UNALIGNED_STRIDE)
394 this->addChild(new gls::DrawTest(m_testCtx, m_context.getRenderContext(), spec, de::toString(insertedCount).c_str(), spec.getDesc().c_str()));