summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2015-07-22 20:58:33 -0600
committerBrian Paul <brianp@vmware.com>2015-07-28 12:24:51 -0600
commita71ce73d23447662bac95ac76b5983cb3bb41e1f (patch)
tree17228db0a2d3b3ea6a94f2edc3df680915599411
parentc8e68125b1d082347de631f3005cb79f7ec740f4 (diff)
arb_sampler_objects: use piglit_check_gl_error()
Instead of a local helper function. Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
-rw-r--r--tests/spec/arb_sampler_objects/sampler-objects.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/tests/spec/arb_sampler_objects/sampler-objects.c b/tests/spec/arb_sampler_objects/sampler-objects.c
index b07f04bc5..ff123441b 100644
--- a/tests/spec/arb_sampler_objects/sampler-objects.c
+++ b/tests/spec/arb_sampler_objects/sampler-objects.c
@@ -43,18 +43,6 @@ PIGLIT_GL_TEST_CONFIG_END
static const char *Prog = "sampler-objects";
-static GLboolean
-check_error(int line)
-{
- GLenum err = glGetError();
- if (err != GL_NO_ERROR) {
- fprintf(stderr, "%s: unexpected error 0x%x at line %d\n", Prog, err, line);
- return GL_TRUE;
- }
- return GL_FALSE;
-}
-
-
/**
* Test the sampler object gen/bind/delete functions.
*/
@@ -64,7 +52,7 @@ test_objects(void)
GLuint samplers[4], i;
glGenSamplers(4, samplers);
- if (check_error(__LINE__))
+ if (!piglit_check_gl_error(GL_NO_ERROR))
return PIGLIT_FAIL;
for (i = 0; i < 4; i++) {
@@ -78,12 +66,12 @@ test_objects(void)
for (i = 0; i < 4; i++) {
glBindSampler(i, samplers[i]);
- if (check_error(__LINE__))
+ if (!piglit_check_gl_error(GL_NO_ERROR))
return PIGLIT_FAIL;
}
glDeleteSamplers(4, samplers);
- if (check_error(__LINE__))
+ if (!piglit_check_gl_error(GL_NO_ERROR))
return PIGLIT_FAIL;
for (i = 0; i < 4; i++) {
@@ -159,7 +147,7 @@ test_samplers(void)
GLuint samplers[NUM_SAMPLERS], i;
glGenSamplers(NUM_SAMPLERS, samplers);
- if (check_error(__LINE__))
+ if (!piglit_check_gl_error(GL_NO_ERROR))
return PIGLIT_FAIL;
/* Create samplers which clamp lod to a particular mipmap level) */