Lines Matching refs:gls
44 static void genBasicSpec (gls::DrawTestSpec& spec, gls::DrawTestSpec::DrawMethod method)
47 spec.primitive = gls::DrawTestSpec::PRIMITIVE_TRIANGLES;
50 spec.indexType = gls::DrawTestSpec::INDEXTYPE_LAST;
52 spec.indexStorage = gls::DrawTestSpec::STORAGE_LAST;
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;
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;
86 IndexGroup (Context& context, const char* name, const char* descr, gls::DrawTestSpec::DrawMethod drawMethod);
92 gls::DrawTestSpec::DrawMethod m_method;
95 IndexGroup::IndexGroup (Context& context, const char* name, const char* descr, gls::DrawTestSpec::DrawMethod drawMethod)
109 gls::DrawTestSpec::Storage storage;
110 gls::DrawTestSpec::IndexType type;
117 { gls::DrawTestSpec::STORAGE_USER, gls::DrawTestSpec::INDEXTYPE_BYTE, true, { 0, 1, -1 } },
118 { gls::DrawTestSpec::STORAGE_USER, gls::DrawTestSpec::INDEXTYPE_SHORT, true, { 0, 2, -1 } },
120 { gls::DrawTestSpec::STORAGE_USER, gls::DrawTestSpec::INDEXTYPE_SHORT, false, { 1, 3, -1 } },
122 { gls::DrawTestSpec::STORAGE_BUFFER, gls::DrawTestSpec::INDEXTYPE_BYTE, true, { 0, 1, -1 } },
123 { gls::DrawTestSpec::STORAGE_BUFFER, gls::DrawTestSpec::INDEXTYPE_SHORT, true, { 0, 2, -1 } },
125 { gls::DrawTestSpec::STORAGE_BUFFER, gls::DrawTestSpec::INDEXTYPE_SHORT, false, { 1, 3, -1 } },
128 gls::DrawTestSpec spec;
145 tcu::TestCaseGroup* group = (indexTest.storage == gls::DrawTestSpec::STORAGE_USER) ? ((indexTest.aligned) ? (userPtrGroup) : (unalignedUserPtrGroup)) : ((indexTest.aligned) ? (bufferGroup) : (unalignedBufferGroup));
147 const std::string name = std::string("index_") + gls::DrawTestSpec::indexTypeToString(indexTest.type);
148 const std::string desc = std::string("index ") + gls::DrawTestSpec::indexTypeToString(indexTest.type) + " in " + gls::DrawTestSpec::storageToString(indexTest.storage);
149 de::MovePtr<gls::DrawTest> test (new gls::DrawTest(m_testCtx, m_context.getRenderContext(), name.c_str(), desc.c_str()));
161 if (spec.isCompatibilityTest() == gls::DrawTestSpec::COMPATIBILITY_UNALIGNED_OFFSET ||
162 spec.isCompatibilityTest() == gls::DrawTestSpec::COMPATIBILITY_UNALIGNED_STRIDE)
170 MethodGroup (Context& context, const char* name, const char* descr, gls::DrawTestSpec::DrawMethod drawMethod);
176 gls::DrawTestSpec::DrawMethod m_method;
179 MethodGroup::MethodGroup (Context& context, const char* name, const char* descr, gls::DrawTestSpec::DrawMethod drawMethod)
191 const bool indexed = (m_method == gls::DrawTestSpec::DRAWMETHOD_DRAWELEMENTS) || (m_method == gls::DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_INSTANCED) || (m_method == gls::DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_RANGED);
246 gls::DrawTestSpec::Primitive primitives[] =
248 gls::DrawTestSpec::PRIMITIVE_POINTS,
249 gls::DrawTestSpec::PRIMITIVE_TRIANGLES,
250 gls::DrawTestSpec::PRIMITIVE_TRIANGLE_FAN,
251 gls::DrawTestSpec::PRIMITIVE_TRIANGLE_STRIP,
252 gls::DrawTestSpec::PRIMITIVE_LINES,
253 gls::DrawTestSpec::PRIMITIVE_LINE_STRIP,
254 gls::DrawTestSpec::PRIMITIVE_LINE_LOOP
258 gls::DrawTestSpec::DrawMethod drawMethods[] =
260 gls::DrawTestSpec::DRAWMETHOD_DRAWARRAYS,
261 gls::DrawTestSpec::DRAWMETHOD_DRAWELEMENTS,
265 gls::DrawTestSpec::IndexType indexTypes[] =
267 gls::DrawTestSpec::INDEXTYPE_BYTE,
268 gls::DrawTestSpec::INDEXTYPE_SHORT,
272 gls::DrawTestSpec::Storage storages[] =
274 gls::DrawTestSpec::STORAGE_USER,
275 gls::DrawTestSpec::STORAGE_BUFFER,
279 gls::DrawTestSpec::InputType inputTypes[] =
281 gls::DrawTestSpec::INPUTTYPE_FLOAT,
282 gls::DrawTestSpec::INPUTTYPE_FIXED,
283 gls::DrawTestSpec::INPUTTYPE_BYTE,
284 gls::DrawTestSpec::INPUTTYPE_SHORT,
285 gls::DrawTestSpec::INPUTTYPE_UNSIGNED_BYTE,
286 gls::DrawTestSpec::INPUTTYPE_UNSIGNED_SHORT
290 gls::DrawTestSpec::OutputType outputTypes[] =
292 gls::DrawTestSpec::OUTPUTTYPE_FLOAT,
293 gls::DrawTestSpec::OUTPUTTYPE_VEC2,
294 gls::DrawTestSpec::OUTPUTTYPE_VEC3,
295 gls::DrawTestSpec::OUTPUTTYPE_VEC4,
299 gls::DrawTestSpec::Usage usages[] =
301 gls::DrawTestSpec::USAGE_STATIC_DRAW,
302 gls::DrawTestSpec::USAGE_DYNAMIC_DRAW,
303 gls::DrawTestSpec::USAGE_STREAM_DRAW,
320 gls::DrawTestSpec spec;
323 spec.primitive = random.chooseWeighted<gls::DrawTestSpec::Primitive> (DE_ARRAY_BEGIN(primitives), DE_ARRAY_END(primitives), primitiveWeights.weights);
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);
328 spec.indexStorage = random.chooseWeighted<gls::DrawTestSpec::Storage> (DE_ARRAY_BEGIN(storages), DE_ARRAY_END(storages), storageWeights.weights);
341 gls::DrawTestSpec::AttributeSpec attribSpec;
343 attribSpec.inputType = random.chooseWeighted<gls::DrawTestSpec::InputType> (DE_ARRAY_BEGIN(inputTypes), DE_ARRAY_END(inputTypes), inputTypeWeights.weights);
344 attribSpec.outputType = random.chooseWeighted<gls::DrawTestSpec::OutputType> (DE_ARRAY_BEGIN(outputTypes), DE_ARRAY_END(outputTypes), outputTypeWeights.weights);
345 attribSpec.storage = random.chooseWeighted<gls::DrawTestSpec::Storage> (DE_ARRAY_BEGIN(storages), DE_ARRAY_END(storages), storageWeights.weights);
346 attribSpec.usage = random.chooseWeighted<gls::DrawTestSpec::Usage> (DE_ARRAY_BEGIN(usages), DE_ARRAY_END(usages), usageWeights.weights);
358 if (attribSpec.stride && attribSpec.componentCount * gls::DrawTestSpec::inputTypeSize(attribSpec.inputType) > attribSpec.stride)
370 if (spec.primitive != gls::DrawTestSpec::PRIMITIVE_POINTS)
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)
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)
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()));
433 const gls::DrawTestSpec::DrawMethod basicMethods[] =
435 // gls::DrawTestSpec::DRAWMETHOD_DRAWARRAYS,
436 gls::DrawTestSpec::DRAWMETHOD_DRAWELEMENTS,
441 std::string name = gls::DrawTestSpec::drawMethodToString(basicMethods[ndx]);
442 std::string desc = gls::DrawTestSpec::drawMethodToString(basicMethods[ndx]);