Lines Matching refs: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);
580 if (m_spec.useDrawElements)
584 if (m_spec.instances == 0)
585 GLU_CHECK_CALL(glDrawElements(GL_TRIANGLES, m_spec.count, m_spec.indexType, m_indices));
587 GLU_CHECK_CALL(glDrawElementsInstanced(GL_TRIANGLES, m_spec.count, m_spec.indexType, m_indices, m_spec.instances));
591 if (m_spec.instances == 0)
592 GLU_CHECK_CALL(glDrawElements(GL_TRIANGLES, m_spec.count, m_spec.indexType, (GLvoid*)((GLintptr)m_spec.indexOffset)));
594 GLU_CHECK_CALL(glDrawElementsInstanced(GL_TRIANGLES, m_spec.count, m_spec.indexType, (GLvoid*)((GLintptr)m_spec.indexOffset), m_spec.instances));
599 if (m_spec.instances == 0)
600 GLU_CHECK_CALL(glDrawArrays(GL_TRIANGLES, 0, m_spec.count));
602 GLU_CHECK_CALL(glDrawArraysInstanced(GL_TRIANGLES, 0, m_spec.count, m_spec.instances));
612 setState(m_spec.vao);
615 setState(m_spec.state);
619 makeDrawCall(m_spec.vao);
621 setState(m_spec.vao);
625 makeDrawCall(m_spec.state);
631 setState(m_spec.vao);
633 makeDrawCall(m_spec.vao);
636 setState(m_spec.state);
638 makeDrawCall(m_spec.state);
652 logVertexArrayState(m_log, m_spec.vao, "Vertex Array Object State");
653 logVertexArrayState(m_log, m_spec.state, "OpenGL Vertex Array State");
683 Spec m_spec;
751 m_spec.useDrawElements = false;
752 m_spec.instances = 0;
753 m_spec.count = 24;
754 m_spec.indexOffset = 0;
755 m_spec.indexRangeMin = 0;
756 m_spec.indexRangeMax = 0;
757 m_spec.indexType = GL_NONE;
758 m_spec.indexCount = 0;
759 m_spec.vao.elementArrayBuffer = 0;
760 m_spec.state.elementArrayBuffer = 0;
765 m_spec.buffers.push_back(shortCoordBuffer48);
767 m_spec.state.attributes.push_back(Attribute());
768 m_spec.state.attributes[attribNdx].enabled = (m_random.getInt(0, 4) == 0) ? GL_FALSE : GL_TRUE;
769 m_spec.state.attributes[attribNdx].size = m_random.getInt(2,4);
770 m_spec.state.attributes[attribNdx].stride = 2*m_random.getInt(1, 3);
771 m_spec.state.attributes[attribNdx].type = GL_SHORT;
772 m_spec.state.attributes[attribNdx].integer = m_random.getBool();
773 m_spec.state.attributes[attribNdx].divisor = m_random.getInt(0, 1);
774 m_spec.state.attributes[attribNdx].offset = 2*m_random.getInt(0, 2);
775 m_spec.state.attributes[attribNdx].normalized = m_random.getBool();
776 m_spec.state.attributes[attribNdx].bufferNdx = attribNdx+1;
780 m_spec.state.attributes[attribNdx].divisor = 0;
781 m_spec.state.attributes[attribNdx].enabled = GL_TRUE;
782 m_spec.state.attributes[attribNdx].size = 2;
785 m_spec.vao.attributes.push_back(Attribute());
786 m_spec.vao.attributes[attribNdx].enabled = (m_random.getInt(0, 4) == 0) ? GL_FALSE : GL_TRUE;
787 m_spec.vao.attributes[attribNdx].size = m_random.getInt(2,4);
788 m_spec.vao.attributes[attribNdx].stride = 2*m_random.getInt(1, 3);
789 m_spec.vao.attributes[attribNdx].type = GL_SHORT;
790 m_spec.vao.attributes[attribNdx].integer = m_random.getBool();
791 m_spec.vao.attributes[attribNdx].divisor = m_random.getInt(0, 1);
792 m_spec.vao.attributes[attribNdx].offset = 2*m_random.getInt(0, 2);
793 m_spec.vao.attributes[attribNdx].normalized = m_random.getBool();
794 m_spec.vao.attributes[attribNdx].bufferNdx = attribCount - attribNdx;
798 m_spec.vao.attributes[attribNdx].divisor = 0;
799 m_spec.vao.attributes[attribNdx].enabled = GL_TRUE;
800 m_spec.vao.attributes[attribNdx].size = 2;
806 for (int bufferNdx = 0; bufferNdx < (int)m_spec.buffers.size(); bufferNdx++)
808 deUint8* data = createRandomBufferData(m_spec.buffers[bufferNdx]);
817 GLU_CHECK_CALL(glBufferData(GL_ARRAY_BUFFER, m_spec.buffers[bufferNdx].size, data, GL_DYNAMIC_DRAW));
828 m_vaoProgram = createProgram(m_spec.vao);
831 m_stateProgram = createProgram(m_spec.state);
838 if (m_spec.useDrawElements && (m_spec.vao.elementArrayBuffer == 0 || m_spec.state.elementArrayBuffer == 0))
854 switch (m_spec.indexType)
863 deUint8* indices = new deUint8[m_spec.indexCount * typeSize];
865 for (int i = 0; i < m_spec.indexCount; i++)
869 switch (m_spec.indexType)
873 GLuint v = (GLuint)m_random.getInt(m_spec.indexRangeMin, m_spec.indexRangeMax);
880 GLushort v = (GLushort)m_random.getInt(m_spec.indexRangeMin, m_spec.indexRangeMax);
887 GLubyte v = (GLubyte)m_random.getInt(m_spec.indexRangeMin, m_spec.indexRangeMax);
1157 if (m_spec.useDrawElements)
1161 if (m_spec.instances == 0)
1162 GLU_CHECK_CALL(glDrawElements(GL_TRIANGLES, m_spec.count, m_spec.indexType, m_indices));
1164 GLU_CHECK_CALL(glDrawElementsInstanced(GL_TRIANGLES, m_spec.count, m_spec.indexType, m_indices, m_spec.instances));
1168 if (m_spec.instances == 0)
1169 GLU_CHECK_CALL(glDrawElements(GL_TRIANGLES, m_spec.count, m_spec.indexType, (GLvoid*)((GLintptr)m_spec.indexOffset)));
1171 GLU_CHECK_CALL(glDrawElementsInstanced(GL_TRIANGLES, m_spec.count, m_spec.indexType, (GLvoid*)((GLintptr)m_spec.indexOffset), m_spec.instances));
1176 if (m_spec.instances == 0)
1177 GLU_CHECK_CALL(glDrawArrays(GL_TRIANGLES, 0, m_spec.count));
1179 GLU_CHECK_CALL(glDrawArraysInstanced(GL_TRIANGLES, 0, m_spec.count, m_spec.instances));
1189 setState(m_spec.vao);
1192 setState(m_spec.state);
1196 makeDrawCall(m_spec.vao);
1198 setState(m_spec.vao);
1202 makeDrawCall(m_spec.state);
1208 setState(m_spec.vao);
1210 makeDrawCall(m_spec.vao);
1213 setState(m_spec.state);
1215 makeDrawCall(m_spec.state);
1229 logVertexArrayState(m_log, m_spec.vao, "Vertex Array Object State");
1230 logVertexArrayState(m_log, m_spec.state, "OpenGL Vertex Array State");