Lines Matching refs:spec

54 	gls::DrawTestSpec spec(baseSpec);
58 spec.primitiveCount = 1;
59 test->addIteration(spec, "draw count = 1");
61 spec.primitiveCount = 5;
62 test->addIteration(spec, "draw count = 5");
64 spec.primitiveCount = 25;
65 test->addIteration(spec, "draw count = 25");
71 static void genBasicSpec (gls::DrawTestSpec& spec, gls::DrawTestSpec::DrawMethod method)
73 spec.apiType = glu::ApiType::es(2,0);
74 spec.primitive = gls::DrawTestSpec::PRIMITIVE_TRIANGLES;
75 spec.primitiveCount = 5;
76 spec.drawMethod = method;
77 spec.indexType = gls::DrawTestSpec::INDEXTYPE_LAST;
78 spec.indexPointerOffset = 0;
79 spec.indexStorage = gls::DrawTestSpec::STORAGE_LAST;
80 spec.first = 0;
81 spec.indexMin = 0;
82 spec.indexMax = 0;
83 spec.instanceCount = 1;
85 spec.attribs.resize(2);
87 spec.attribs[0].inputType = gls::DrawTestSpec::INPUTTYPE_FLOAT;
88 spec.attribs[0].outputType = gls::DrawTestSpec::OUTPUTTYPE_VEC2;
89 spec.attribs[0].storage = gls::DrawTestSpec::STORAGE_BUFFER;
90 spec.attribs[0].usage = gls::DrawTestSpec::USAGE_STATIC_DRAW;
91 spec.attribs[0].componentCount = 4;
92 spec.attribs[0].offset = 0;
93 spec.attribs[0].stride = 0;
94 spec.attribs[0].normalize = false;
95 spec.attribs[0].instanceDivisor = 0;
96 spec.attribs[0].useDefaultAttribute = false;
98 spec.attribs[1].inputType = gls::DrawTestSpec::INPUTTYPE_FLOAT;
99 spec.attribs[1].outputType = gls::DrawTestSpec::OUTPUTTYPE_VEC2;
100 spec.attribs[1].storage = gls::DrawTestSpec::STORAGE_BUFFER;
101 spec.attribs[1].usage = gls::DrawTestSpec::USAGE_STATIC_DRAW;
102 spec.attribs[1].componentCount = 2;
103 spec.attribs[1].offset = 0;
104 spec.attribs[1].stride = 0;
105 spec.attribs[1].normalize = false;
106 spec.attribs[1].instanceDivisor = 0;
107 spec.attribs[1].useDefaultAttribute = false;
144 gls::DrawTestSpec spec;
146 spec.apiType = glu::ApiType::es(2,0);
147 spec.primitive = m_primitive;
148 spec.primitiveCount = 0;
149 spec.drawMethod = m_method;
150 spec.indexType = m_indexType;
151 spec.indexPointerOffset = 0;
152 spec.indexStorage = m_indexStorage;
153 spec.first = 0;
154 spec.indexMin = 0;
155 spec.indexMax = 0;
156 spec.instanceCount = 1;
158 spec.attribs.resize(1);
160 spec.attribs[0].inputType = gls::DrawTestSpec::INPUTTYPE_FLOAT;
161 spec.attribs[0].outputType = gls::DrawTestSpec::OUTPUTTYPE_VEC2;
162 spec.attribs[0].storage = gls::DrawTestSpec::STORAGE_BUFFER;
163 spec.attribs[0].usage = gls::DrawTestSpec::USAGE_STATIC_DRAW;
164 spec.attribs[0].componentCount = 2;
165 spec.attribs[0].offset = 0;
166 spec.attribs[0].stride = 0;
167 spec.attribs[0].normalize = false;
168 spec.attribs[0].instanceDivisor = 0;
169 spec.attribs[0].useDefaultAttribute = false;
171 addTestIterations(test, spec, TYPE_DRAW_COUNT);
179 gls::DrawTestSpec spec;
181 spec.apiType = glu::ApiType::es(2,0);
182 spec.primitive = m_primitive;
183 spec.primitiveCount = 0;
184 spec.drawMethod = m_method;
185 spec.indexType = m_indexType;
186 spec.indexPointerOffset = 0;
187 spec.indexStorage = m_indexStorage;
188 spec.first = 0;
189 spec.indexMin = 0;
190 spec.indexMax = 0;
191 spec.instanceCount = 1;
193 spec.attribs.resize(2);
195 spec.attribs[0].inputType = gls::DrawTestSpec::INPUTTYPE_FLOAT;
196 spec.attribs[0].outputType = gls::DrawTestSpec::OUTPUTTYPE_VEC2;
197 spec.attribs[0].storage = gls::DrawTestSpec::STORAGE_BUFFER;
198 spec.attribs[0].usage = gls::DrawTestSpec::USAGE_STATIC_DRAW;
199 spec.attribs[0].componentCount = 4;
200 spec.attribs[0].offset = 0;
201 spec.attribs[0].stride = 0;
202 spec.attribs[0].normalize = false;
203 spec.attribs[0].instanceDivisor = 0;
204 spec.attribs[0].useDefaultAttribute = false;
206 spec.attribs[1].inputType = gls::DrawTestSpec::INPUTTYPE_FLOAT;
207 spec.attribs[1].outputType = gls::DrawTestSpec::OUTPUTTYPE_VEC2;
208 spec.attribs[1].storage = gls::DrawTestSpec::STORAGE_BUFFER;
209 spec.attribs[1].usage = gls::DrawTestSpec::USAGE_STATIC_DRAW;
210 spec.attribs[1].componentCount = 2;
211 spec.attribs[1].offset = 0;
212 spec.attribs[1].stride = 0;
213 spec.attribs[1].normalize = false;
214 spec.attribs[1].instanceDivisor = 0;
215 spec.attribs[1].useDefaultAttribute = false;
217 addTestIterations(test, spec, TYPE_DRAW_COUNT);
225 gls::DrawTestSpec spec;
227 spec.apiType = glu::ApiType::es(2,0);
228 spec.primitive = m_primitive;
229 spec.primitiveCount = 5;
230 spec.drawMethod = m_method;
231 spec.indexType = m_indexType;
232 spec.indexPointerOffset = 0;
233 spec.indexStorage = m_indexStorage;
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 = 2;
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;
267 spec.attribs[1].inputType = iopairs[ioNdx].input;
268 spec.attribs[1].outputType = iopairs[ioNdx].output;
269 spec.attribs[1].storage = gls::DrawTestSpec::STORAGE_BUFFER;
270 spec.attribs[1].usage = gls::DrawTestSpec::USAGE_STATIC_DRAW;
271 spec.attribs[1].componentCount = iopairs[ioNdx].componentCount;
272 spec.attribs[1].offset = 0;
273 spec.attribs[1].stride = 0;
274 spec.attribs[1].normalize = false;
275 spec.attribs[1].instanceDivisor = 0;
276 spec.attribs[1].useDefaultAttribute = true;
278 test->addIteration(spec, desc.c_str());
328 gls::DrawTestSpec spec;
334 genBasicSpec(spec, m_method);
351 spec.indexType = indexTest.type;
352 spec.indexStorage = indexTest.storage;
357 spec.indexPointerOffset = indexTest.offsets[iterationNdx];
358 test->addIteration(spec, iterationDesc.c_str());
361 DE_ASSERT(spec.isCompatibilityTest() != gls::DrawTestSpec::COMPATIBILITY_UNALIGNED_OFFSET);
362 DE_ASSERT(spec.isCompatibilityTest() != gls::DrawTestSpec::COMPATIBILITY_UNALIGNED_STRIDE);
397 gls::DrawTestSpec spec;
398 genBasicSpec(spec, m_method);
406 spec.first = firsts[firstNdx];
408 addTestIterations(test, spec, TYPE_DRAW_COUNT);
595 gls::DrawTestSpec spec;
597 spec.apiType = glu::ApiType::es(2,0);
598 spec.primitive = random.chooseWeighted<gls::DrawTestSpec::Primitive> (DE_ARRAY_BEGIN(primitives), DE_ARRAY_END(primitives), primitiveWeights.weights);
599 spec.primitiveCount = random.chooseWeighted<int, const int*, const float*> (DE_ARRAY_BEGIN(primitiveCounts), DE_ARRAY_END(primitiveCounts), primitiveCountWeights);
600 spec.drawMethod = random.chooseWeighted<gls::DrawTestSpec::DrawMethod> (DE_ARRAY_BEGIN(drawMethods), DE_ARRAY_END(drawMethods), drawMethodWeights.weights);
601 spec.indexType = random.chooseWeighted<gls::DrawTestSpec::IndexType> (DE_ARRAY_BEGIN(indexTypes), DE_ARRAY_END(indexTypes), indexTypeWeights.weights);
602 spec.indexPointerOffset = random.chooseWeighted<int, const int*, const float*> (DE_ARRAY_BEGIN(indexOffsets), DE_ARRAY_END(indexOffsets), indexOffsetWeights);
603 spec.indexStorage = random.chooseWeighted<gls::DrawTestSpec::Storage> (DE_ARRAY_BEGIN(storages), DE_ARRAY_END(storages), storageWeights.weights);
604 spec.first = random.chooseWeighted<int, const int*, const float*> (DE_ARRAY_BEGIN(firsts), DE_ARRAY_END(firsts), firstWeights);
605 spec.indexMin = 0;
606 spec.indexMax = 0;
607 spec.instanceCount = 0;
609 // check spec is legal
610 if (!spec.valid())
629 // check spec is legal
630 valid = attribSpec.valid(spec.apiType);
639 spec.attribs.push_back(attribSpec);
645 if (spec.primitive != gls::DrawTestSpec::PRIMITIVE_POINTS)
646 spec.attribs[0].instanceDivisor = 0;
651 if (spec.drawMethod == gls::DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_RANGED && spec.indexMin == spec.indexMax && spec.primitive != gls::DrawTestSpec::PRIMITIVE_POINTS)
653 if (spec.attribs[0].useDefaultAttribute && spec.primitive != gls::DrawTestSpec::PRIMITIVE_POINTS)
657 if (spec.primitive == gls::DrawTestSpec::PRIMITIVE_TRIANGLES || spec.primitive == gls::DrawTestSpec::PRIMITIVE_TRIANGLE_FAN || spec.primitive == gls::DrawTestSpec::PRIMITIVE_TRIANGLE_STRIP)
659 if (spec.attribs[0].componentCount == 1)
661 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)
663 if (spec.drawMethod == gls::DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_RANGED && (spec.indexMax - spec.indexMin) < 2)
670 deUint32 hash = spec.hash();
672 hash = (hash << 2) ^ (deUint32)spec.attribs[attrNdx].hash();
678 if (spec.isCompatibilityTest() != gls::DrawTestSpec::COMPATIBILITY_UNALIGNED_OFFSET &&
679 spec.isCompatibilityTest() != gls::DrawTestSpec::COMPATIBILITY_UNALIGNED_STRIDE)
680 this->addChild(new gls::DrawTest(m_testCtx, m_context.getRenderContext(), spec, de::toString(insertedCount).c_str(), spec.getDesc().c_str()));