Home | History | Annotate | Download | only in stress

Lines Matching refs:gls

225 static void genBasicSpec (gls::DrawTestSpec& spec, gls::DrawTestSpec::DrawMethod method)
228 spec.primitive = gls::DrawTestSpec::PRIMITIVE_TRIANGLES;
231 spec.indexType = gls::DrawTestSpec::INDEXTYPE_LAST;
233 spec.indexStorage = gls::DrawTestSpec::STORAGE_LAST;
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;
252 spec.attribs[1].inputType = gls::DrawTestSpec::INPUTTYPE_FLOAT;
253 spec.attribs[1].outputType = gls::DrawTestSpec::OUTPUTTYPE_VEC2;
254 spec.attribs[1].storage = gls::DrawTestSpec::STORAGE_BUFFER;
255 spec.attribs[1].usage = gls::DrawTestSpec::USAGE_STATIC_DRAW;
267 IndexGroup (Context& context, const char* name, const char* descr, gls::DrawTestSpec::DrawMethod drawMethod);
273 gls::DrawTestSpec::DrawMethod m_method;
276 IndexGroup::IndexGroup (Context& context, const char* name, const char* descr, gls::DrawTestSpec::DrawMethod drawMethod)
290 gls::DrawTestSpec::Storage storage;
291 gls::DrawTestSpec::IndexType type;
298 { gls::DrawTestSpec::STORAGE_BUFFER, gls::DrawTestSpec::INDEXTYPE_SHORT, false, { 1, 3, -1 } },
299 { gls::DrawTestSpec::STORAGE_BUFFER, gls::DrawTestSpec::INDEXTYPE_INT, false, { 2, 3, -1 } },
302 gls::DrawTestSpec spec;
305 const bool isRangedMethod = (m_method == gls::DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_RANGED || m_method == gls::DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_RANGED_BASEVERTEX);
315 DE_ASSERT(indexTest.storage != gls::DrawTestSpec::STORAGE_USER);
319 const std::string name = std::string("index_") + gls::DrawTestSpec::indexTypeToString(indexTest.type);
320 const std::string desc = std::string("index ") + gls::DrawTestSpec::indexTypeToString(indexTest.type) + " in " + gls::DrawTestSpec::storageToString(indexTest.storage);
321 de::MovePtr<gls::DrawTest> test (new gls::DrawTest(m_testCtx, m_context.getRenderContext(), name.c_str(), desc.c_str()));
339 DE_ASSERT(spec.isCompatibilityTest() == gls::DrawTestSpec::COMPATIBILITY_UNALIGNED_OFFSET ||
340 spec.isCompatibilityTest() == gls::DrawTestSpec::COMPATIBILITY_UNALIGNED_STRIDE);
348 MethodGroup (Context& context, const char* name, const char* descr, gls::DrawTestSpec::DrawMethod drawMethod);
354 gls::DrawTestSpec::DrawMethod m_method;
357 MethodGroup::MethodGroup (Context& context, const char* name, const char* descr, gls::DrawTestSpec::DrawMethod drawMethod)
369 const bool indexed = (m_method == gls::DrawTestSpec::DRAWMETHOD_DRAWELEMENTS) || (m_method == gls::DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_INSTANCED) || (m_method == gls::DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_RANGED);
431 gls::DrawTestSpec::Primitive primitives[] =
433 gls::DrawTestSpec::PRIMITIVE_POINTS,
434 gls::DrawTestSpec::PRIMITIVE_TRIANGLES,
435 gls::DrawTestSpec::PRIMITIVE_TRIANGLE_FAN,
436 gls::DrawTestSpec::PRIMITIVE_TRIANGLE_STRIP,
437 gls::DrawTestSpec::PRIMITIVE_LINES,
438 gls::DrawTestSpec::PRIMITIVE_LINE_STRIP,
439 gls::DrawTestSpec::PRIMITIVE_LINE_LOOP
443 gls::DrawTestSpec::DrawMethod drawMethods[] =
445 gls::DrawTestSpec::DRAWMETHOD_DRAWARRAYS,
446 gls::DrawTestSpec::DRAWMETHOD_DRAWARRAYS_INSTANCED,
447 gls::DrawTestSpec::DRAWMETHOD_DRAWELEMENTS,
448 gls::DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_RANGED,
449 gls::DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_INSTANCED
453 gls::DrawTestSpec::IndexType indexTypes[] =
455 gls::DrawTestSpec::INDEXTYPE_BYTE,
456 gls::DrawTestSpec::INDEXTYPE_SHORT,
457 gls::DrawTestSpec::INDEXTYPE_INT,
461 gls::DrawTestSpec::Storage storages[] =
463 gls::DrawTestSpec::STORAGE_USER,
464 gls::DrawTestSpec::STORAGE_BUFFER,
468 gls::DrawTestSpec::InputType inputTypes[] =
470 gls::DrawTestSpec::INPUTTYPE_FLOAT,
471 gls::DrawTestSpec::INPUTTYPE_FIXED,
472 gls::DrawTestSpec::INPUTTYPE_BYTE,
473 gls::DrawTestSpec::INPUTTYPE_SHORT,
474 gls::DrawTestSpec::INPUTTYPE_UNSIGNED_BYTE,
475 gls::DrawTestSpec::INPUTTYPE_UNSIGNED_SHORT,
476 gls::DrawTestSpec::INPUTTYPE_INT,
477 gls::DrawTestSpec::INPUTTYPE_UNSIGNED_INT,
478 gls::DrawTestSpec::INPUTTYPE_HALF,
479 gls::DrawTestSpec::INPUTTYPE_UNSIGNED_INT_2_10_10_10,
480 gls::DrawTestSpec::INPUTTYPE_INT_2_10_10_10,
484 gls::DrawTestSpec::OutputType outputTypes[] =
486 gls::DrawTestSpec::OUTPUTTYPE_FLOAT,
487 gls::DrawTestSpec::OUTPUTTYPE_VEC2,
488 gls::DrawTestSpec::OUTPUTTYPE_VEC3,
489 gls::DrawTestSpec::OUTPUTTYPE_VEC4,
490 gls::DrawTestSpec::OUTPUTTYPE_INT,
491 gls::DrawTestSpec::OUTPUTTYPE_UINT,
492 gls::DrawTestSpec::OUTPUTTYPE_IVEC2,
493 gls::DrawTestSpec::OUTPUTTYPE_IVEC3,
494 gls::DrawTestSpec::OUTPUTTYPE_IVEC4,
495 gls::DrawTestSpec::OUTPUTTYPE_UVEC2,
496 gls::DrawTestSpec::OUTPUTTYPE_UVEC3,
497 gls::DrawTestSpec::OUTPUTTYPE_UVEC4,
501 gls::DrawTestSpec::Usage usages[] =
503 gls::DrawTestSpec::USAGE_DYNAMIC_DRAW,
504 gls::DrawTestSpec::USAGE_STATIC_DRAW,
505 gls::DrawTestSpec::USAGE_STREAM_DRAW,
506 gls::DrawTestSpec::USAGE_STREAM_READ,
507 gls::DrawTestSpec::USAGE_STREAM_COPY,
508 gls::DrawTestSpec::USAGE_STATIC_READ,
509 gls::DrawTestSpec::USAGE_STATIC_COPY,
510 gls::DrawTestSpec::USAGE_DYNAMIC_READ,
511 gls::DrawTestSpec::USAGE_DYNAMIC_COPY,
523 gls::DrawTestSpec spec;
526 spec.primitive = random.chooseWeighted<gls::DrawTestSpec::Primitive> (DE_ARRAY_BEGIN(primitives), DE_ARRAY_END(primitives), primitiveWeights.weights);
528 spec.drawMethod = random.chooseWeighted<gls::DrawTestSpec::DrawMethod> (DE_ARRAY_BEGIN(drawMethods), DE_ARRAY_END(drawMethods), drawMethodWeights.weights);
529 spec.indexType = random.chooseWeighted<gls::DrawTestSpec::IndexType> (DE_ARRAY_BEGIN(indexTypes), DE_ARRAY_END(indexTypes), indexTypeWeights.weights);
531 spec.indexStorage = random.chooseWeighted<gls::DrawTestSpec::Storage> (DE_ARRAY_BEGIN(storages), DE_ARRAY_END(storages), storageWeights.weights);
544 gls::DrawTestSpec::AttributeSpec attribSpec;
546 attribSpec.inputType = random.chooseWeighted<gls::DrawTestSpec::InputType> (DE_ARRAY_BEGIN(inputTypes), DE_ARRAY_END(inputTypes), inputTypeWeights.weights);
547 attribSpec.outputType = random.chooseWeighted<gls::DrawTestSpec::OutputType> (DE_ARRAY_BEGIN(outputTypes), DE_ARRAY_END(outputTypes), outputTypeWeights.weights);
548 attribSpec.storage = random.chooseWeighted<gls::DrawTestSpec::Storage> (DE_ARRAY_BEGIN(storages), DE_ARRAY_END(storages), storageWeights.weights);
549 attribSpec.usage = random.chooseWeighted<gls::DrawTestSpec::Usage> (DE_ARRAY_BEGIN(usages), DE_ARRAY_END(usages), usageWeights.weights);
561 if (attribSpec.stride && attribSpec.componentCount * gls::DrawTestSpec::inputTypeSize(attribSpec.inputType) > attribSpec.stride)
573 if (spec.primitive != gls::DrawTestSpec::PRIMITIVE_POINTS)
579 if (spec.drawMethod == gls::DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_RANGED && spec.indexMin == spec.indexMax && spec.primitive != gls::DrawTestSpec::PRIMITIVE_POINTS)
581 if (spec.attribs[0].useDefaultAttribute && spec.primitive != gls::DrawTestSpec::PRIMITIVE_POINTS)
585 if (spec.primitive == gls::DrawTestSpec::PRIMITIVE_TRIANGLES || spec.primitive == gls::DrawTestSpec::PRIMITIVE_TRIANGLE_FAN || spec.primitive == gls::DrawTestSpec::PRIMITIVE_TRIANGLE_STRIP)
589 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)
591 if (spec.drawMethod == gls::DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_RANGED && (spec.indexMax - spec.indexMin) < 2)
605 if (spec.isCompatibilityTest() == gls::DrawTestSpec::COMPATIBILITY_UNALIGNED_OFFSET ||
606 spec.isCompatibilityTest() == gls::DrawTestSpec::COMPATIBILITY_UNALIGNED_STRIDE)
607 this->addChild(new gls::DrawTest(m_testCtx, m_context.getRenderContext(), spec, de::toString(insertedCount).c_str(), spec.getDesc().c_str()));
637 const gls::DrawTestSpec::DrawMethod basicMethods[] =
639 // gls::DrawTestSpec::DRAWMETHOD_DRAWARRAYS,
640 gls::DrawTestSpec::DRAWMETHOD_DRAWELEMENTS,
641 // gls::DrawTestSpec::DRAWMETHOD_DRAWARRAYS_INSTANCED,
642 gls::DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_INSTANCED,
643 gls::DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_RANGED,
648 const std::string name = gls::DrawTestSpec::drawMethodToString(basicMethods[ndx]);
649 const std::string desc = gls::DrawTestSpec::drawMethodToString(basicMethods[ndx]);