Lines Matching refs:DrawTestSpec
153 static void addTestIterations (gls::DrawTest* test, gls::DrawTestSpec& spec, TestIterationType type)
181 static void genBasicSpec (gls::DrawTestSpec& spec, gls::DrawTestSpec::DrawMethod method)
184 spec.primitive = gls::DrawTestSpec::PRIMITIVE_TRIANGLES;
187 spec.indexType = gls::DrawTestSpec::INDEXTYPE_LAST;
189 spec.indexStorage = gls::DrawTestSpec::STORAGE_LAST;
198 spec.attribs[0].inputType = gls::DrawTestSpec::INPUTTYPE_FLOAT;
199 spec.attribs[0].outputType = gls::DrawTestSpec::OUTPUTTYPE_VEC2;
200 spec.attribs[0].storage = gls::DrawTestSpec::STORAGE_BUFFER;
201 spec.attribs[0].usage = gls::DrawTestSpec::USAGE_STATIC_DRAW;
209 spec.attribs[1].inputType = gls::DrawTestSpec::INPUTTYPE_FLOAT;
210 spec.attribs[1].outputType = gls::DrawTestSpec::OUTPUTTYPE_VEC2;
211 spec.attribs[1].storage = gls::DrawTestSpec::STORAGE_BUFFER;
212 spec.attribs[1].usage = gls::DrawTestSpec::USAGE_STATIC_DRAW;
233 AttributeGroup (Context& context, const char* name, const char* descr, gls::DrawTestSpec::DrawMethod drawMethod, gls::DrawTestSpec::Primitive primitive, gls::DrawTestSpec::IndexType indexType, gls::DrawTestSpec::Storage indexStorage);
239 gls::DrawTestSpec::DrawMethod m_method;
240 gls::DrawTestSpec::Primitive m_primitive;
241 gls::DrawTestSpec::IndexType m_indexType;
242 gls::DrawTestSpec::Storage m_indexStorage;
245 AttributeGroup::AttributeGroup (Context& context, const char* name, const char* descr, gls::DrawTestSpec::DrawMethod drawMethod, gls::DrawTestSpec::Primitive primitive, gls::DrawTestSpec::IndexType indexType, gls::DrawTestSpec::Storage indexStorage)
263 gls::DrawTestSpec spec;
280 spec.attribs[0].inputType = gls::DrawTestSpec::INPUTTYPE_FLOAT;
281 spec.attribs[0].outputType = gls::DrawTestSpec::OUTPUTTYPE_VEC2;
282 spec.attribs[0].storage = gls::DrawTestSpec::STORAGE_BUFFER;
283 spec.attribs[0].usage = gls::DrawTestSpec::USAGE_STATIC_DRAW;
299 gls::DrawTestSpec spec;
316 spec.attribs[0].inputType = gls::DrawTestSpec::INPUTTYPE_FLOAT;
317 spec.attribs[0].outputType = gls::DrawTestSpec::OUTPUTTYPE_VEC2;
318 spec.attribs[0].storage = gls::DrawTestSpec::STORAGE_BUFFER;
319 spec.attribs[0].usage = gls::DrawTestSpec::USAGE_STATIC_DRAW;
327 spec.attribs[1].inputType = gls::DrawTestSpec::INPUTTYPE_FLOAT;
328 spec.attribs[1].outputType = gls::DrawTestSpec::OUTPUTTYPE_VEC2;
329 spec.attribs[1].storage = gls::DrawTestSpec::STORAGE_BUFFER;
330 spec.attribs[1].usage = gls::DrawTestSpec::USAGE_STATIC_DRAW;
346 gls::DrawTestSpec spec;
363 spec.attribs[0].inputType = gls::DrawTestSpec::INPUTTYPE_FLOAT;
364 spec.attribs[0].outputType = gls::DrawTestSpec::OUTPUTTYPE_VEC2;
365 spec.attribs[0].storage = gls::DrawTestSpec::STORAGE_BUFFER;
366 spec.attribs[0].usage = gls::DrawTestSpec::USAGE_STATIC_DRAW;
375 spec.attribs[1].inputType = gls::DrawTestSpec::INPUTTYPE_FLOAT;
376 spec.attribs[1].outputType = gls::DrawTestSpec::OUTPUTTYPE_VEC2;
377 spec.attribs[1].storage = gls::DrawTestSpec::STORAGE_BUFFER;
378 spec.attribs[1].usage = gls::DrawTestSpec::USAGE_STATIC_DRAW;
388 spec.attribs[2].inputType = gls::DrawTestSpec::INPUTTYPE_FLOAT;
389 spec.attribs[2].outputType = gls::DrawTestSpec::OUTPUTTYPE_VEC2;
390 spec.attribs[2].storage = gls::DrawTestSpec::STORAGE_BUFFER;
391 spec.attribs[2].usage = gls::DrawTestSpec::USAGE_STATIC_DRAW;
407 gls::DrawTestSpec spec;
424 spec.attribs[0].inputType = gls::DrawTestSpec::INPUTTYPE_FLOAT;
425 spec.attribs[0].outputType = gls::DrawTestSpec::OUTPUTTYPE_VEC2;
426 spec.attribs[0].storage = gls::DrawTestSpec::STORAGE_BUFFER;
427 spec.attribs[0].usage = gls::DrawTestSpec::USAGE_STATIC_DRAW;
437 gls::DrawTestSpec::InputType input;
438 gls::DrawTestSpec::OutputType output;
442 { gls::DrawTestSpec::INPUTTYPE_FLOAT, gls::DrawTestSpec::OUTPUTTYPE_VEC2, 4 },
443 { gls::DrawTestSpec::INPUTTYPE_FLOAT, gls::DrawTestSpec::OUTPUTTYPE_VEC4, 2 },
444 { gls::DrawTestSpec::INPUTTYPE_INT, gls::DrawTestSpec::OUTPUTTYPE_IVEC3, 4 },
445 { gls::DrawTestSpec::INPUTTYPE_UNSIGNED_INT, gls::DrawTestSpec::OUTPUTTYPE_UVEC2, 4 },
450 const std::string desc = gls::DrawTestSpec::inputTypeToString(iopairs[ioNdx].input) + de::toString(iopairs[ioNdx].componentCount) + " to " + gls::DrawTestSpec::outputTypeToString(iopairs[ioNdx].output);
454 spec.attribs[1].storage = gls::DrawTestSpec::STORAGE_BUFFER;
455 spec.attribs[1].usage = gls::DrawTestSpec::USAGE_STATIC_DRAW;
473 IndexGroup (Context& context, const char* name, const char* descr, gls::DrawTestSpec::DrawMethod drawMethod);
479 gls::DrawTestSpec::DrawMethod m_method;
482 DrawTestSpec::DrawMethod drawMethod)
496 gls::DrawTestSpec::IndexType type;
502 { gls::DrawTestSpec::INDEXTYPE_BYTE, { 0, 1, -1 } },
503 { gls::DrawTestSpec::INDEXTYPE_SHORT, { 0, 2, -1 } },
504 { gls::DrawTestSpec::INDEXTYPE_INT, { 0, 4, -1 } },
507 gls::DrawTestSpec spec;
510 spec.indexStorage = gls::DrawTestSpec::STORAGE_BUFFER;
516 const std::string name = std::string("index_") + gls::DrawTestSpec::indexTypeToString(indexTest.type);
517 const std::string desc = std::string("index ") + gls::DrawTestSpec::indexTypeToString(indexTest.type);
524 const std::string iterationDesc = std::string("first vertex ") + de::toString(indexTest.offsets[iterationNdx] / gls::DrawTestSpec::indexTypeSize(indexTest.type));
536 BaseVertexGroup (Context& context, const char* name, const char* descr, gls::DrawTestSpec::DrawMethod drawMethod);
542 gls::DrawTestSpec::DrawMethod m_method;
545 BaseVertexGroup::BaseVertexGroup (Context& context, const char* name, const char* descr, gls::DrawTestSpec::DrawMethod drawMethod)
560 gls::DrawTestSpec::IndexType type;
566 { true, gls::DrawTestSpec::INDEXTYPE_BYTE, { 1, 2 } },
567 { true, gls::DrawTestSpec::INDEXTYPE_SHORT, { 1, 2 } },
568 { true, gls::DrawTestSpec::INDEXTYPE_INT, { 1, 2 } },
569 { false, gls::DrawTestSpec::INDEXTYPE_BYTE, { -1, -2 } },
570 { false, gls::DrawTestSpec::INDEXTYPE_SHORT, { -1, -2 } },
571 { false, gls::DrawTestSpec::INDEXTYPE_INT, { -1, -2 } },
574 gls::DrawTestSpec spec;
577 spec.indexStorage = gls::DrawTestSpec::STORAGE_BUFFER;
583 const std::string name = std::string("index_") + (indexTest.positiveBase ? "" : "neg_") + gls::DrawTestSpec::indexTypeToString(indexTest.type);
584 const std::string desc = std::string("index ") + gls::DrawTestSpec::indexTypeToString(indexTest.type);
603 FirstGroup (Context& context, const char* name, const char* descr, gls::DrawTestSpec::DrawMethod drawMethod);
609 gls::DrawTestSpec::DrawMethod m_method;
612 FirstGroup::FirstGroup (Context& context, const char* name, const char* descr, gls::DrawTestSpec::DrawMethod drawMethod)
629 gls::DrawTestSpec spec;
649 MethodGroup (Context& context, const char* name, const char* descr, gls::DrawTestSpec::DrawMethod drawMethod);
655 gls::DrawTestSpec::DrawMethod m_method;
658 MethodGroup::MethodGroup (Context& context, const char* name, const char* descr, gls::DrawTestSpec::DrawMethod drawMethod)
670 const bool indexed = (m_method == gls::DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_INDIRECT);
671 const bool hasFirst = (m_method == gls::DrawTestSpec::DRAWMETHOD_DRAWARRAYS_INDIRECT);
673 const gls::DrawTestSpec::Primitive primitive[] =
675 gls::DrawTestSpec::PRIMITIVE_POINTS,
676 gls::DrawTestSpec::PRIMITIVE_TRIANGLES,
677 gls::DrawTestSpec::PRIMITIVE_TRIANGLE_FAN,
678 gls::DrawTestSpec::PRIMITIVE_TRIANGLE_STRIP,
679 gls::DrawTestSpec::PRIMITIVE_LINES,
680 gls::DrawTestSpec::PRIMITIVE_LINE_STRIP,
681 gls::DrawTestSpec::PRIMITIVE_LINE_LOOP
699 const std::string name = gls::DrawTestSpec::primitiveToString(primitive[ndx]);
700 const std::string desc = gls::DrawTestSpec::primitiveToString(primitive[ndx]);
702 this->addChild(new AttributeGroup(m_context, name.c_str(), desc.c_str(), m_method, primitive[ndx], gls::DrawTestSpec::INDEXTYPE_SHORT, gls::DrawTestSpec::STORAGE_BUFFER));
2065 gls::DrawTestSpec::Primitive primitives[] =
2067 gls::DrawTestSpec::PRIMITIVE_POINTS,
2068 gls::DrawTestSpec::PRIMITIVE_TRIANGLES,
2069 gls::DrawTestSpec::PRIMITIVE_TRIANGLE_FAN,
2070 gls::DrawTestSpec::PRIMITIVE_TRIANGLE_STRIP,
2071 gls::DrawTestSpec::PRIMITIVE_LINES,
2072 gls::DrawTestSpec::PRIMITIVE_LINE_STRIP,
2073 gls::DrawTestSpec::PRIMITIVE_LINE_LOOP
2077 gls::DrawTestSpec::DrawMethod drawMethods[] =
2079 gls::DrawTestSpec::DRAWMETHOD_DRAWARRAYS_INDIRECT,
2080 gls::DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_INDIRECT,
2084 gls::DrawTestSpec::IndexType indexTypes[] =
2086 gls::DrawTestSpec::INDEXTYPE_BYTE,
2087 gls::DrawTestSpec::INDEXTYPE_SHORT,
2088 gls::DrawTestSpec::INDEXTYPE_INT,
2092 gls::DrawTestSpec::InputType inputTypes[] =
2094 gls::DrawTestSpec::INPUTTYPE_FLOAT,
2095 gls::DrawTestSpec::INPUTTYPE_FIXED,
2096 gls::DrawTestSpec::INPUTTYPE_BYTE,
2097 gls::DrawTestSpec::INPUTTYPE_SHORT,
2098 gls::DrawTestSpec::INPUTTYPE_UNSIGNED_BYTE,
2099 gls::DrawTestSpec::INPUTTYPE_UNSIGNED_SHORT,
2100 gls::DrawTestSpec::INPUTTYPE_INT,
2101 gls::DrawTestSpec::INPUTTYPE_UNSIGNED_INT,
2102 gls::DrawTestSpec::INPUTTYPE_HALF,
2103 gls::DrawTestSpec::INPUTTYPE_UNSIGNED_INT_2_10_10_10,
2104 gls::DrawTestSpec::INPUTTYPE_INT_2_10_10_10,
2108 gls::DrawTestSpec::OutputType outputTypes[] =
2110 gls::DrawTestSpec::OUTPUTTYPE_FLOAT,
2111 gls::DrawTestSpec::OUTPUTTYPE_VEC2,
2112 gls::DrawTestSpec::OUTPUTTYPE_VEC3,
2113 gls::DrawTestSpec::OUTPUTTYPE_VEC4,
2114 gls::DrawTestSpec::OUTPUTTYPE_INT,
2115 gls::DrawTestSpec::OUTPUTTYPE_UINT,
2116 gls::DrawTestSpec::OUTPUTTYPE_IVEC2,
2117 gls::DrawTestSpec::OUTPUTTYPE_IVEC3,
2118 gls::DrawTestSpec::OUTPUTTYPE_IVEC4,
2119 gls::DrawTestSpec::OUTPUTTYPE_UVEC2,
2120 gls::DrawTestSpec::OUTPUTTYPE_UVEC3,
2121 gls::DrawTestSpec::OUTPUTTYPE_UVEC4,
2125 gls::DrawTestSpec::Usage usages[] =
2127 gls::DrawTestSpec::USAGE_DYNAMIC_DRAW,
2128 gls::DrawTestSpec::USAGE_STATIC_DRAW,
2129 gls::DrawTestSpec::USAGE_STREAM_DRAW,
2130 gls::DrawTestSpec::USAGE_STREAM_READ,
2131 gls::DrawTestSpec::USAGE_STREAM_COPY,
2132 gls::DrawTestSpec::USAGE_STATIC_READ,
2133 gls::DrawTestSpec::USAGE_STATIC_COPY,
2134 gls::DrawTestSpec::USAGE_DYNAMIC_READ,
2135 gls::DrawTestSpec::USAGE_DYNAMIC_COPY,
2148 gls::DrawTestSpec spec;
2151 spec.primitive = random.chooseWeighted<gls::DrawTestSpec::Primitive> (DE_ARRAY_BEGIN(primitives), DE_ARRAY_END(primitives), primitiveWeights.weights);
2153 spec.drawMethod = random.chooseWeighted<gls::DrawTestSpec::DrawMethod> (DE_ARRAY_BEGIN(drawMethods), DE_ARRAY_END(drawMethods), drawMethodWeights.weights);
2155 if (spec.drawMethod == gls::DrawTestSpec::DRAWMETHOD_DRAWARRAYS_INDIRECT)
2157 else if (spec.drawMethod == gls::DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_INDIRECT)
2165 spec.indexType = random.chooseWeighted<gls::DrawTestSpec::IndexType> (DE_ARRAY_BEGIN(indexTypes), DE_ARRAY_END(indexTypes), indexTypeWeights.weights);
2167 spec.indexStorage = gls::DrawTestSpec::STORAGE_BUFFER;
2182 gls::DrawTestSpec::AttributeSpec attribSpec;
2184 attribSpec.inputType = random.chooseWeighted<gls::DrawTestSpec::InputType> (DE_ARRAY_BEGIN(inputTypes), DE_ARRAY_END(inputTypes), inputTypeWeights.weights);
2185 attribSpec.outputType = random.chooseWeighted<gls::DrawTestSpec::OutputType> (DE_ARRAY_BEGIN(outputTypes), DE_ARRAY_END(outputTypes), outputTypeWeights.weights);
2186 attribSpec.storage = gls::DrawTestSpec::STORAGE_BUFFER;
2187 attribSpec.usage = random.chooseWeighted<gls::DrawTestSpec::Usage> (DE_ARRAY_BEGIN(usages), DE_ARRAY_END(usages), usageWeights.weights);
2199 if (attribSpec.stride && attribSpec.componentCount * gls::DrawTestSpec::inputTypeSize(attribSpec.inputType) > attribSpec.stride)
2211 if (spec.primitive != gls::DrawTestSpec::PRIMITIVE_POINTS)
2217 if (spec.drawMethod == gls::DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_RANGED && spec.indexMin == spec.indexMax && spec.primitive != gls::DrawTestSpec::PRIMITIVE_POINTS)
2219 if (spec.attribs[0].useDefaultAttribute && spec.primitive != gls::DrawTestSpec::PRIMITIVE_POINTS)
2223 if (spec.primitive == gls::DrawTestSpec::PRIMITIVE_TRIANGLES || spec.primitive == gls::DrawTestSpec::PRIMITIVE_TRIANGLE_FAN || spec.primitive == gls::DrawTestSpec::PRIMITIVE_TRIANGLE_STRIP)
2227 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)
2229 if (spec.drawMethod == gls::DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_RANGED && (spec.indexMax - spec.indexMin) < 2)
2243 if (spec.isCompatibilityTest() != gls::DrawTestSpec::COMPATIBILITY_UNALIGNED_OFFSET &&
2244 spec.isCompatibilityTest() != gls::DrawTestSpec::COMPATIBILITY_UNALIGNED_STRIDE)
2764 const gls::DrawTestSpec::DrawMethod basicMethods[] =
2766 gls::DrawTestSpec::DRAWMETHOD_DRAWARRAYS_INDIRECT,
2767 gls::DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_INDIRECT,
2772 const std::string name = gls::DrawTestSpec::drawMethodToString(basicMethods[ndx]);
2773 const std::string desc = gls::DrawTestSpec::drawMethodToString(basicMethods[ndx]);