Lines Matching full:m_spec
156 Spec m_spec;
179 , m_spec (spec)
222 for (int bufferNdx = 0; bufferNdx < (int)m_spec.buffers.size(); bufferNdx++)
224 deUint8* data = createRandomBufferData(m_spec.buffers[bufferNdx]);
233 GLU_CHECK_CALL(glBufferData(GL_ARRAY_BUFFER, m_spec.buffers[bufferNdx].size, data, GL_DYNAMIC_DRAW));
244 m_vaoProgram = createProgram(m_spec.vao);
247 m_stateProgram = createProgram(m_spec.state);
254 if (m_spec.useDrawElements && (m_spec.vao.elementArrayBuffer == 0 || m_spec.state.elementArrayBuffer == 0))
270 switch (m_spec.indexType)
279 deUint8* indices = new deUint8[m_spec.indexCount * typeSize];
281 for (int i = 0; i < m_spec.indexCount; i++)
285 switch (m_spec.indexType)
289 GLuint v = (GLuint)m_random.getInt(m_spec.indexRangeMin, m_spec.indexRangeMax);
296 GLushort v = (GLushort)m_random.getInt(m_spec.indexRangeMin, m_spec.indexRangeMax);
303 GLubyte v = (GLubyte)m_random.getInt(m_spec.indexRangeMin, m_spec.indexRangeMax);
572 if (m_spec.useDrawElements)
576 if (m_spec.instances == 0)
577 GLU_CHECK_CALL(glDrawElements(GL_TRIANGLES, m_spec.count, m_spec.indexType, m_indices));
579 GLU_CHECK_CALL(glDrawElementsInstanced(GL_TRIANGLES, m_spec.count, m_spec.indexType, m_indices, m_spec.instances));
583 if (m_spec
584 GLU_CHECK_CALL(glDrawElements(GL_TRIANGLES, m_spec.count, m_spec.indexType, (GLvoid*)((GLintptr)m_spec.indexOffset)));
586 GLU_CHECK_CALL(glDrawElementsInstanced(GL_TRIANGLES, m_spec.count, m_spec.indexType, (GLvoid*)((GLintptr)m_spec.indexOffset), m_spec.instances));
591 if (m_spec.instances == 0)
592 GLU_CHECK_CALL(glDrawArrays(GL_TRIANGLES, 0, m_spec.count));
594 GLU_CHECK_CALL(glDrawArraysInstanced(GL_TRIANGLES, 0, m_spec.count, m_spec.instances));
604 setState(m_spec.vao);
607 setState(m_spec.state);
611 makeDrawCall(m_spec.vao);
613 setState(m_spec.vao);
617 makeDrawCall(m_spec.state);
623 setState(m_spec.vao);
625 makeDrawCall(m_spec.vao);
628 setState(m_spec.state);
630 makeDrawCall(m_spec.state);
644 logVertexArrayState(m_log, m_spec.vao, "Vertex Array Object State");
645 logVertexArrayState(m_log, m_spec.state, "OpenGL Vertex Array State");
675 Spec m_spec;
743 m_spec.useDrawElements = false;
744 m_spec.instances = 0;
745 m_spec.count = 24;
746 m_spec.indexOffset = 0;
747 m_spec.indexRangeMin = 0;
748 m_spec.indexRangeMax = 0;
749 m_spec.indexType = GL_NONE;
750 m_spec.indexCount = 0;
751 m_spec.vao.elementArrayBuffer = 0;
752 m_spec.state.elementArrayBuffer = 0;
757 m_spec.buffers.push_back(shortCoordBuffer48);
759 m_spec.state.attributes.push_back(Attribute());
760 m_spec.state.attributes[attribNdx].enabled = (m_random.getInt(0, 4) == 0) ? GL_FALSE : GL_TRUE;
761 m_spec.state.attributes[attribNdx].size = m_random.getInt(2,4);
762 m_spec.state.attributes[attribNdx].stride = 2*m_random.getInt(1, 3);
763 m_spec.state.attributes[attribNdx].type = GL_SHORT;
764 m_spec.state.attributes[attribNdx].integer = m_random.getBool();
765 m_spec.state.attributes[attribNdx].divisor = m_random.getInt(0, 1);
766 m_spec.state.attributes[attribNdx].offset = 2*m_random.getInt(0, 2);
767 m_spec.state.attributes[attribNdx].normalized = m_random.getBool();
768 m_spec.state.attributes[attribNdx].bufferNdx = attribNdx+1;
772 m_spec.state.attributes[attribNdx].divisor = 0;
773 m_spec.state.attributes[attribNdx].enabled = GL_TRUE;
774 m_spec.state.attributes[attribNdx].size = 2;
777 m_spec.vao.attributes.push_back(Attribute());
778 m_spec.vao.attributes[attribNdx].enabled = (m_random.getInt(0, 4) == 0) ? GL_FALSE : GL_TRUE;
779 m_spec.vao.attributes[attribNdx].size = m_random.getInt(2,4);
780 m_spec.vao.attributes[attribNdx].stride = 2*m_random.getInt(1, 3);
781 m_spec.vao.attributes[attribNdx].type = GL_SHORT;
782 m_spec.vao.attributes[attribNdx].integer = m_random.getBool();
783 m_spec.vao.attributes[attribNdx].divisor = m_random.getInt(0, 1);
784 m_spec.vao.attributes[attribNdx].offset = 2*m_random.getInt(0, 2);
785 m_spec.vao.attributes[attribNdx].normalized = m_random.getBool();
786 m_spec.vao.attributes[attribNdx].bufferNdx = attribCount - attribNdx;
790 m_spec.vao.attributes[attribNdx].divisor = 0;
791 m_spec.vao.attributes[attribNdx].enabled = GL_TRUE;
792 m_spec.vao.attributes[attribNdx].size = 2;
798 for (int bufferNdx = 0; bufferNdx < (int)m_spec.buffers.size(); bufferNdx++)
800 deUint8* data = createRandomBufferData(m_spec.buffers[bufferNdx]);
809 GLU_CHECK_CALL(glBufferData(GL_ARRAY_BUFFER, m_spec.buffers[bufferNdx].size, data, GL_DYNAMIC_DRAW));
820 m_vaoProgram = createProgram(m_spec.vao);
823 m_stateProgram = createProgram(m_spec.state);
830 if (m_spec.useDrawElements && (m_spec.vao.elementArrayBuffer == 0 || m_spec.state.elementArrayBuffer == 0))
846 switch (m_spec.indexType)
855 deUint8* indices = new deUint8[m_spec.indexCount * typeSize];
857 for (int i = 0; i < m_spec.indexCount; i++)
861 switch (m_spec.indexType)
865 GLuint v = (GLuint)m_random.getInt(m_spec.indexRangeMin, m_spec.indexRangeMax);
872 GLushort v = (GLushort)m_random.getInt(m_spec.indexRangeMin, m_spec.indexRangeMax);
879 GLubyte v = (GLubyte)m_random.getInt(m_spec.indexRangeMin, m_spec.indexRangeMax);
1149 if (m_spec.useDrawElements)
1153 if (m_spec.instances == 0)
1154 GLU_CHECK_CALL(glDrawElements(GL_TRIANGLES, m_spec.count, m_spec.indexType, m_indices));
1156 GLU_CHECK_CALL(glDrawElementsInstanced(GL_TRIANGLES, m_spec.count, m_spec.indexType, m_indices, m_spec.instances));
1160 if (m_spec.instances == 0)
1161 GLU_CHECK_CALL(glDrawElements(GL_TRIANGLES, m_spec.count, m_spec.indexType, (GLvoid*)((GLintptr)m_spec.indexOffset)));
1163 GLU_CHECK_CALL(glDrawElementsInstanced(GL_TRIANGLES, m_spec.count, m_spec.indexType, (GLvoid*)((GLintptr)m_spec.indexOffset), m_spec.instances));
1168 if (m_spec.instances == 0)
1169 GLU_CHECK_CALL(glDrawArrays(GL_TRIANGLES, 0, m_spec.count));
1171 GLU_CHECK_CALL(glDrawArraysInstanced(GL_TRIANGLES, 0, m_spec.count, m_spec.instances));
1181 setState(m_spec.vao);
1184 setState(m_spec.state);
1188 makeDrawCall(m_spec.vao);
1190 setState(m_spec.vao);
1194 makeDrawCall(m_spec.state);
1200 setState(m_spec.vao);
1202 makeDrawCall(m_spec.vao);
1205 setState(m_spec.state);
1207 makeDrawCall(m_spec.state);
1221 logVertexArrayState(m_log, m_spec.vao, "Vertex Array Object State");
1222 logVertexArrayState(m_log, m_spec.state, "OpenGL Vertex Array State");