GLuint fbo = 0;
GLuint buf = 0;
GLuint tfID = 0;
- GLfloat vertices[1];
+ GLbyte indices[1] = {0};
map<string, string> args;
args["GLSL_VERSION_STRING"] = isES32 ? getGLSLVersionDeclaration(glu::GLSL_VERSION_320_ES) : getGLSLVersionDeclaration(glu::GLSL_VERSION_310_ES);
glu::ShaderProgram program (ctx.getRenderContext(), glu::makeVtxFragSources(tcu::StringTemplate(vertexShaderSource).specialize(args), tcu::StringTemplate(fragmentShaderSource).specialize(args)));
ctx.expectError(GL_NO_ERROR);
ctx.beginSection("GL_INVALID_ENUM is generated if mode is not an accepted value.");
- ctx.glDrawElements(-1, 1, GL_UNSIGNED_BYTE, vertices);
+ ctx.glDrawElements(-1, 1, GL_UNSIGNED_BYTE, indices);
ctx.expectError(GL_INVALID_ENUM);
ctx.endSection();
ctx.beginSection("GL_INVALID_ENUM is generated if type is not one of the accepted values.");
- ctx.glDrawElements(GL_POINTS, 1, -1, vertices);
+ ctx.glDrawElements(GL_POINTS, 1, -1, indices);
ctx.expectError(GL_INVALID_ENUM);
- ctx.glDrawElements(GL_POINTS, 1, GL_FLOAT, vertices);
+ ctx.glDrawElements(GL_POINTS, 1, GL_FLOAT, indices);
ctx.expectError(GL_INVALID_ENUM);
ctx.endSection();
ctx.beginSection("GL_INVALID_VALUE is generated if count is negative.");
- ctx.glDrawElements(GL_POINTS, -1, GL_UNSIGNED_BYTE, vertices);
+ ctx.glDrawElements(GL_POINTS, -1, GL_UNSIGNED_BYTE, indices);
ctx.expectError(GL_INVALID_VALUE);
ctx.endSection();
ctx.glGenFramebuffers(1, &fbo);
ctx.glBindFramebuffer(GL_FRAMEBUFFER, fbo);
ctx.glCheckFramebufferStatus(GL_FRAMEBUFFER);
- ctx.glDrawElements(GL_POINTS, 1, GL_UNSIGNED_BYTE, vertices);
+ ctx.glDrawElements(GL_POINTS, 1, GL_UNSIGNED_BYTE, indices);
ctx.expectError(GL_INVALID_FRAMEBUFFER_OPERATION);
ctx.glBindFramebuffer(GL_FRAMEBUFFER, 0);
ctx.glDeleteFramebuffers(1, &fbo);
ctx.glBeginTransformFeedback(GL_POINTS);
ctx.expectError(GL_NO_ERROR);
- ctx.glDrawElements(GL_POINTS, 1, GL_UNSIGNED_BYTE, vertices);
+ ctx.glDrawElements(GL_POINTS, 1, GL_UNSIGNED_BYTE, indices);
ctx.expectError(GL_INVALID_OPERATION);
ctx.glPauseTransformFeedback();
- ctx.glDrawElements(GL_POINTS, 1, GL_UNSIGNED_BYTE, vertices);
+ ctx.glDrawElements(GL_POINTS, 1, GL_UNSIGNED_BYTE, indices);
ctx.expectError(GL_NO_ERROR);
ctx.glEndTransformFeedback();
void draw_elements_invalid_program (NegativeTestContext& ctx)
{
ctx.glUseProgram(0);
- GLuint fbo = 0;
- GLfloat vertices[1];
+ GLuint fbo = 0;
+ GLbyte indices[1] = {0};
ctx.beginSection("GL_INVALID_ENUM is generated if mode is not an accepted value.");
- ctx.glDrawElements(-1, 1, GL_UNSIGNED_BYTE, vertices);
+ ctx.glDrawElements(-1, 1, GL_UNSIGNED_BYTE, indices);
ctx.expectError(GL_INVALID_ENUM);
ctx.endSection();
ctx.beginSection("GL_INVALID_ENUM is generated if type is not one of the accepted values.");
- ctx.glDrawElements(GL_POINTS, 1, -1, vertices);
+ ctx.glDrawElements(GL_POINTS, 1, -1, indices);
ctx.expectError(GL_INVALID_ENUM);
- ctx.glDrawElements(GL_POINTS, 1, GL_FLOAT, vertices);
+ ctx.glDrawElements(GL_POINTS, 1, GL_FLOAT, indices);
ctx.expectError(GL_INVALID_ENUM);
ctx.endSection();
ctx.beginSection("GL_INVALID_VALUE is generated if count is negative.");
- ctx.glDrawElements(GL_POINTS, -1, GL_UNSIGNED_BYTE, vertices);
+ ctx.glDrawElements(GL_POINTS, -1, GL_UNSIGNED_BYTE, indices);
ctx.expectError(GL_INVALID_VALUE);
ctx.endSection();
ctx.glGenFramebuffers(1, &fbo);
ctx.glBindFramebuffer(GL_FRAMEBUFFER, fbo);
ctx.glCheckFramebufferStatus(GL_FRAMEBUFFER);
- ctx.glDrawElements(GL_POINTS, 1, GL_UNSIGNED_BYTE, vertices);
+ ctx.glDrawElements(GL_POINTS, 1, GL_UNSIGNED_BYTE, indices);
ctx.expectError(GL_INVALID_FRAMEBUFFER_OPERATION);
ctx.glBindFramebuffer(GL_FRAMEBUFFER, 0);
ctx.glDeleteFramebuffers(1, &fbo);
GLuint fbo = 0;
GLuint buf = 0;
GLuint tfID = 0;
- GLfloat vertices[1];
+ GLbyte indices[1] = {0};
map<string, string> args;
args["GLSL_VERSION_STRING"] = isES32 ? getGLSLVersionDeclaration(glu::GLSL_VERSION_320_ES) : getGLSLVersionDeclaration(glu::GLSL_VERSION_310_ES);
glu::ShaderProgram program (ctx.getRenderContext(), glu::makeVtxFragSources(tcu::StringTemplate(vertexShaderSource).specialize(args), tcu::StringTemplate(fragmentShaderSource).specialize(args)));
ctx.expectError(GL_NO_ERROR);
ctx.beginSection("GL_INVALID_ENUM is generated if mode is not an accepted value.");
- ctx.glDrawElements(-1, 1, GL_UNSIGNED_BYTE, vertices);
+ ctx.glDrawElements(-1, 1, GL_UNSIGNED_BYTE, indices);
ctx.expectError(GL_INVALID_ENUM);
ctx.endSection();
ctx.beginSection("GL_INVALID_ENUM is generated if type is not one of the accepted values.");
- ctx.glDrawElements(GL_TRIANGLES, 1, -1, vertices);
+ ctx.glDrawElements(GL_TRIANGLES, 1, -1, indices);
ctx.expectError(GL_INVALID_ENUM);
- ctx.glDrawElements(GL_TRIANGLES, 1, GL_FLOAT, vertices);
+ ctx.glDrawElements(GL_TRIANGLES, 1, GL_FLOAT, indices);
ctx.expectError(GL_INVALID_ENUM);
ctx.endSection();
ctx.beginSection("GL_INVALID_VALUE is generated if count is negative.");
- ctx.glDrawElements(GL_TRIANGLES, -1, GL_UNSIGNED_BYTE, vertices);
+ ctx.glDrawElements(GL_TRIANGLES, -1, GL_UNSIGNED_BYTE, indices);
ctx.expectError(GL_INVALID_VALUE);
ctx.endSection();
ctx.glGenFramebuffers(1, &fbo);
ctx.glBindFramebuffer(GL_FRAMEBUFFER, fbo);
ctx.glCheckFramebufferStatus(GL_FRAMEBUFFER);
- ctx.glDrawElements(GL_TRIANGLES, 1, GL_UNSIGNED_BYTE, vertices);
+ ctx.glDrawElements(GL_TRIANGLES, 1, GL_UNSIGNED_BYTE, indices);
ctx.expectError(GL_INVALID_FRAMEBUFFER_OPERATION);
ctx.glBindFramebuffer(GL_FRAMEBUFFER, 0);
ctx.glDeleteFramebuffers(1, &fbo);
ctx.glBeginTransformFeedback(GL_TRIANGLES);
ctx.expectError(GL_NO_ERROR);
- ctx.glDrawElements(GL_TRIANGLES, 1, GL_UNSIGNED_BYTE, vertices);
+ ctx.glDrawElements(GL_TRIANGLES, 1, GL_UNSIGNED_BYTE, indices);
ctx.expectError(GL_INVALID_OPERATION);
ctx.glPauseTransformFeedback();
- ctx.glDrawElements(GL_TRIANGLES, 1, GL_UNSIGNED_BYTE, vertices);
+ ctx.glDrawElements(GL_TRIANGLES, 1, GL_UNSIGNED_BYTE, indices);
ctx.expectError(GL_NO_ERROR);
ctx.glEndTransformFeedback();
TCU_CHECK_AND_THROW(NotSupportedError, contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2)), "This test requires a 3.2 context or higher context version.");
GLuint fbo = 0;
- GLfloat vertices[1];
+ GLuint indices[1] = {0};
ctx.beginSection("GL_INVALID_ENUM is generated if mode is not an accepted value.");
- ctx.glDrawElementsBaseVertex(-1, 1, GL_UNSIGNED_INT, vertices, 1);
+ ctx.glDrawElementsBaseVertex(-1, 1, GL_UNSIGNED_INT, indices, 1);
ctx.expectError(GL_INVALID_ENUM);
ctx.endSection();
ctx.beginSection("GL_INVALID_ENUM is generated if type is not one of the accepted values.");
- ctx.glDrawElementsBaseVertex(GL_POINTS, 1, -1, vertices, 1);
+ ctx.glDrawElementsBaseVertex(GL_POINTS, 1, -1, indices, 1);
ctx.expectError(GL_INVALID_ENUM);
- ctx.glDrawElementsBaseVertex(GL_POINTS, 1, GL_FLOAT, vertices, 1);
+ ctx.glDrawElementsBaseVertex(GL_POINTS, 1, GL_FLOAT, indices, 1);
ctx.expectError(GL_INVALID_ENUM);
ctx.endSection();
ctx.beginSection("GL_INVALID_VALUE is generated if count is negative.");
- ctx.glDrawElementsBaseVertex(GL_POINTS, -1, GL_UNSIGNED_INT, vertices, 1);
+ ctx.glDrawElementsBaseVertex(GL_POINTS, -1, GL_UNSIGNED_INT, indices, 1);
ctx.expectError(GL_INVALID_VALUE);
ctx.endSection();
ctx.glGenFramebuffers(1, &fbo);
ctx.glBindFramebuffer(GL_FRAMEBUFFER, fbo);
ctx.glCheckFramebufferStatus(GL_FRAMEBUFFER);
- ctx.glDrawElementsBaseVertex(GL_POINTS, 1, GL_UNSIGNED_INT, vertices, 1);
+ ctx.glDrawElementsBaseVertex(GL_POINTS, 1, GL_UNSIGNED_INT, indices, 1);
ctx.expectError(GL_INVALID_FRAMEBUFFER_OPERATION);
ctx.glBindFramebuffer(GL_FRAMEBUFFER, 0);
ctx.glDeleteFramebuffers(1, &fbo);
{
TCU_CHECK_AND_THROW(NotSupportedError, contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2)), "This test requires a 3.2 context or higher context version.");
- GLfloat vertices[1];
+ GLuint indices[1] = {0};
map<string, string> args;
args["GLSL_VERSION_STRING"] = getGLSLVersionDeclaration(glu::GLSL_VERSION_320_ES);
ctx.beginSection("GL_INVALID_OPERATION is generated if a geometry shader is active and mode is incompatible with the input primitive type of the geometry shader in the currently installed program object.");
ctx.glUseProgram(program.getProgram());
- ctx.glDrawElementsBaseVertex(GL_TRIANGLES, 1, GL_UNSIGNED_INT, vertices, 1);
+ ctx.glDrawElementsBaseVertex(GL_TRIANGLES, 1, GL_UNSIGNED_INT, indices, 1);
ctx.expectError(GL_INVALID_OPERATION);
ctx.endSection();
GLuint fbo = 0;
GLuint buf = 0;
GLuint tfID = 0;
- GLfloat vertices[1];
+ GLbyte indices[1] = {0};
map<string, string> args;
args["GLSL_VERSION_STRING"] = isES32 ? getGLSLVersionDeclaration(glu::GLSL_VERSION_320_ES) : getGLSLVersionDeclaration(glu::GLSL_VERSION_310_ES);
glu::ShaderProgram program (ctx.getRenderContext(), glu::makeVtxFragSources(tcu::StringTemplate(vertexShaderSource).specialize(args), tcu::StringTemplate(fragmentShaderSource).specialize(args)));
ctx.expectError(GL_NO_ERROR);
ctx.beginSection("GL_INVALID_ENUM is generated if mode is not an accepted value.");
- ctx.glDrawElementsInstanced(-1, 1, GL_UNSIGNED_BYTE, vertices, 1);
+ ctx.glDrawElementsInstanced(-1, 1, GL_UNSIGNED_BYTE, indices, 1);
ctx.expectError(GL_INVALID_ENUM);
ctx.endSection();
ctx.beginSection("GL_INVALID_ENUM is generated if type is not one of the accepted values.");
- ctx.glDrawElementsInstanced(GL_POINTS, 1, -1, vertices, 1);
+ ctx.glDrawElementsInstanced(GL_POINTS, 1, -1, indices, 1);
ctx.expectError(GL_INVALID_ENUM);
- ctx.glDrawElementsInstanced(GL_POINTS, 1, GL_FLOAT, vertices, 1);
+ ctx.glDrawElementsInstanced(GL_POINTS, 1, GL_FLOAT, indices, 1);
ctx.expectError(GL_INVALID_ENUM);
ctx.endSection();
ctx.beginSection("GL_INVALID_VALUE is generated if count or primcount are negative.");
- ctx.glDrawElementsInstanced(GL_POINTS, -1, GL_UNSIGNED_BYTE, vertices, 1);
+ ctx.glDrawElementsInstanced(GL_POINTS, -1, GL_UNSIGNED_BYTE, indices, 1);
ctx.expectError(GL_INVALID_VALUE);
- ctx.glDrawElementsInstanced(GL_POINTS, 11, GL_UNSIGNED_BYTE, vertices, -1);
+ ctx.glDrawElementsInstanced(GL_POINTS, 11, GL_UNSIGNED_BYTE, indices, -1);
ctx.expectError(GL_INVALID_VALUE);
ctx.endSection();
ctx.glGenFramebuffers(1, &fbo);
ctx.glBindFramebuffer(GL_FRAMEBUFFER, fbo);
ctx.glCheckFramebufferStatus(GL_FRAMEBUFFER);
- ctx.glDrawElementsInstanced(GL_POINTS, 1, GL_UNSIGNED_BYTE, vertices, 1);
+ ctx.glDrawElementsInstanced(GL_POINTS, 1, GL_UNSIGNED_BYTE, indices, 1);
ctx.expectError(GL_INVALID_FRAMEBUFFER_OPERATION);
ctx.glBindFramebuffer(GL_FRAMEBUFFER, 0);
ctx.glDeleteFramebuffers(1, &fbo);
ctx.glBeginTransformFeedback(GL_POINTS);
ctx.expectError(GL_NO_ERROR);
- ctx.glDrawElementsInstanced(GL_POINTS, 1, GL_UNSIGNED_BYTE, vertices, 1);
+ ctx.glDrawElementsInstanced(GL_POINTS, 1, GL_UNSIGNED_BYTE, indices, 1);
ctx.expectError(GL_INVALID_OPERATION);
ctx.glPauseTransformFeedback();
- ctx.glDrawElementsInstanced(GL_POINTS, 1, GL_UNSIGNED_BYTE, vertices, 1);
+ ctx.glDrawElementsInstanced(GL_POINTS, 1, GL_UNSIGNED_BYTE, indices, 1);
ctx.expectError(GL_NO_ERROR);
ctx.glEndTransformFeedback();
{
ctx.glUseProgram(0);
GLuint fbo = 0;
- GLfloat vertices[1];
+ GLbyte indices[1] = {0};
ctx.glVertexAttribDivisor(0, 1);
ctx.expectError(GL_NO_ERROR);
ctx.beginSection("GL_INVALID_ENUM is generated if mode is not an accepted value.");
- ctx.glDrawElementsInstanced(-1, 1, GL_UNSIGNED_BYTE, vertices, 1);
+ ctx.glDrawElementsInstanced(-1, 1, GL_UNSIGNED_BYTE, indices, 1);
ctx.expectError(GL_INVALID_ENUM);
ctx.endSection();
ctx.beginSection("GL_INVALID_ENUM is generated if type is not one of the accepted values.");
- ctx.glDrawElementsInstanced(GL_POINTS, 1, -1, vertices, 1);
+ ctx.glDrawElementsInstanced(GL_POINTS, 1, -1, indices, 1);
ctx.expectError(GL_INVALID_ENUM);
- ctx.glDrawElementsInstanced(GL_POINTS, 1, GL_FLOAT, vertices, 1);
+ ctx.glDrawElementsInstanced(GL_POINTS, 1, GL_FLOAT, indices, 1);
ctx.expectError(GL_INVALID_ENUM);
ctx.endSection();
ctx.beginSection("GL_INVALID_VALUE is generated if count or primcount are negative.");
- ctx.glDrawElementsInstanced(GL_POINTS, -1, GL_UNSIGNED_BYTE, vertices, 1);
+ ctx.glDrawElementsInstanced(GL_POINTS, -1, GL_UNSIGNED_BYTE, indices, 1);
ctx.expectError(GL_INVALID_VALUE);
- ctx.glDrawElementsInstanced(GL_POINTS, 11, GL_UNSIGNED_BYTE, vertices, -1);
+ ctx.glDrawElementsInstanced(GL_POINTS, 11, GL_UNSIGNED_BYTE, indices, -1);
ctx.expectError(GL_INVALID_VALUE);
ctx.endSection();
ctx.glGenFramebuffers(1, &fbo);
ctx.glBindFramebuffer(GL_FRAMEBUFFER, fbo);
ctx.glCheckFramebufferStatus(GL_FRAMEBUFFER);
- ctx.glDrawElementsInstanced(GL_POINTS, 1, GL_UNSIGNED_BYTE, vertices, 1);
+ ctx.glDrawElementsInstanced(GL_POINTS, 1, GL_UNSIGNED_BYTE, indices, 1);
ctx.expectError(GL_INVALID_FRAMEBUFFER_OPERATION);
ctx.glBindFramebuffer(GL_FRAMEBUFFER, 0);
ctx.glDeleteFramebuffers(1, &fbo);
GLuint fbo = 0;
GLuint buf = 0;
GLuint tfID = 0;
- GLfloat vertices[1];
+ GLbyte indices[1] = {0};
map<string, string> args;
args["GLSL_VERSION_STRING"] = isES32 ? getGLSLVersionDeclaration(glu::GLSL_VERSION_320_ES) : getGLSLVersionDeclaration(glu::GLSL_VERSION_310_ES);
glu::ShaderProgram program (ctx.getRenderContext(), glu::makeVtxFragSources(tcu::StringTemplate(vertexShaderSource).specialize(args), tcu::StringTemplate(fragmentShaderSource).specialize(args)));
ctx.expectError(GL_NO_ERROR);
ctx.beginSection("GL_INVALID_ENUM is generated if mode is not an accepted value.");
- ctx.glDrawElementsInstanced(-1, 1, GL_UNSIGNED_BYTE, vertices, 1);
+ ctx.glDrawElementsInstanced(-1, 1, GL_UNSIGNED_BYTE, indices, 1);
ctx.expectError(GL_INVALID_ENUM);
ctx.endSection();
ctx.beginSection("GL_INVALID_ENUM is generated if type is not one of the accepted values.");
- ctx.glDrawElementsInstanced(GL_TRIANGLES, 1, -1, vertices, 1);
+ ctx.glDrawElementsInstanced(GL_TRIANGLES, 1, -1, indices, 1);
ctx.expectError(GL_INVALID_ENUM);
- ctx.glDrawElementsInstanced(GL_TRIANGLES, 1, GL_FLOAT, vertices, 1);
+ ctx.glDrawElementsInstanced(GL_TRIANGLES, 1, GL_FLOAT, indices, 1);
ctx.expectError(GL_INVALID_ENUM);
ctx.endSection();
ctx.beginSection("GL_INVALID_VALUE is generated if count or primcount are negative.");
- ctx.glDrawElementsInstanced(GL_TRIANGLES, -1, GL_UNSIGNED_BYTE, vertices, 1);
+ ctx.glDrawElementsInstanced(GL_TRIANGLES, -1, GL_UNSIGNED_BYTE, indices, 1);
ctx.expectError(GL_INVALID_VALUE);
- ctx.glDrawElementsInstanced(GL_TRIANGLES, 11, GL_UNSIGNED_BYTE, vertices, -1);
+ ctx.glDrawElementsInstanced(GL_TRIANGLES, 11, GL_UNSIGNED_BYTE, indices, -1);
ctx.expectError(GL_INVALID_VALUE);
ctx.endSection();
ctx.glGenFramebuffers(1, &fbo);
ctx.glBindFramebuffer(GL_FRAMEBUFFER, fbo);
ctx.glCheckFramebufferStatus(GL_FRAMEBUFFER);
- ctx.glDrawElementsInstanced(GL_TRIANGLES, 1, GL_UNSIGNED_BYTE, vertices, 1);
+ ctx.glDrawElementsInstanced(GL_TRIANGLES, 1, GL_UNSIGNED_BYTE, indices, 1);
ctx.expectError(GL_INVALID_FRAMEBUFFER_OPERATION);
ctx.glBindFramebuffer(GL_FRAMEBUFFER, 0);
ctx.glDeleteFramebuffers(1, &fbo);
ctx.glBeginTransformFeedback(GL_TRIANGLES);
ctx.expectError(GL_NO_ERROR);
- ctx.glDrawElementsInstanced(GL_TRIANGLES, 1, GL_UNSIGNED_BYTE, vertices, 1);
+ ctx.glDrawElementsInstanced(GL_TRIANGLES, 1, GL_UNSIGNED_BYTE, indices, 1);
ctx.expectError(GL_INVALID_OPERATION);
ctx.glPauseTransformFeedback();
- ctx.glDrawElementsInstanced (GL_TRIANGLES, 1, GL_UNSIGNED_BYTE, vertices, 1);
+ ctx.glDrawElementsInstanced (GL_TRIANGLES, 1, GL_UNSIGNED_BYTE, indices, 1);
ctx.expectError(GL_NO_ERROR);
ctx.glEndTransformFeedback();
const bool isES32 = glu::contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2));
GLuint fbo = 0;
- GLfloat vertices[1];
+ GLbyte indices[1] = {0};
map<string, string> args;
args["GLSL_VERSION_STRING"] = isES32 ? getGLSLVersionDeclaration(glu::GLSL_VERSION_320_ES) : getGLSLVersionDeclaration(glu::GLSL_VERSION_310_ES);
glu::ShaderProgram program (ctx.getRenderContext(), glu::makeVtxFragSources(tcu::StringTemplate(vertexShaderSource).specialize(args), tcu::StringTemplate(fragmentShaderSource).specialize(args)));
ctx.expectError(GL_NO_ERROR);
ctx.beginSection("GL_INVALID_ENUM is generated if mode is not an accepted value.");
- ctx.glDrawElementsInstancedBaseVertex(-1, 1, GL_UNSIGNED_BYTE, vertices, 1, 1);
+ ctx.glDrawElementsInstancedBaseVertex(-1, 1, GL_UNSIGNED_BYTE, indices, 1, 1);
ctx.expectError(GL_INVALID_ENUM);
ctx.endSection();
ctx.beginSection("GL_INVALID_ENUM is generated if type is not one of the accepted values.");
- ctx.glDrawElementsInstancedBaseVertex(GL_POINTS, 1, -1, vertices, 1, 1);
+ ctx.glDrawElementsInstancedBaseVertex(GL_POINTS, 1, -1, indices, 1, 1);
ctx.expectError(GL_INVALID_ENUM);
- ctx.glDrawElementsInstancedBaseVertex(GL_POINTS, 1, GL_FLOAT, vertices, 1, 1);
+ ctx.glDrawElementsInstancedBaseVertex(GL_POINTS, 1, GL_FLOAT, indices, 1, 1);
ctx.expectError(GL_INVALID_ENUM);
ctx.endSection();
ctx.beginSection("GL_INVALID_VALUE is generated if count or primcount are negative.");
- ctx.glDrawElementsInstancedBaseVertex(GL_POINTS, -1, GL_UNSIGNED_BYTE, vertices, 1, 1);
+ ctx.glDrawElementsInstancedBaseVertex(GL_POINTS, -1, GL_UNSIGNED_BYTE, indices, 1, 1);
ctx.expectError(GL_INVALID_VALUE);
- ctx.glDrawElementsInstancedBaseVertex(GL_POINTS, 11, GL_UNSIGNED_BYTE, vertices, -1, 1);
+ ctx.glDrawElementsInstancedBaseVertex(GL_POINTS, 11, GL_UNSIGNED_BYTE, indices, -1, 1);
ctx.expectError(GL_INVALID_VALUE);
ctx.endSection();
ctx.glGenFramebuffers(1, &fbo);
ctx.glBindFramebuffer(GL_FRAMEBUFFER, fbo);
ctx.glCheckFramebufferStatus(GL_FRAMEBUFFER);
- ctx.glDrawElementsInstancedBaseVertex(GL_POINTS, 1, GL_UNSIGNED_BYTE, vertices, 1, 1);
+ ctx.glDrawElementsInstancedBaseVertex(GL_POINTS, 1, GL_UNSIGNED_BYTE, indices, 1, 1);
ctx.expectError(GL_INVALID_FRAMEBUFFER_OPERATION);
ctx.glBindFramebuffer(GL_FRAMEBUFFER, 0);
ctx.glDeleteFramebuffers(1, &fbo);
{
TCU_CHECK_AND_THROW(NotSupportedError, contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2)), "This test requires a 3.2 context or higher context version.");
- GLfloat vertices[1];
+ GLuint indices[1] = {0};
map<string, string> args;
args["GLSL_VERSION_STRING"] = getGLSLVersionDeclaration(glu::GLSL_VERSION_320_ES);
glu::ShaderProgram geometryProgram(ctx.getRenderContext(), glu::ProgramSources() << glu::ProgramSeparable(true) << glu::VertexSource(tcu::StringTemplate(vertexShaderSource).specialize(args)) << glu::GeometrySource(geometryShaderSource));
ctx.beginSection("GL_INVALID_OPERATION is generated if a geometry shader is active and mode is incompatible with the input primitive type of the geometry shader in the currently installed program object.");
ctx.glUseProgram(geometryProgram.getProgram());
- ctx.glDrawElementsInstancedBaseVertex(GL_TRIANGLES, 1, GL_UNSIGNED_INT, vertices, 1, 1);
+ ctx.glDrawElementsInstancedBaseVertex(GL_TRIANGLES, 1, GL_UNSIGNED_INT, indices, 1, 1);
ctx.expectError(GL_INVALID_OPERATION);
ctx.endSection();
GLuint fbo = 0;
GLuint buf = 0;
GLuint tfID = 0;
- GLfloat vertices[1];
+ GLbyte indices[1] = {0};
map<string, string> args;
args["GLSL_VERSION_STRING"] = isES32 ? getGLSLVersionDeclaration(glu::GLSL_VERSION_320_ES) : getGLSLVersionDeclaration(glu::GLSL_VERSION_310_ES);
glu::ShaderProgram program (ctx.getRenderContext(), glu::makeVtxFragSources(tcu::StringTemplate(vertexShaderSource).specialize(args), tcu::StringTemplate(fragmentShaderSource).specialize(args)));
ctx.expectError(GL_NO_ERROR);
ctx.beginSection("GL_INVALID_ENUM is generated if mode is not an accepted value.");
- ctx.glDrawRangeElements(-1, 0, 1, 1, GL_UNSIGNED_BYTE, vertices);
+ ctx.glDrawRangeElements(-1, 0, 1, 1, GL_UNSIGNED_BYTE, indices);
ctx.expectError(GL_INVALID_ENUM);
ctx.endSection();
ctx.beginSection("GL_INVALID_ENUM is generated if type is not one of the accepted values.");
- ctx.glDrawRangeElements(GL_POINTS, 0, 1, 1, -1, vertices);
+ ctx.glDrawRangeElements(GL_POINTS, 0, 1, 1, -1, indices);
ctx.expectError(GL_INVALID_ENUM);
- ctx.glDrawRangeElements(GL_POINTS, 0, 1, 1, GL_FLOAT, vertices);
+ ctx.glDrawRangeElements(GL_POINTS, 0, 1, 1, GL_FLOAT, indices);
ctx.expectError(GL_INVALID_ENUM);
ctx.endSection();
ctx.beginSection("GL_INVALID_VALUE is generated if count is negative.");
- ctx.glDrawRangeElements(GL_POINTS, 0, 1, -1, GL_UNSIGNED_BYTE, vertices);
+ ctx.glDrawRangeElements(GL_POINTS, 0, 1, -1, GL_UNSIGNED_BYTE, indices);
ctx.expectError(GL_INVALID_VALUE);
ctx.endSection();
ctx.beginSection("GL_INVALID_VALUE is generated if end < start.");
- ctx.glDrawRangeElements(GL_POINTS, 1, 0, 1, GL_UNSIGNED_BYTE, vertices);
+ ctx.glDrawRangeElements(GL_POINTS, 1, 0, 1, GL_UNSIGNED_BYTE, indices);
ctx.expectError(GL_INVALID_VALUE);
ctx.endSection();
ctx.glGenFramebuffers(1, &fbo);
ctx.glBindFramebuffer(GL_FRAMEBUFFER, fbo);
ctx.glCheckFramebufferStatus(GL_FRAMEBUFFER);
- ctx.glDrawRangeElements(GL_POINTS, 0, 1, 1, GL_UNSIGNED_BYTE, vertices);
+ ctx.glDrawRangeElements(GL_POINTS, 0, 1, 1, GL_UNSIGNED_BYTE, indices);
ctx.expectError(GL_INVALID_FRAMEBUFFER_OPERATION);
ctx.glBindFramebuffer(GL_FRAMEBUFFER, 0);
ctx.glDeleteFramebuffers(1, &fbo);
ctx.glBeginTransformFeedback(GL_POINTS);
ctx.expectError(GL_NO_ERROR);
- ctx.glDrawRangeElements(GL_POINTS, 0, 1, 1, GL_UNSIGNED_BYTE, vertices);
+ ctx.glDrawRangeElements(GL_POINTS, 0, 1, 1, GL_UNSIGNED_BYTE, indices);
ctx.expectError(GL_INVALID_OPERATION);
ctx.glPauseTransformFeedback();
- ctx.glDrawRangeElements(GL_POINTS, 0, 1, 1, GL_UNSIGNED_BYTE, vertices);
+ ctx.glDrawRangeElements(GL_POINTS, 0, 1, 1, GL_UNSIGNED_BYTE, indices);
ctx.expectError(GL_NO_ERROR);
ctx.glEndTransformFeedback();
{
ctx.glUseProgram(0);
GLuint fbo = 0;
- GLfloat vertices[1];
+ GLbyte indices[1] = {0};
ctx.beginSection("GL_INVALID_ENUM is generated if mode is not an accepted value.");
- ctx.glDrawRangeElements(-1, 0, 1, 1, GL_UNSIGNED_BYTE, vertices);
+ ctx.glDrawRangeElements(-1, 0, 1, 1, GL_UNSIGNED_BYTE, indices);
ctx.expectError(GL_INVALID_ENUM);
ctx.endSection();
ctx.beginSection("GL_INVALID_ENUM is generated if type is not one of the accepted values.");
- ctx.glDrawRangeElements(GL_POINTS, 0, 1, 1, -1, vertices);
+ ctx.glDrawRangeElements(GL_POINTS, 0, 1, 1, -1, indices);
ctx.expectError(GL_INVALID_ENUM);
- ctx.glDrawRangeElements(GL_POINTS, 0, 1, 1, GL_FLOAT, vertices);
+ ctx.glDrawRangeElements(GL_POINTS, 0, 1, 1, GL_FLOAT, indices);
ctx.expectError(GL_INVALID_ENUM);
ctx.endSection();
ctx.beginSection("GL_INVALID_VALUE is generated if count is negative.");
- ctx.glDrawRangeElements(GL_POINTS, 0, 1, -1, GL_UNSIGNED_BYTE, vertices);
+ ctx.glDrawRangeElements(GL_POINTS, 0, 1, -1, GL_UNSIGNED_BYTE, indices);
ctx.expectError(GL_INVALID_VALUE);
ctx.endSection();
ctx.beginSection("GL_INVALID_VALUE is generated if end < start.");
- ctx.glDrawRangeElements(GL_POINTS, 1, 0, 1, GL_UNSIGNED_BYTE, vertices);
+ ctx.glDrawRangeElements(GL_POINTS, 1, 0, 1, GL_UNSIGNED_BYTE, indices);
ctx.expectError(GL_INVALID_VALUE);
ctx.endSection();
ctx.glGenFramebuffers(1, &fbo);
ctx.glBindFramebuffer(GL_FRAMEBUFFER, fbo);
ctx.glCheckFramebufferStatus(GL_FRAMEBUFFER);
- ctx.glDrawRangeElements(GL_POINTS, 0, 1, 1, GL_UNSIGNED_BYTE, vertices);
+ ctx.glDrawRangeElements(GL_POINTS, 0, 1, 1, GL_UNSIGNED_BYTE, indices);
ctx.expectError(GL_INVALID_FRAMEBUFFER_OPERATION);
ctx.glBindFramebuffer(GL_FRAMEBUFFER, 0);
ctx.glDeleteFramebuffers(1, &fbo);
GLuint fbo = 0;
GLuint buf = 0;
GLuint tfID = 0;
- GLfloat vertices[1];
+ GLbyte indices[1] = {0};
map<string, string> args;
args["GLSL_VERSION_STRING"] = isES32 ? getGLSLVersionDeclaration(glu::GLSL_VERSION_320_ES) : getGLSLVersionDeclaration(glu::GLSL_VERSION_310_ES);
glu::ShaderProgram program (ctx.getRenderContext(), glu::makeVtxFragSources(tcu::StringTemplate(vertexShaderSource).specialize(args), tcu::StringTemplate(fragmentShaderSource).specialize(args)));
ctx.expectError(GL_NO_ERROR);
ctx.beginSection("GL_INVALID_ENUM is generated if mode is not an accepted value.");
- ctx.glDrawRangeElements(-1, 0, 1, 1, GL_UNSIGNED_BYTE, vertices);
+ ctx.glDrawRangeElements(-1, 0, 1, 1, GL_UNSIGNED_BYTE, indices);
ctx.expectError(GL_INVALID_ENUM);
ctx.endSection();
ctx.beginSection("GL_INVALID_ENUM is generated if type is not one of the accepted values.");
- ctx.glDrawRangeElements(GL_TRIANGLES, 0, 1, 1, -1, vertices);
+ ctx.glDrawRangeElements(GL_TRIANGLES, 0, 1, 1, -1, indices);
ctx.expectError(GL_INVALID_ENUM);
- ctx.glDrawRangeElements(GL_TRIANGLES, 0, 1, 1, GL_FLOAT, vertices);
+ ctx.glDrawRangeElements(GL_TRIANGLES, 0, 1, 1, GL_FLOAT, indices);
ctx.expectError(GL_INVALID_ENUM);
ctx.endSection();
ctx.beginSection("GL_INVALID_VALUE is generated if count is negative.");
- ctx.glDrawRangeElements(GL_TRIANGLES, 0, 1, -1, GL_UNSIGNED_BYTE, vertices);
+ ctx.glDrawRangeElements(GL_TRIANGLES, 0, 1, -1, GL_UNSIGNED_BYTE, indices);
ctx.expectError(GL_INVALID_VALUE);
ctx.endSection();
ctx.beginSection("GL_INVALID_VALUE is generated if end < start.");
- ctx.glDrawRangeElements(GL_TRIANGLES, 1, 0, 1, GL_UNSIGNED_BYTE, vertices);
+ ctx.glDrawRangeElements(GL_TRIANGLES, 1, 0, 1, GL_UNSIGNED_BYTE, indices);
ctx.expectError(GL_INVALID_VALUE);
ctx.endSection();
ctx.glGenFramebuffers(1, &fbo);
ctx.glBindFramebuffer(GL_FRAMEBUFFER, fbo);
ctx.glCheckFramebufferStatus(GL_FRAMEBUFFER);
- ctx.glDrawRangeElements(GL_TRIANGLES, 0, 1, 1, GL_UNSIGNED_BYTE, vertices);
+ ctx.glDrawRangeElements(GL_TRIANGLES, 0, 1, 1, GL_UNSIGNED_BYTE, indices);
ctx.expectError(GL_INVALID_FRAMEBUFFER_OPERATION);
ctx.glBindFramebuffer(GL_FRAMEBUFFER, 0);
ctx.glDeleteFramebuffers(1, &fbo);
ctx.glBeginTransformFeedback(GL_TRIANGLES);
ctx.expectError(GL_NO_ERROR);
- ctx.glDrawRangeElements(GL_TRIANGLES, 0, 1, 1, GL_UNSIGNED_BYTE, vertices);
+ ctx.glDrawRangeElements(GL_TRIANGLES, 0, 1, 1, GL_UNSIGNED_BYTE, indices);
ctx.expectError(GL_INVALID_OPERATION);
ctx.glPauseTransformFeedback();
- ctx.glDrawRangeElements(GL_TRIANGLES, 0, 1, 1, GL_UNSIGNED_BYTE, vertices);
+ ctx.glDrawRangeElements(GL_TRIANGLES, 0, 1, 1, GL_UNSIGNED_BYTE, indices);
ctx.expectError(GL_NO_ERROR);
ctx.glEndTransformFeedback();
TCU_CHECK_AND_THROW(NotSupportedError, contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2)), "This test requires a 3.2 context or higher context version.");
GLuint fbo = 0;
- GLfloat vertices[1];
+ GLbyte indices[1] = {0};
map<string, string> args;
args["GLSL_VERSION_STRING"] = getGLSLVersionDeclaration(glu::GLSL_VERSION_320_ES);
glu::ShaderProgram program (ctx.getRenderContext(), glu::makeVtxFragSources(tcu::StringTemplate(vertexShaderSource).specialize(args), tcu::StringTemplate(fragmentShaderSource).specialize(args)));
ctx.expectError(GL_NO_ERROR);
ctx.beginSection("GL_INVALID_ENUM is generated if mode is not an accepted value.");
- ctx.glDrawRangeElementsBaseVertex(-1, 0, 1, 1, GL_UNSIGNED_BYTE, vertices, 1);
+ ctx.glDrawRangeElementsBaseVertex(-1, 0, 1, 1, GL_UNSIGNED_BYTE, indices, 1);
ctx.expectError(GL_INVALID_ENUM);
ctx.endSection();
ctx.beginSection("GL_INVALID_ENUM is generated if type is not one of the accepted values.");
- ctx.glDrawRangeElementsBaseVertex(GL_POINTS, 0, 1, 1, -1, vertices, 1);
+ ctx.glDrawRangeElementsBaseVertex(GL_POINTS, 0, 1, 1, -1, indices, 1);
ctx.expectError(GL_INVALID_ENUM);
- ctx.glDrawRangeElementsBaseVertex(GL_POINTS, 0, 1, 1, GL_FLOAT, vertices, 1);
+ ctx.glDrawRangeElementsBaseVertex(GL_POINTS, 0, 1, 1, GL_FLOAT, indices, 1);
ctx.expectError(GL_INVALID_ENUM);
ctx.endSection();
ctx.beginSection("GL_INVALID_VALUE is generated if count is negative.");
- ctx.glDrawRangeElementsBaseVertex(GL_POINTS, 0, 1, -1, GL_UNSIGNED_BYTE, vertices, 1);
+ ctx.glDrawRangeElementsBaseVertex(GL_POINTS, 0, 1, -1, GL_UNSIGNED_BYTE, indices, 1);
ctx.expectError(GL_INVALID_VALUE);
ctx.endSection();
ctx.beginSection("GL_INVALID_VALUE is generated if end < start.");
- ctx.glDrawRangeElementsBaseVertex(GL_POINTS, 1, 0, 1, GL_UNSIGNED_BYTE, vertices, 1);
+ ctx.glDrawRangeElementsBaseVertex(GL_POINTS, 1, 0, 1, GL_UNSIGNED_BYTE, indices, 1);
ctx.expectError(GL_INVALID_VALUE);
ctx.endSection();
ctx.glGenFramebuffers(1, &fbo);
ctx.glBindFramebuffer(GL_FRAMEBUFFER, fbo);
ctx.glCheckFramebufferStatus(GL_FRAMEBUFFER);
- ctx.glDrawRangeElementsBaseVertex(GL_POINTS, 0, 1, 1, GL_UNSIGNED_BYTE, vertices, 1);
+ ctx.glDrawRangeElementsBaseVertex(GL_POINTS, 0, 1, 1, GL_UNSIGNED_BYTE, indices, 1);
ctx.expectError(GL_INVALID_FRAMEBUFFER_OPERATION);
ctx.glBindFramebuffer(GL_FRAMEBUFFER, 0);
ctx.glDeleteFramebuffers(1, &fbo);
{
TCU_CHECK_AND_THROW(NotSupportedError, contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2)), "This test requires a 3.2 context or higher context version.");
- GLfloat vertices[1];
+ GLuint indices[1] = {0};
map<string, string> args;
args["GLSL_VERSION_STRING"] = getGLSLVersionDeclaration(glu::GLSL_VERSION_320_ES);
glu::ShaderProgram geometryProgram(ctx.getRenderContext(), glu::ProgramSources() << glu::ProgramSeparable(true) << glu::VertexSource(tcu::StringTemplate(vertexShaderSource).specialize(args)) << glu::GeometrySource(geometryShaderSource));
ctx.beginSection("GL_INVALID_OPERATION is generated if a geometry shader is active and mode is incompatible with the input primitive type of the geometry shader in the currently installed program object.");
ctx.glUseProgram(geometryProgram.getProgram());
- ctx.glDrawRangeElementsBaseVertex(GL_TRIANGLES, 0, 1, 1, GL_UNSIGNED_INT, vertices, 1);
+ ctx.glDrawRangeElementsBaseVertex(GL_TRIANGLES, 0, 1, 1, GL_UNSIGNED_INT, indices, 1);
ctx.expectError(GL_INVALID_OPERATION);
ctx.endSection();