Lines Matching refs:gls
155 static void addTestIterations (gls::DrawTest* test, gls::DrawTestSpec& spec, TestIterationType type)
183 static void genBasicSpec (gls::DrawTestSpec& spec, gls::DrawTestSpec::DrawMethod method)
186 spec.primitive = gls::DrawTestSpec::PRIMITIVE_TRIANGLES;
189 spec.indexType = gls::DrawTestSpec::INDEXTYPE_LAST;
191 spec.indexStorage = gls::DrawTestSpec::STORAGE_LAST;
200 spec.attribs[0].inputType = gls::DrawTestSpec::INPUTTYPE_FLOAT;
201 spec.attribs[0].outputType = gls::DrawTestSpec::OUTPUTTYPE_VEC2;
202 spec.attribs[0].storage = gls::DrawTestSpec::STORAGE_BUFFER;
203 spec.attribs[0].usage = gls::DrawTestSpec::USAGE_STATIC_DRAW;
211 spec.attribs[1].inputType = gls::DrawTestSpec::INPUTTYPE_FLOAT;
212 spec.attribs[1].outputType = gls::DrawTestSpec::OUTPUTTYPE_VEC2;
213 spec.attribs[1].storage = gls::DrawTestSpec::STORAGE_BUFFER;
214 spec.attribs[1].usage = gls::DrawTestSpec::USAGE_STATIC_DRAW;
235 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);
241 gls::DrawTestSpec::DrawMethod m_method;
242 gls::DrawTestSpec::Primitive m_primitive;
243 gls::DrawTestSpec::IndexType m_indexType;
244 gls::DrawTestSpec::Storage m_indexStorage;
247 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)
264 gls::DrawTest* test = new gls::DrawTest(m_testCtx, m_context.getRenderContext(), "single_attribute", "Single attribute array.");
265 gls::DrawTestSpec spec;
282 spec.attribs[0].inputType = gls::DrawTestSpec::INPUTTYPE_FLOAT;
283 spec.attribs[0].outputType = gls::DrawTestSpec::OUTPUTTYPE_VEC2;
284 spec.attribs[0].storage = gls::DrawTestSpec::STORAGE_BUFFER;
285 spec.attribs[0].usage = gls::DrawTestSpec::USAGE_STATIC_DRAW;
300 gls::DrawTest* test = new gls::DrawTest(m_testCtx, m_context.getRenderContext(), "multiple_attributes", "Multiple attribute arrays.");
301 gls::DrawTestSpec spec;
318 spec.attribs[0].inputType = gls::DrawTestSpec::INPUTTYPE_FLOAT;
319 spec.attribs[0].outputType = gls::DrawTestSpec::OUTPUTTYPE_VEC2;
320 spec.attribs[0].storage = gls::DrawTestSpec::STORAGE_BUFFER;
321 spec.attribs[0].usage = gls::DrawTestSpec::USAGE_STATIC_DRAW;
329 spec.attribs[1].inputType = gls::DrawTestSpec::INPUTTYPE_FLOAT;
330 spec.attribs[1].outputType = gls::DrawTestSpec::OUTPUTTYPE_VEC2;
331 spec.attribs[1].storage = gls::DrawTestSpec::STORAGE_BUFFER;
332 spec.attribs[1].usage = gls::DrawTestSpec::USAGE_STATIC_DRAW;
347 gls::DrawTest* test = new gls::DrawTest(m_testCtx, m_context.getRenderContext(), "instanced_attributes", "Instanced attribute array.");
348 gls::DrawTestSpec spec;
365 spec.attribs[0].inputType = gls::DrawTestSpec::INPUTTYPE_FLOAT;
366 spec.attribs[0].outputType = gls::DrawTestSpec::OUTPUTTYPE_VEC2;
367 spec.attribs[0].storage = gls::DrawTestSpec::STORAGE_BUFFER;
368 spec.attribs[0].usage = gls::DrawTestSpec::USAGE_STATIC_DRAW;
377 spec.attribs[1].inputType = gls::DrawTestSpec::INPUTTYPE_FLOAT;
378 spec.attribs[1].outputType = gls::DrawTestSpec::OUTPUTTYPE_VEC2;
379 spec.attribs[1].storage = gls::DrawTestSpec::STORAGE_BUFFER;
380 spec.attribs[1].usage = gls::DrawTestSpec::USAGE_STATIC_DRAW;
390 spec.attribs[2].inputType = gls::DrawTestSpec::INPUTTYPE_FLOAT;
391 spec.attribs[2].outputType = gls::DrawTestSpec::OUTPUTTYPE_VEC2;
392 spec.attribs[2].storage = gls::DrawTestSpec::STORAGE_BUFFER;
393 spec.attribs[2].usage = gls::DrawTestSpec::USAGE_STATIC_DRAW;
408 gls::DrawTest* test = new gls::DrawTest(m_testCtx, m_context.getRenderContext(), "default_attribute", "Attribute specified with glVertexAttrib*.");
409 gls::DrawTestSpec spec;
426 spec.attribs[0].inputType = gls::DrawTestSpec::INPUTTYPE_FLOAT;
427 spec.attribs[0].outputType = gls::DrawTestSpec::OUTPUTTYPE_VEC2;
428 spec.attribs[0].storage = gls::DrawTestSpec::STORAGE_BUFFER;
429 spec.attribs[0].usage = gls::DrawTestSpec::USAGE_STATIC_DRAW;
439 gls::DrawTestSpec::InputType input;
440 gls::DrawTestSpec::OutputType output;
444 { gls::DrawTestSpec::INPUTTYPE_FLOAT, gls::DrawTestSpec::OUTPUTTYPE_VEC2, 4 },
445 { gls::DrawTestSpec::INPUTTYPE_FLOAT, gls::DrawTestSpec::OUTPUTTYPE_VEC4, 2 },
446 { gls::DrawTestSpec::INPUTTYPE_INT, gls::DrawTestSpec::OUTPUTTYPE_IVEC3, 4 },
447 { gls::DrawTestSpec::INPUTTYPE_UNSIGNED_INT, gls::DrawTestSpec::OUTPUTTYPE_UVEC2, 4 },
452 const std::string desc = gls::DrawTestSpec::inputTypeToString(iopairs[ioNdx].input) + de::toString(iopairs[ioNdx].componentCount) + " to " + gls::DrawTestSpec::outputTypeToString(iopairs[ioNdx].output);
456 spec.attribs[1].storage = gls::DrawTestSpec::STORAGE_BUFFER;
457 spec.attribs[1].usage = gls::DrawTestSpec::USAGE_STATIC_DRAW;
475 IndexGroup (Context& context, const char* name, const char* descr, gls::DrawTestSpec::DrawMethod drawMethod);
481 gls::DrawTestSpec::DrawMethod m_method;
484 gls::DrawTestSpec::DrawMethod drawMethod)
498 gls::DrawTestSpec::IndexType type;
504 { gls::DrawTestSpec::INDEXTYPE_BYTE, { 0, 1, -1 } },
505 { gls::DrawTestSpec::INDEXTYPE_SHORT, { 0, 2, -1 } },
506 { gls::DrawTestSpec::INDEXTYPE_INT, { 0, 4, -1 } },
509 gls::DrawTestSpec spec;
512 spec.indexStorage = gls::DrawTestSpec::STORAGE_BUFFER;
518 const std::string name = std::string("index_") + gls::DrawTestSpec::indexTypeToString(indexTest.type);
519 const std::string desc = std::string("index ") + gls::DrawTestSpec::indexTypeToString(indexTest.type);
520 gls::DrawTest* test = new gls::DrawTest(m_testCtx, m_context.getRenderContext(), name.c_str(), desc.c_str());
526 const std::string iterationDesc = std::string("first vertex ") + de::toString(indexTest.offsets[iterationNdx] / gls::DrawTestSpec::indexTypeSize(indexTest.type));
538 BaseVertexGroup (Context& context, const char* name, const char* descr, gls::DrawTestSpec::DrawMethod drawMethod);
544 gls::DrawTestSpec::DrawMethod m_method;
547 BaseVertexGroup::BaseVertexGroup (Context& context, const char* name, const char* descr, gls::DrawTestSpec::DrawMethod drawMethod)
562 gls::DrawTestSpec::IndexType type;
568 { true, gls::DrawTestSpec::INDEXTYPE_BYTE, { 1, 2 } },
569 { true, gls::DrawTestSpec::INDEXTYPE_SHORT, { 1, 2 } },
570 { true, gls::DrawTestSpec::INDEXTYPE_INT, { 1, 2 } },
571 { false, gls::DrawTestSpec::INDEXTYPE_BYTE, { -1, -2 } },
572 { false, gls::DrawTestSpec::INDEXTYPE_SHORT, { -1, -2 } },
573 { false, gls::DrawTestSpec::INDEXTYPE_INT, { -1, -2 } },
576 gls::DrawTestSpec spec;
579 spec.indexStorage = gls::DrawTestSpec::STORAGE_BUFFER;
585 const std::string name = std::string("index_") + (indexTest.positiveBase ? "" : "neg_") + gls::DrawTestSpec::indexTypeToString(indexTest.type);
586 const std::string desc = std::string("index ") + gls::DrawTestSpec::indexTypeToString(indexTest.type);
587 gls::DrawTest* test = new gls::DrawTest(m_testCtx, m_context.getRenderContext(), name.c_str(), desc.c_str());
605 FirstGroup (Context& context, const char* name, const char* descr, gls::DrawTestSpec::DrawMethod drawMethod);
611 gls::DrawTestSpec::DrawMethod m_method;
614 FirstGroup::FirstGroup (Context& context, const char* name, const char* descr, gls::DrawTestSpec::DrawMethod drawMethod)
631 gls::DrawTestSpec spec;
638 gls::DrawTest* test = new gls::DrawTest(m_testCtx, m_context.getRenderContext(), name.c_str(), desc.c_str());
651 MethodGroup (Context& context, const char* name, const char* descr, gls::DrawTestSpec::DrawMethod drawMethod);
657 gls::DrawTestSpec::DrawMethod m_method;
660 MethodGroup::MethodGroup (Context& context, const char* name, const char* descr, gls::DrawTestSpec::DrawMethod drawMethod)
672 const bool indexed = (m_method == gls::DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_INDIRECT);
673 const bool hasFirst = (m_method == gls::DrawTestSpec::DRAWMETHOD_DRAWARRAYS_INDIRECT);
675 const gls::DrawTestSpec::Primitive primitive[] =
677 gls::DrawTestSpec::PRIMITIVE_POINTS,
678 gls::DrawTestSpec::PRIMITIVE_TRIANGLES,
679 gls::DrawTestSpec::PRIMITIVE_TRIANGLE_FAN,
680 gls::DrawTestSpec::PRIMITIVE_TRIANGLE_STRIP,
681 gls::DrawTestSpec::PRIMITIVE_LINES,
682 gls::DrawTestSpec::PRIMITIVE_LINE_STRIP,
683 gls::DrawTestSpec::PRIMITIVE_LINE_LOOP
701 const std::string name = gls::DrawTestSpec::primitiveToString(primitive[ndx]);
702 const std::string desc = gls::DrawTestSpec::primitiveToString(primitive[ndx]);
704 this->addChild(new AttributeGroup(m_context, name.c_str(), desc.c_str(), m_method, primitive[ndx], gls::DrawTestSpec::INDEXTYPE_SHORT, gls::DrawTestSpec::STORAGE_BUFFER));
2067 gls::DrawTestSpec::Primitive primitives[] =
2069 gls::DrawTestSpec::PRIMITIVE_POINTS,
2070 gls::DrawTestSpec::PRIMITIVE_TRIANGLES,
2071 gls::DrawTestSpec::PRIMITIVE_TRIANGLE_FAN,
2072 gls::DrawTestSpec::PRIMITIVE_TRIANGLE_STRIP,
2073 gls::DrawTestSpec::PRIMITIVE_LINES,
2074 gls::DrawTestSpec::PRIMITIVE_LINE_STRIP,
2075 gls::DrawTestSpec::PRIMITIVE_LINE_LOOP
2079 gls::DrawTestSpec::DrawMethod drawMethods[] =
2081 gls::DrawTestSpec::DRAWMETHOD_DRAWARRAYS_INDIRECT,
2082 gls::DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_INDIRECT,
2086 gls::DrawTestSpec::IndexType indexTypes[] =
2088 gls::DrawTestSpec::INDEXTYPE_BYTE,
2089 gls::DrawTestSpec::INDEXTYPE_SHORT,
2090 gls::DrawTestSpec::INDEXTYPE_INT,
2094 gls::DrawTestSpec::InputType inputTypes[] =
2096 gls::DrawTestSpec::INPUTTYPE_FLOAT,
2097 gls::DrawTestSpec::INPUTTYPE_FIXED,
2098 gls::DrawTestSpec::INPUTTYPE_BYTE,
2099 gls::DrawTestSpec::INPUTTYPE_SHORT,
2100 gls::DrawTestSpec::INPUTTYPE_UNSIGNED_BYTE,
2101 gls::DrawTestSpec::INPUTTYPE_UNSIGNED_SHORT,
2102 gls::DrawTestSpec::INPUTTYPE_INT,
2103 gls::DrawTestSpec::INPUTTYPE_UNSIGNED_INT,
2104 gls::DrawTestSpec::INPUTTYPE_HALF,
2105 gls::DrawTestSpec::INPUTTYPE_UNSIGNED_INT_2_10_10_10,
2106 gls::DrawTestSpec::INPUTTYPE_INT_2_10_10_10,
2110 gls::DrawTestSpec::OutputType outputTypes[] =
2112 gls::DrawTestSpec::OUTPUTTYPE_FLOAT,
2113 gls::DrawTestSpec::OUTPUTTYPE_VEC2,
2114 gls::DrawTestSpec::OUTPUTTYPE_VEC3,
2115 gls::DrawTestSpec::OUTPUTTYPE_VEC4,
2116 gls::DrawTestSpec::OUTPUTTYPE_INT,
2117 gls::DrawTestSpec::OUTPUTTYPE_UINT,
2118 gls::DrawTestSpec::OUTPUTTYPE_IVEC2,
2119 gls::DrawTestSpec::OUTPUTTYPE_IVEC3,
2120 gls::DrawTestSpec::OUTPUTTYPE_IVEC4,
2121 gls::DrawTestSpec::OUTPUTTYPE_UVEC2,
2122 gls::DrawTestSpec::OUTPUTTYPE_UVEC3,
2123 gls::DrawTestSpec::OUTPUTTYPE_UVEC4,
2127 gls::DrawTestSpec::Usage usages[] =
2129 gls::DrawTestSpec::USAGE_DYNAMIC_DRAW,
2130 gls::DrawTestSpec::USAGE_STATIC_DRAW,
2131 gls::DrawTestSpec::USAGE_STREAM_DRAW,
2132 gls::DrawTestSpec::USAGE_STREAM_READ,
2133 gls::DrawTestSpec::USAGE_STREAM_COPY,
2134 gls::DrawTestSpec::USAGE_STATIC_READ,
2135 gls::DrawTestSpec::USAGE_STATIC_COPY,
2136 gls::DrawTestSpec::USAGE_DYNAMIC_READ,
2137 gls::DrawTestSpec::USAGE_DYNAMIC_COPY,
2150 gls::DrawTestSpec spec;
2153 spec.primitive = random.chooseWeighted<gls::DrawTestSpec::Primitive> (DE_ARRAY_BEGIN(primitives), DE_ARRAY_END(primitives), primitiveWeights.weights);
2155 spec.drawMethod = random.chooseWeighted<gls::DrawTestSpec::DrawMethod> (DE_ARRAY_BEGIN(drawMethods), DE_ARRAY_END(drawMethods), drawMethodWeights.weights);
2157 if (spec.drawMethod == gls::DrawTestSpec::DRAWMETHOD_DRAWARRAYS_INDIRECT)
2159 else if (spec.drawMethod == gls::DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_INDIRECT)
2167 spec.indexType = random.chooseWeighted<gls::DrawTestSpec::IndexType> (DE_ARRAY_BEGIN(indexTypes), DE_ARRAY_END(indexTypes), indexTypeWeights.weights);
2169 spec.indexStorage = gls::DrawTestSpec::STORAGE_BUFFER;
2184 gls::DrawTestSpec::AttributeSpec attribSpec;
2186 attribSpec.inputType = random.chooseWeighted<gls::DrawTestSpec::InputType> (DE_ARRAY_BEGIN(inputTypes), DE_ARRAY_END(inputTypes), inputTypeWeights.weights);
2187 attribSpec.outputType = random.chooseWeighted<gls::DrawTestSpec::OutputType> (DE_ARRAY_BEGIN(outputTypes), DE_ARRAY_END(outputTypes), outputTypeWeights.weights);
2188 attribSpec.storage = gls::DrawTestSpec::STORAGE_BUFFER;
2189 attribSpec.usage = random.chooseWeighted<gls::DrawTestSpec::Usage> (DE_ARRAY_BEGIN(usages), DE_ARRAY_END(usages), usageWeights.weights);
2201 if (attribSpec.stride && attribSpec.componentCount * gls::DrawTestSpec::inputTypeSize(attribSpec.inputType) > attribSpec.stride)
2213 if (spec.primitive != gls::DrawTestSpec::PRIMITIVE_POINTS)
2219 if (spec.drawMethod == gls::DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_RANGED && spec.indexMin == spec.indexMax && spec.primitive != gls::DrawTestSpec::PRIMITIVE_POINTS)
2221 if (spec.attribs[0].useDefaultAttribute && spec.primitive != gls::DrawTestSpec::PRIMITIVE_POINTS)
2225 if (spec.primitive == gls::DrawTestSpec::PRIMITIVE_TRIANGLES || spec.primitive == gls::DrawTestSpec::PRIMITIVE_TRIANGLE_FAN || spec.primitive == gls::DrawTestSpec::PRIMITIVE_TRIANGLE_STRIP)
2229 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)
2231 if (spec.drawMethod == gls::DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_RANGED && (spec.indexMax - spec.indexMin) < 2)
2245 if (spec.isCompatibilityTest() != gls::DrawTestSpec::COMPATIBILITY_UNALIGNED_OFFSET &&
2246 spec.isCompatibilityTest() != gls::DrawTestSpec::COMPATIBILITY_UNALIGNED_STRIDE)
2247 this->addChild(new gls::DrawTest(m_testCtx, m_context.getRenderContext(), spec, de::toString(insertedCount).c_str(), spec.getDesc().c_str()));
2766 const gls::DrawTestSpec::DrawMethod basicMethods[] =
2768 gls::DrawTestSpec::DRAWMETHOD_DRAWARRAYS_INDIRECT,
2769 gls::DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_INDIRECT,
2774 const std::string name = gls::DrawTestSpec::drawMethodToString(basicMethods[ndx]);
2775 const std::string desc = gls::DrawTestSpec::drawMethodToString(basicMethods[ndx]);