Home | History | Annotate | Download | only in functional

Lines Matching full:spec

56 	gls::DrawTestSpec spec(baseSpec);
60 spec.primitiveCount = 1;
61 test->addIteration(spec, "draw count = 1");
63 spec.primitiveCount = 5;
64 test->addIteration(spec, "draw count = 5");
66 spec.primitiveCount = 25;
67 test->addIteration(spec, "draw count = 25");
71 spec.instanceCount = 1;
72 test->addIteration(spec, "instance count = 1");
74 spec.instanceCount = 4;
75 test->addIteration(spec, "instance count = 4");
77 spec.instanceCount = 11;
78 test->addIteration(spec, "instance count = 11");
82 spec.indexMin = 0;
83 spec.indexMax = 23;
84 test->addIteration(spec, "index range = [0, 23]");
86 spec.indexMin = 23;
87 spec.indexMax = 40;
88 test->addIteration(spec, "index range = [23, 40]");
91 if (spec.primitive == gls::DrawTestSpec::PRIMITIVE_POINTS)
93 spec.indexMin = 5;
94 spec.indexMax = 5;
95 test->addIteration(spec, "index range = [5, 5]");
102 static void genBasicSpec (gls::DrawTestSpec& spec, gls::DrawTestSpec::DrawMethod method)
104 spec.apiType = glu::ApiType::es(3,0);
105 spec.primitive = gls::DrawTestSpec::PRIMITIVE_TRIANGLES;
106 spec.primitiveCount = 5;
107 spec.drawMethod = method;
108 spec.indexType = gls::DrawTestSpec::INDEXTYPE_LAST;
109 spec.indexPointerOffset = 0;
110 spec.indexStorage = gls::DrawTestSpec::STORAGE_LAST;
111 spec.first = 0;
112 spec.indexMin = 0;
113 spec.indexMax = 0;
114 spec.instanceCount = 1;
116 spec.attribs.resize(2);
118 spec.attribs[0].inputType = gls::DrawTestSpec::INPUTTYPE_FLOAT;
119 spec.attribs[0].outputType = gls::DrawTestSpec::OUTPUTTYPE_VEC2;
120 spec.attribs[0].storage = gls::DrawTestSpec::STORAGE_BUFFER;
121 spec.attribs[0].usage = gls::DrawTestSpec::USAGE_STATIC_DRAW;
122 spec.attribs[0].componentCount = 4;
123 spec.attribs[0].offset = 0;
124 spec.attribs[0].stride = 0;
125 spec.attribs[0].normalize = false;
126 spec.attribs[0].instanceDivisor = 0;
127 spec.attribs[0].useDefaultAttribute = false;
129 spec.attribs[1].inputType = gls::DrawTestSpec::INPUTTYPE_FLOAT;
130 spec.attribs[1].outputType = gls::DrawTestSpec::OUTPUTTYPE_VEC2;
131 spec.attribs[1].storage = gls::DrawTestSpec::STORAGE_BUFFER;
132 spec.attribs[1].usage = gls::DrawTestSpec::USAGE_STATIC_DRAW;
133 spec.attribs[1].componentCount = 2;
134 spec.attribs[1].offset = 0;
135 spec.attribs[1].stride = 0;
136 spec.attribs[1].normalize = false;
137 spec.attribs[1].instanceDivisor = 0;
138 spec.attribs[1].useDefaultAttribute = false;
180 gls::DrawTestSpec spec;
182 spec.apiType = glu::ApiType::es(3,0);
183 spec.primitive = m_primitive;
184 spec.primitiveCount = 5;
185 spec.drawMethod = m_method;
186 spec.indexType = m_indexType;
187 spec.indexPointerOffset = 0;
188 spec.indexStorage = m_indexStorage;
189 spec.first = 0;
190 spec.indexMin = 0;
191 spec.indexMax = 0;
192 spec.instanceCount = 1;
194 spec.attribs.resize(1);
196 spec.attribs[0].inputType = gls::DrawTestSpec::INPUTTYPE_FLOAT;
197 spec.attribs[0].outputType = gls::DrawTestSpec::OUTPUTTYPE_VEC2;
198 spec.attribs[0].storage = gls::DrawTestSpec::STORAGE_BUFFER;
199 spec.attribs[0].usage = gls::DrawTestSpec::USAGE_STATIC_DRAW;
200 spec.attribs[0].componentCount = 2;
201 spec.attribs[0].offset = 0;
202 spec.attribs[0].stride = 0;
203 spec.attribs[0].normalize = false;
204 spec.attribs[0].instanceDivisor = 0;
205 spec.attribs[0].useDefaultAttribute = false;
207 addTestIterations(test, spec, testType);
215 gls::DrawTestSpec spec;
217 spec.apiType = glu::ApiType::es(3,0);
218 spec.primitive = m_primitive;
219 spec.primitiveCount = 5;
220 spec.drawMethod = m_method;
221 spec.indexType = m_indexType;
222 spec.indexPointerOffset = 0;
223 spec.indexStorage = m_indexStorage;
224 spec.first = 0;
225 spec.indexMin = 0;
226 spec.indexMax = 0;
227 spec.instanceCount = 1;
229 spec.attribs.resize(2);
231 spec.attribs[0].inputType = gls::DrawTestSpec::INPUTTYPE_FLOAT;
232 spec.attribs[0].outputType = gls::DrawTestSpec::OUTPUTTYPE_VEC2;
233 spec.attribs[0].storage = gls::DrawTestSpec::STORAGE_BUFFER;
234 spec.attribs[0].usage = gls::DrawTestSpec::USAGE_STATIC_DRAW;
235 spec.attribs[0].componentCount = 4;
236 spec.attribs[0].offset = 0;
237 spec.attribs[0].stride = 0;
238 spec.attribs[0].normalize = false;
239 spec.attribs[0].instanceDivisor = 0;
240 spec.attribs[0].useDefaultAttribute = false;
242 spec.attribs[1].inputType = gls::DrawTestSpec::INPUTTYPE_FLOAT;
243 spec.attribs[1].outputType = gls::DrawTestSpec::OUTPUTTYPE_VEC2;
244 spec.attribs[1].storage = gls::DrawTestSpec::STORAGE_BUFFER;
245 spec.attribs[1].usage = gls::DrawTestSpec::USAGE_STATIC_DRAW;
246 spec.attribs[1].componentCount = 2;
247 spec.attribs[1].offset = 0;
248 spec.attribs[1].stride = 0;
249 spec.attribs[1].normalize = false;
250 spec.attribs[1].instanceDivisor = 0;
251 spec.attribs[1].useDefaultAttribute = false;
253 addTestIterations(test, spec, testType);
261 gls::DrawTestSpec spec;
263 spec.apiType = glu::ApiType::es(3,0);
264 spec.primitive = m_primitive;
265 spec.primitiveCount = 5;
266 spec.drawMethod = m_method;
267 spec.indexType = m_indexType;
268 spec.indexPointerOffset = 0;
269 spec.indexStorage = m_indexStorage;
270 spec.first = 0;
271 spec.indexMin = 0;
272 spec.indexMax = 0;
273 spec.instanceCount = 1;
275 spec.attribs.resize(3);
277 spec.attribs[0].inputType = gls::DrawTestSpec::INPUTTYPE_FLOAT;
278 spec.attribs[0].outputType = gls::DrawTestSpec::OUTPUTTYPE_VEC2;
279 spec.attribs[0].storage = gls::DrawTestSpec::STORAGE_BUFFER;
280 spec.attribs[0].usage = gls::DrawTestSpec::USAGE_STATIC_DRAW;
281 spec.attribs[0].componentCount = 4;
282 spec.attribs[0].offset = 0;
283 spec.attribs[0].stride = 0;
284 spec.attribs[0].normalize = false;
285 spec.attribs[0].instanceDivisor = 0;
286 spec.attribs[0].useDefaultAttribute = false;
289 spec.attribs[1].inputType = gls::DrawTestSpec::INPUTTYPE_FLOAT;
290 spec.attribs[1].outputType = gls::DrawTestSpec::OUTPUTTYPE_VEC2;
291 spec.attribs[1].storage = gls::DrawTestSpec::STORAGE_BUFFER;
292 spec.attribs[1].usage = gls::DrawTestSpec::USAGE_STATIC_DRAW;
293 spec.attribs[1].componentCount = 2;
294 spec.attribs[1].offset = 0;
295 spec.attribs[1].stride = 0;
296 spec.attribs[1].normalize = false;
297 spec.attribs[1].instanceDivisor = 1;
298 spec.attribs[1].useDefaultAttribute = false;
299 spec.attribs[1].additionalPositionAttribute = true;
302 spec.attribs[2].inputType = gls::DrawTestSpec::INPUTTYPE_FLOAT;
303 spec.attribs[2].outputType = gls::DrawTestSpec::OUTPUTTYPE_VEC2;
304 spec.attribs[2].storage = gls::DrawTestSpec::STORAGE_BUFFER;
305 spec.attribs[2].usage = gls::DrawTestSpec::USAGE_STATIC_DRAW;
306 spec.attribs[2].componentCount = 3;
307 spec.attribs[2].offset = 0;
308 spec.attribs[2].stride = 0;
309 spec.attribs[2].normalize = false;
310 spec.attribs[2].instanceDivisor = 1;
311 spec.attribs[2].useDefaultAttribute = false;
313 addTestIterations(test, spec, testType);
321 gls::DrawTestSpec spec;
323 spec.apiType = glu::ApiType::es(3,0);
324 spec.primitive = m_primitive;
325 spec.primitiveCount = 5;
326 spec.drawMethod = m_method;
327 spec.indexType = m_indexType;
328 spec.indexPointerOffset = 0;
329 spec.indexStorage = m_indexStorage;
330 spec.first = 0;
331 spec.indexMin = 0;
332 spec.indexMax = 20; // \note addTestIterations is not called for the spec, so we must ensure [indexMin, indexMax] is a good range
333 spec.instanceCount = 1;
335 spec.attribs.resize(2);
337 spec.attribs[0].inputType = gls::DrawTestSpec::INPUTTYPE_FLOAT;
338 spec.attribs[0].outputType = gls::DrawTestSpec::OUTPUTTYPE_VEC2;
339 spec.attribs[0].storage = gls::DrawTestSpec::STORAGE_BUFFER;
340 spec.attribs[0].usage = gls::DrawTestSpec::USAGE_STATIC_DRAW;
341 spec.attribs[0].componentCount = 2;
342 spec.attribs[0].offset = 0;
343 spec.attribs[0].stride = 0;
344 spec.attribs[0].normalize = false;
345 spec.attribs[0].instanceDivisor = 0;
346 spec.attribs[0].useDefaultAttribute = false;
365 spec.attribs[1].inputType = iopairs[ioNdx].input;
366 spec.attribs[1].outputType = iopairs[ioNdx].output;
367 spec.attribs[1].storage = gls::DrawTestSpec::STORAGE_BUFFER;
368 spec.attribs[1].usage = gls::DrawTestSpec::USAGE_STATIC_DRAW;
369 spec.attribs[1].componentCount = iopairs[ioNdx].componentCount;
370 spec.attribs[1].offset = 0;
371 spec.attribs[1].stride = 0;
372 spec.attribs[1].normalize = false;
373 spec.attribs[1].instanceDivisor = 0;
374 spec.attribs[1].useDefaultAttribute = true;
376 test->addIteration(spec, desc.c_str());
432 gls::DrawTestSpec spec;
439 genBasicSpec(spec, m_method);
455 spec.indexType = indexTest.type;
456 spec.indexStorage = indexTest.storage;
461 spec.indexPointerOffset = indexTest.offsets[iterationNdx];
462 test->addIteration(spec, iterationDesc.c_str());
465 if (spec.isCompatibilityTest() != gls::DrawTestSpec::COMPATIBILITY_UNALIGNED_OFFSET &&
466 spec.isCompatibilityTest() != gls::DrawTestSpec::COMPATIBILITY_UNALIGNED_STRIDE)
501 gls::DrawTestSpec spec;
502 genBasicSpec(spec, m_method);
510 spec.first = firsts[firstNdx];
512 addTestIterations(test, spec, TYPE_DRAW_COUNT);
1027 gls::DrawTestSpec spec;
1029 spec.apiType = glu::ApiType::es(3,0);
1030 spec.primitive = random.chooseWeighted<gls::DrawTestSpec::Primitive> (DE_ARRAY_BEGIN(primitives), DE_ARRAY_END(primitives), primitiveWeights.weights);
1031 spec.primitiveCount = random.chooseWeighted<int, const int*, const float*> (DE_ARRAY_BEGIN(primitiveCounts), DE_ARRAY_END(primitiveCounts), primitiveCountWeights);
1032 spec.drawMethod = random.chooseWeighted<gls::DrawTestSpec::DrawMethod> (DE_ARRAY_BEGIN(drawMethods), DE_ARRAY_END(drawMethods), drawMethodWeights.weights);
1033 spec.indexType = random.chooseWeighted<gls::DrawTestSpec::IndexType> (DE_ARRAY_BEGIN(indexTypes), DE_ARRAY_END(indexTypes), indexTypeWeights.weights);
1034 spec.indexPointerOffset = random.chooseWeighted<int, const int*, const float*> (DE_ARRAY_BEGIN(indexOffsets), DE_ARRAY_END(indexOffsets), indexOffsetWeights);
1035 spec.indexStorage = random.chooseWeighted<gls::DrawTestSpec::Storage> (DE_ARRAY_BEGIN(storages), DE_ARRAY_END(storages), storageWeights.weights);
1036 spec.first = random.chooseWeighted<int, const int*, const float*> (DE_ARRAY_BEGIN(firsts), DE_ARRAY_END(firsts), firstWeights);
1037 spec.indexMin = random.chooseWeighted<int, const int*, const float*> (DE_ARRAY_BEGIN(indexMins), DE_ARRAY_END(indexMins), indexWeights);
1038 spec.indexMax = random.chooseWeighted<int, const int*, const float*> (DE_ARRAY_BEGIN(indexMaxs), DE_ARRAY_END(indexMaxs), indexWeights);
1039 spec.instanceCount = random.chooseWeighted<int, const int*, const float*> (DE_ARRAY_BEGIN(instanceCounts), DE_ARRAY_END(instanceCounts), instanceWeights);
1041 // check spec is legal
1042 if (!spec.valid())
1061 // check spec is legal
1062 valid = attribSpec.valid(spec.apiType);
1071 spec.attribs.push_back(attribSpec);
1077 if (spec.primitive != gls::DrawTestSpec::PRIMITIVE_POINTS)
1078 spec.attribs[0].instanceDivisor = 0;
1083 if (spec.drawMethod == gls::DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_RANGED && spec.indexMin == spec.indexMax && spec.primitive != gls::DrawTestSpec::PRIMITIVE_POINTS)
1085 if (spec.attribs[0].useDefaultAttribute && spec.primitive != gls::DrawTestSpec::PRIMITIVE_POINTS)
1089 if (spec.primitive == gls::DrawTestSpec::PRIMITIVE_TRIANGLES || spec.primitive == gls::DrawTestSpec::PRIMITIVE_TRIANGLE_FAN || spec.primitive == gls::DrawTestSpec::PRIMITIVE_TRIANGLE_STRIP)
1091 if (spec.attribs[0].componentCount == 1)
1093 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)
1095 if (spec.drawMethod == gls::DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_RANGED && (spec.indexMax - spec.indexMin) < 2)
1102 deUint32 hash = spec.hash();
1104 hash = (hash << 2) ^ (deUint32)spec.attribs[attrNdx].hash();
1109 if (spec.isCompatibilityTest() != gls::DrawTestSpec::COMPATIBILITY_UNALIGNED_OFFSET &&
1110 spec.isCompatibilityTest() != gls::DrawTestSpec::COMPATIBILITY_UNALIGNED_STRIDE &&
1113 this->addChild(new gls::DrawTest(m_testCtx, m_context.getRenderContext(), spec, de::toString(insertedCount).c_str(), spec.getDesc().c_str()));