2 /*-------------------------------------------------------------------------
3 * drawElements Quality Program OpenGL ES 3.1 Module
4 * -------------------------------------------------
6 * Copyright 2014 The Android Open Source Project
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
22 * \brief Drawing stress tests.
23 *//*--------------------------------------------------------------------*/
25 #include "es31sDrawTests.hpp"
26 #include "glsDrawTest.hpp"
27 #include "gluRenderContext.hpp"
28 #include "gluCallLogWrapper.hpp"
29 #include "gluShaderProgram.hpp"
30 #include "glwEnums.hpp"
31 #include "glwFunctions.hpp"
32 #include "deRandom.hpp"
33 #include "deStringUtil.hpp"
34 #include "deUniquePtr.hpp"
47 static const char* s_colorVertexShaderSource = "#version 310 es\n"
48 "in highp vec4 a_position;\n"
49 "in highp vec4 a_color;\n"
50 "out highp vec4 v_color;\n"
53 " gl_Position = a_position;\n"
54 " v_color = a_color;\n"
56 static const char* s_colorFragmentShaderSource = "#version 310 es\n"
57 "layout(location = 0) out highp vec4 fragColor;\n"
58 "in highp vec4 v_color;\n"
61 " fragColor = v_color;\n"
63 struct DrawElementsCommand
69 deUint32 reservedMustBeZero;
71 DE_STATIC_ASSERT(5 * sizeof(deUint32) == sizeof(DrawElementsCommand)); // tight packing
73 struct DrawArraysCommand
78 deUint32 reservedMustBeZero;
80 DE_STATIC_ASSERT(4 * sizeof(deUint32) == sizeof(DrawArraysCommand)); // tight packing
82 class InvalidDrawCase : public TestCase
94 INVALID_DATA_COUNT = 0,
96 INVALID_DATA_INSTANCED,
105 InvalidDrawCase (Context& context, const char* name, const char* desc, DrawType type, InvalidOperation op);
106 ~InvalidDrawCase (void);
110 IterateResult iterate (void);
113 const DrawType m_drawType;
114 const InvalidOperation m_op;
115 glw::GLuint m_dataBufferID;
116 glw::GLuint m_indexBufferID;
117 glw::GLuint m_cmdBufferID;
118 glw::GLuint m_colorBufferID;
122 InvalidDrawCase::InvalidDrawCase (Context& context, const char* name, const char* desc, DrawType type, InvalidOperation op)
123 : TestCase (context, name, desc)
127 , m_indexBufferID (0)
129 , m_colorBufferID (0)
132 DE_ASSERT(type < DRAW_LAST);
133 DE_ASSERT(op < INVALID_LAST);
136 InvalidDrawCase::~InvalidDrawCase (void)
141 void InvalidDrawCase::init (void)
145 void InvalidDrawCase::deinit (void)
149 m_context.getRenderContext().getFunctions().deleteBuffers(1, &m_dataBufferID);
154 m_context.getRenderContext().getFunctions().deleteBuffers(1, &m_indexBufferID);
159 m_context.getRenderContext().getFunctions().deleteBuffers(1, &m_cmdBufferID);
164 m_context.getRenderContext().getFunctions().deleteBuffers(1, &m_colorBufferID);
169 m_context.getRenderContext().getFunctions().deleteVertexArrays(1, &m_vao);
174 InvalidDrawCase::IterateResult InvalidDrawCase::iterate (void)
176 const int drawCount = 10; //!< number of elements safe to draw (all buffers have this)
177 const int overBoundDrawCount = 10000; //!< number of elements in all other buffers than our target buffer
178 const int drawInstances = 1;
179 const int overBoundInstances = 1000;
181 glu::CallLogWrapper gl (m_context.getRenderContext().getFunctions(), m_testCtx.getLog());
182 glu::ShaderProgram program (m_context.getRenderContext(), glu::ProgramSources() << glu::VertexSource(s_colorVertexShaderSource) << glu::FragmentSource(s_colorFragmentShaderSource));
183 const deUint32 programID = program.getProgram();
184 const deInt32 posLocation = gl.glGetAttribLocation(programID, "a_position");
185 const deInt32 colorLocation = gl.glGetAttribLocation(programID, "a_color");
187 gl.enableLogging(true);
189 gl.glGenVertexArrays(1, &m_vao);
190 gl.glBindVertexArray(m_vao);
191 glu::checkError(gl.glGetError(), "gen vao", __FILE__, __LINE__);
194 if (m_drawType == DRAW_ELEMENTS)
196 const int indexBufferSize = (m_op == INVALID_INDEX_COUNT) ? (drawCount) : (overBoundDrawCount);
197 std::vector<deUint16> indices (indexBufferSize);
199 for (int ndx = 0; ndx < (int)indices.size(); ++ndx)
200 indices[ndx] = (deUint16)((m_op == INVALID_INDEX) ? (overBoundDrawCount + ndx) : (ndx));
202 gl.glGenBuffers(1, &m_indexBufferID);
203 gl.glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_indexBufferID);
204 gl.glBufferData(GL_ELEMENT_ARRAY_BUFFER, (int)(indices.size() * sizeof(deUint16)), &indices[0], GL_STATIC_DRAW);
205 glu::checkError(gl.glGetError(), "", __FILE__, __LINE__);
210 const int dataSize = (m_op == INVALID_DATA_COUNT) ? (drawCount) : (overBoundDrawCount);
213 gl.glGenBuffers(1, &m_dataBufferID);
214 gl.glBindBuffer(GL_ARRAY_BUFFER, m_dataBufferID);
215 gl.glBufferData(GL_ARRAY_BUFFER, dataSize * sizeof(float[4]), DE_NULL, GL_STATIC_DRAW);
216 gl.glVertexAttribPointer(posLocation, 4, GL_FLOAT, GL_FALSE, 0, DE_NULL);
217 gl.glEnableVertexAttribArray(posLocation);
218 glu::checkError(gl.glGetError(), "", __FILE__, __LINE__);
221 // potentially instanced data
223 const int dataSize = drawInstances;
225 gl.glGenBuffers(1, &m_colorBufferID);
226 gl.glBindBuffer(GL_ARRAY_BUFFER, m_colorBufferID);
227 gl.glBufferData(GL_ARRAY_BUFFER, dataSize * sizeof(float[4]), DE_NULL, GL_STATIC_DRAW);
228 gl.glVertexAttribPointer(colorLocation, 4, GL_FLOAT, GL_FALSE, 0, DE_NULL);
229 gl.glEnableVertexAttribArray(colorLocation);
230 gl.glVertexAttribDivisor(colorLocation, 1);
231 glu::checkError(gl.glGetError(), "", __FILE__, __LINE__);
235 if (m_drawType == DRAW_ARRAYS)
237 DrawArraysCommand drawCommand;
238 drawCommand.count = overBoundDrawCount;
239 drawCommand.primCount = (m_op == INVALID_DATA_INSTANCED) ? (overBoundInstances) : (drawInstances);
240 drawCommand.first = (m_op == INVALID_DATA_FIRST) ? (overBoundDrawCount) : (0);
241 drawCommand.reservedMustBeZero = (m_op == INVALID_RESERVED) ? (5) : (0);
244 << tcu::TestLog::Message
246 << "\n\tcount:\t" << drawCommand.count
247 << "\n\tprimCount\t" << drawCommand.primCount
248 << "\n\tfirst\t" << drawCommand.first
249 << "\n\treservedMustBeZero\t" << drawCommand.reservedMustBeZero
250 << tcu::TestLog::EndMessage;
252 gl.glGenBuffers(1, &m_cmdBufferID);
253 gl.glBindBuffer(GL_DRAW_INDIRECT_BUFFER, m_cmdBufferID);
254 gl.glBufferData(GL_DRAW_INDIRECT_BUFFER, sizeof(drawCommand), &drawCommand, GL_STATIC_DRAW);
255 glu::checkError(gl.glGetError(), "", __FILE__, __LINE__);
257 else if (m_drawType == DRAW_ELEMENTS)
259 DrawElementsCommand drawCommand;
260 drawCommand.count = overBoundDrawCount;
261 drawCommand.primCount = (m_op == INVALID_DATA_INSTANCED) ? (overBoundInstances) : (drawInstances);
262 drawCommand.firstIndex = (m_op == INVALID_INDEX_FIRST) ? (overBoundDrawCount) : (0);
263 drawCommand.baseVertex = (m_op == INVALID_DATA_FIRST) ? (overBoundDrawCount) : (0);
264 drawCommand.reservedMustBeZero = (m_op == INVALID_RESERVED) ? (5) : (0);
267 << tcu::TestLog::Message
269 << "\n\tcount:\t" << drawCommand.count
270 << "\n\tprimCount\t" << drawCommand.primCount
271 << "\n\tfirstIndex\t" << drawCommand.firstIndex
272 << "\n\tbaseVertex\t" << drawCommand.baseVertex
273 << "\n\treservedMustBeZero\t" << drawCommand.reservedMustBeZero
274 << tcu::TestLog::EndMessage;
276 gl.glGenBuffers(1, &m_cmdBufferID);
277 gl.glBindBuffer(GL_DRAW_INDIRECT_BUFFER, m_cmdBufferID);
278 gl.glBufferData(GL_DRAW_INDIRECT_BUFFER, sizeof(drawCommand), &drawCommand, GL_STATIC_DRAW);
279 glu::checkError(gl.glGetError(), "", __FILE__, __LINE__);
284 gl.glViewport(0, 0, 1, 1);
285 gl.glUseProgram(programID);
287 if (m_drawType == DRAW_ELEMENTS)
288 gl.glDrawElementsIndirect(GL_TRIANGLES, GL_UNSIGNED_SHORT, DE_NULL);
289 else if (m_drawType == DRAW_ARRAYS)
290 gl.glDrawArraysIndirect(GL_TRIANGLES, DE_NULL);
297 m_testCtx.setTestResult(QP_TEST_RESULT_PASS, "Pass");
301 class RandomGroup : public TestCaseGroup
304 RandomGroup (Context& context, const char* name, const char* descr);
311 struct UniformWeightArray
315 UniformWeightArray (void)
317 for (int i=0; i<SIZE; ++i)
322 RandomGroup::RandomGroup (Context& context, const char* name, const char* descr)
323 : TestCaseGroup (context, name, descr)
327 RandomGroup::~RandomGroup (void)
331 void RandomGroup::init (void)
333 const int numAttempts = 100;
335 const int attribCounts[] = { 1, 2, 5 };
336 const float attribWeights[] = { 30, 10, 1 };
337 const int primitiveCounts[] = { 1, 5, 64 };
338 const float primitiveCountWeights[] = { 20, 10, 1 };
339 const int indexOffsets[] = { 0, 7, 13 };
340 const float indexOffsetWeights[] = { 20, 20, 1 };
341 const int firsts[] = { 0, 7, 13 };
342 const float firstWeights[] = { 20, 20, 1 };
344 const int instanceCounts[] = { 1, 2, 16, 17 };
345 const float instanceWeights[] = { 20, 10, 5, 1 };
346 const int indexMins[] = { 0, 1, 3, 8 };
347 const int indexMaxs[] = { 4, 8, 128, 257 };
348 const float indexWeights[] = { 50, 50, 50, 50 };
349 const int offsets[] = { 0, 1, 5, 12 };
350 const float offsetWeights[] = { 50, 10, 10, 10 };
351 const int strides[] = { 0, 7, 16, 17 };
352 const float strideWeights[] = { 50, 10, 10, 10 };
353 const int instanceDivisors[] = { 0, 1, 3, 129 };
354 const float instanceDivisorWeights[]= { 70, 30, 10, 10 };
356 const int indirectOffsets[] = { 0, 1, 2 };
357 const float indirectOffsetWeigths[] = { 2, 1, 1 };
358 const int baseVertices[] = { 0, 1, -2, 4, 3 };
359 const float baseVertexWeigths[] = { 4, 1, 1, 1, 1 };
361 gls::DrawTestSpec::Primitive primitives[] =
363 gls::DrawTestSpec::PRIMITIVE_POINTS,
364 gls::DrawTestSpec::PRIMITIVE_TRIANGLES,
365 gls::DrawTestSpec::PRIMITIVE_TRIANGLE_FAN,
366 gls::DrawTestSpec::PRIMITIVE_TRIANGLE_STRIP,
367 gls::DrawTestSpec::PRIMITIVE_LINES,
368 gls::DrawTestSpec::PRIMITIVE_LINE_STRIP,
369 gls::DrawTestSpec::PRIMITIVE_LINE_LOOP
371 const UniformWeightArray<DE_LENGTH_OF_ARRAY(primitives)> primitiveWeights;
373 gls::DrawTestSpec::DrawMethod drawMethods[] =
375 gls::DrawTestSpec::DRAWMETHOD_DRAWARRAYS_INDIRECT,
376 gls::DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_INDIRECT,
378 const UniformWeightArray<DE_LENGTH_OF_ARRAY(drawMethods)> drawMethodWeights;
380 gls::DrawTestSpec::IndexType indexTypes[] =
382 gls::DrawTestSpec::INDEXTYPE_BYTE,
383 gls::DrawTestSpec::INDEXTYPE_SHORT,
384 gls::DrawTestSpec::INDEXTYPE_INT,
386 const UniformWeightArray<DE_LENGTH_OF_ARRAY(indexTypes)> indexTypeWeights;
388 gls::DrawTestSpec::InputType inputTypes[] =
390 gls::DrawTestSpec::INPUTTYPE_FLOAT,
391 gls::DrawTestSpec::INPUTTYPE_FIXED,
392 gls::DrawTestSpec::INPUTTYPE_BYTE,
393 gls::DrawTestSpec::INPUTTYPE_SHORT,
394 gls::DrawTestSpec::INPUTTYPE_UNSIGNED_BYTE,
395 gls::DrawTestSpec::INPUTTYPE_UNSIGNED_SHORT,
396 gls::DrawTestSpec::INPUTTYPE_INT,
397 gls::DrawTestSpec::INPUTTYPE_UNSIGNED_INT,
398 gls::DrawTestSpec::INPUTTYPE_HALF,
399 gls::DrawTestSpec::INPUTTYPE_UNSIGNED_INT_2_10_10_10,
400 gls::DrawTestSpec::INPUTTYPE_INT_2_10_10_10,
402 const UniformWeightArray<DE_LENGTH_OF_ARRAY(inputTypes)> inputTypeWeights;
404 gls::DrawTestSpec::OutputType outputTypes[] =
406 gls::DrawTestSpec::OUTPUTTYPE_FLOAT,
407 gls::DrawTestSpec::OUTPUTTYPE_VEC2,
408 gls::DrawTestSpec::OUTPUTTYPE_VEC3,
409 gls::DrawTestSpec::OUTPUTTYPE_VEC4,
410 gls::DrawTestSpec::OUTPUTTYPE_INT,
411 gls::DrawTestSpec::OUTPUTTYPE_UINT,
412 gls::DrawTestSpec::OUTPUTTYPE_IVEC2,
413 gls::DrawTestSpec::OUTPUTTYPE_IVEC3,
414 gls::DrawTestSpec::OUTPUTTYPE_IVEC4,
415 gls::DrawTestSpec::OUTPUTTYPE_UVEC2,
416 gls::DrawTestSpec::OUTPUTTYPE_UVEC3,
417 gls::DrawTestSpec::OUTPUTTYPE_UVEC4,
419 const UniformWeightArray<DE_LENGTH_OF_ARRAY(outputTypes)> outputTypeWeights;
421 gls::DrawTestSpec::Usage usages[] =
423 gls::DrawTestSpec::USAGE_DYNAMIC_DRAW,
424 gls::DrawTestSpec::USAGE_STATIC_DRAW,
425 gls::DrawTestSpec::USAGE_STREAM_DRAW,
426 gls::DrawTestSpec::USAGE_STREAM_READ,
427 gls::DrawTestSpec::USAGE_STREAM_COPY,
428 gls::DrawTestSpec::USAGE_STATIC_READ,
429 gls::DrawTestSpec::USAGE_STATIC_COPY,
430 gls::DrawTestSpec::USAGE_DYNAMIC_READ,
431 gls::DrawTestSpec::USAGE_DYNAMIC_COPY,
433 const UniformWeightArray<DE_LENGTH_OF_ARRAY(usages)> usageWeights;
435 std::set<deUint32> insertedHashes;
436 size_t insertedCount = 0;
438 for (int ndx = 0; ndx < numAttempts; ++ndx)
440 de::Random random(0xc551393 + ndx); // random does not depend on previous cases
442 int attributeCount = random.chooseWeighted<int, const int*, const float*>(DE_ARRAY_BEGIN(attribCounts), DE_ARRAY_END(attribCounts), attribWeights);
444 gls::DrawTestSpec spec;
446 spec.apiType = glu::ApiType::es(3,1);
447 spec.primitive = random.chooseWeighted<gls::DrawTestSpec::Primitive> (DE_ARRAY_BEGIN(primitives), DE_ARRAY_END(primitives), primitiveWeights.weights);
448 spec.primitiveCount = random.chooseWeighted<int, const int*, const float*> (DE_ARRAY_BEGIN(primitiveCounts), DE_ARRAY_END(primitiveCounts), primitiveCountWeights);
449 spec.drawMethod = random.chooseWeighted<gls::DrawTestSpec::DrawMethod> (DE_ARRAY_BEGIN(drawMethods), DE_ARRAY_END(drawMethods), drawMethodWeights.weights);
451 if (spec.drawMethod == gls::DrawTestSpec::DRAWMETHOD_DRAWARRAYS_INDIRECT)
452 drawCommandSize = sizeof(deUint32[4]);
453 else if (spec.drawMethod == gls::DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_INDIRECT)
454 drawCommandSize = sizeof(deUint32[5]);
461 spec.indexType = random.chooseWeighted<gls::DrawTestSpec::IndexType> (DE_ARRAY_BEGIN(indexTypes), DE_ARRAY_END(indexTypes), indexTypeWeights.weights);
462 spec.indexPointerOffset = random.chooseWeighted<int, const int*, const float*> (DE_ARRAY_BEGIN(indexOffsets), DE_ARRAY_END(indexOffsets), indexOffsetWeights);
463 spec.indexStorage = gls::DrawTestSpec::STORAGE_BUFFER;
464 spec.first = random.chooseWeighted<int, const int*, const float*> (DE_ARRAY_BEGIN(firsts), DE_ARRAY_END(firsts), firstWeights);
465 spec.indexMin = random.chooseWeighted<int, const int*, const float*> (DE_ARRAY_BEGIN(indexMins), DE_ARRAY_END(indexMins), indexWeights);
466 spec.indexMax = random.chooseWeighted<int, const int*, const float*> (DE_ARRAY_BEGIN(indexMaxs), DE_ARRAY_END(indexMaxs), indexWeights);
467 spec.instanceCount = random.chooseWeighted<int, const int*, const float*> (DE_ARRAY_BEGIN(instanceCounts), DE_ARRAY_END(instanceCounts), instanceWeights);
468 spec.indirectOffset = random.chooseWeighted<int, const int*, const float*> (DE_ARRAY_BEGIN(indirectOffsets), DE_ARRAY_END(indirectOffsets), indirectOffsetWeigths) * drawCommandSize;
469 spec.baseVertex = random.chooseWeighted<int, const int*, const float*> (DE_ARRAY_BEGIN(baseVertices), DE_ARRAY_END(baseVertices), baseVertexWeigths);
471 // check spec is legal
475 for (int attrNdx = 0; attrNdx < attributeCount;)
478 gls::DrawTestSpec::AttributeSpec attribSpec;
480 attribSpec.inputType = random.chooseWeighted<gls::DrawTestSpec::InputType> (DE_ARRAY_BEGIN(inputTypes), DE_ARRAY_END(inputTypes), inputTypeWeights.weights);
481 attribSpec.outputType = random.chooseWeighted<gls::DrawTestSpec::OutputType> (DE_ARRAY_BEGIN(outputTypes), DE_ARRAY_END(outputTypes), outputTypeWeights.weights);
482 attribSpec.storage = gls::DrawTestSpec::STORAGE_BUFFER;
483 attribSpec.usage = random.chooseWeighted<gls::DrawTestSpec::Usage> (DE_ARRAY_BEGIN(usages), DE_ARRAY_END(usages), usageWeights.weights);
484 attribSpec.componentCount = random.getInt(1, 4);
485 attribSpec.offset = random.chooseWeighted<int, const int*, const float*>(DE_ARRAY_BEGIN(offsets), DE_ARRAY_END(offsets), offsetWeights);
486 attribSpec.stride = random.chooseWeighted<int, const int*, const float*>(DE_ARRAY_BEGIN(strides), DE_ARRAY_END(strides), strideWeights);
487 attribSpec.normalize = random.getBool();
488 attribSpec.instanceDivisor = random.chooseWeighted<int, const int*, const float*>(DE_ARRAY_BEGIN(instanceDivisors), DE_ARRAY_END(instanceDivisors), instanceDivisorWeights);
489 attribSpec.useDefaultAttribute = random.getBool();
491 // check spec is legal
492 valid = attribSpec.valid(spec.apiType);
494 // we do not want interleaved elements. (Might result in some weird floating point values)
495 if (attribSpec.stride && attribSpec.componentCount * gls::DrawTestSpec::inputTypeSize(attribSpec.inputType) > attribSpec.stride)
498 // try again if not valid
501 spec.attribs.push_back(attribSpec);
506 // Do not collapse all vertex positions to a single positions
507 if (spec.primitive != gls::DrawTestSpec::PRIMITIVE_POINTS)
508 spec.attribs[0].instanceDivisor = 0;
510 // Is render result meaningful?
513 if (spec.drawMethod == gls::DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_RANGED && spec.indexMin == spec.indexMax && spec.primitive != gls::DrawTestSpec::PRIMITIVE_POINTS)
515 if (spec.attribs[0].useDefaultAttribute && spec.primitive != gls::DrawTestSpec::PRIMITIVE_POINTS)
518 // Triangle only on one axis
519 if (spec.primitive == gls::DrawTestSpec::PRIMITIVE_TRIANGLES || spec.primitive == gls::DrawTestSpec::PRIMITIVE_TRIANGLE_FAN || spec.primitive == gls::DrawTestSpec::PRIMITIVE_TRIANGLE_STRIP)
521 if (spec.attribs[0].componentCount == 1)
523 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)
525 if (spec.drawMethod == gls::DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_RANGED && (spec.indexMax - spec.indexMin) < 2)
532 deUint32 hash = spec.hash();
533 for (int attrNdx = 0; attrNdx < attributeCount; ++attrNdx)
534 hash = (hash << 2) ^ (deUint32)spec.attribs[attrNdx].hash();
536 if (insertedHashes.find(hash) == insertedHashes.end())
538 // Only unaligned cases
539 if (spec.isCompatibilityTest() == gls::DrawTestSpec::COMPATIBILITY_UNALIGNED_OFFSET ||
540 spec.isCompatibilityTest() == gls::DrawTestSpec::COMPATIBILITY_UNALIGNED_STRIDE)
541 this->addChild(new gls::DrawTest(m_testCtx, m_context.getRenderContext(), spec, de::toString(insertedCount).c_str(), spec.getDesc().c_str()));
542 insertedHashes.insert(hash);
552 DrawTests::DrawTests (Context& context)
553 : TestCaseGroup(context, "draw_indirect", "Indirect drawing tests")
557 DrawTests::~DrawTests (void)
561 void DrawTests::init (void)
563 tcu::TestCaseGroup* const unalignedGroup = new tcu::TestCaseGroup(m_testCtx, "unaligned_data", "Test with unaligned data");
564 tcu::TestCaseGroup* const drawArraysGroup = new tcu::TestCaseGroup(m_testCtx, "drawarrays", "draw arrays");
565 tcu::TestCaseGroup* const drawElementsGroup = new tcu::TestCaseGroup(m_testCtx, "drawelements", "draw elements");
567 addChild(unalignedGroup);
568 addChild(drawArraysGroup);
569 addChild(drawElementsGroup);
573 unalignedGroup->addChild(new RandomGroup(m_context, "random", "random draw commands."));
578 drawArraysGroup->addChild(new InvalidDrawCase(m_context, "data_over_bounds_with_count", "Draw arrays vertex elements beyond the array end are accessed", InvalidDrawCase::DRAW_ARRAYS, InvalidDrawCase::INVALID_DATA_COUNT));
579 drawArraysGroup->addChild(new InvalidDrawCase(m_context, "data_over_bounds_with_first", "Draw arrays vertex elements beyond the array end are accessed", InvalidDrawCase::DRAW_ARRAYS, InvalidDrawCase::INVALID_DATA_FIRST));
580 drawArraysGroup->addChild(new InvalidDrawCase(m_context, "data_over_bounds_with_primcount", "Draw arrays vertex elements beyond the array end are accessed", InvalidDrawCase::DRAW_ARRAYS, InvalidDrawCase::INVALID_DATA_INSTANCED));
581 drawArraysGroup->addChild(new InvalidDrawCase(m_context, "reserved_non_zero", "reservedMustBeZero is set to non-zero value", InvalidDrawCase::DRAW_ARRAYS, InvalidDrawCase::INVALID_RESERVED));
586 drawElementsGroup->addChild(new InvalidDrawCase(m_context, "data_over_bounds_with_count", "Draw elements vertex elements beyond the array end are accessed", InvalidDrawCase::DRAW_ELEMENTS, InvalidDrawCase::INVALID_DATA_COUNT));
587 drawElementsGroup->addChild(new InvalidDrawCase(m_context, "data_over_bounds_with_basevertex", "Draw elements vertex elements beyond the array end are accessed", InvalidDrawCase::DRAW_ELEMENTS, InvalidDrawCase::INVALID_DATA_FIRST));
588 drawElementsGroup->addChild(new InvalidDrawCase(m_context, "data_over_bounds_with_indices", "Draw elements vertex elements beyond the array end are accessed", InvalidDrawCase::DRAW_ELEMENTS, InvalidDrawCase::INVALID_INDEX));
589 drawElementsGroup->addChild(new InvalidDrawCase(m_context, "data_over_bounds_with_primcount", "Draw elements vertex elements beyond the array end are accessed", InvalidDrawCase::DRAW_ELEMENTS, InvalidDrawCase::INVALID_DATA_INSTANCED));
590 drawElementsGroup->addChild(new InvalidDrawCase(m_context, "index_over_bounds_with_count", "Draw elements index elements beyond the array end are accessed", InvalidDrawCase::DRAW_ELEMENTS, InvalidDrawCase::INVALID_INDEX_COUNT));
591 drawElementsGroup->addChild(new InvalidDrawCase(m_context, "index_over_bounds_with_firstindex", "Draw elements index elements beyond the array end are accessed", InvalidDrawCase::DRAW_ELEMENTS, InvalidDrawCase::INVALID_INDEX_FIRST));
592 drawElementsGroup->addChild(new InvalidDrawCase(m_context, "reserved_non_zero", "reservedMustBeZero is set to non-zero value", InvalidDrawCase::DRAW_ELEMENTS, InvalidDrawCase::INVALID_RESERVED));