diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2010-03-05 15:08:32 -0800 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2010-03-05 15:08:32 -0800 |
commit | 67a663584fe3f3075c52e107cc42ffdbbbc1a613 (patch) | |
tree | 667492397ad743417c8a3fa31f51f8838255388f | |
parent | 164385e2b2b31293554de21c501d07f9581096f6 (diff) |
object_purgeable: Move state checks into state setting tests
Always check that an object is purgeable (or unpurgeable) in the
routine that is used to set that state.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
-rw-r--r-- | tests/general/object_purgeable.c | 36 |
1 files changed, 12 insertions, 24 deletions
diff --git a/tests/general/object_purgeable.c b/tests/general/object_purgeable.c index d37931ba6..a9384f611 100644 --- a/tests/general/object_purgeable.c +++ b/tests/general/object_purgeable.c @@ -95,6 +95,12 @@ test_ObjectpurgeableAPPLE(GLenum objectType, GLuint name, GLenum option) break; } + if (!test_GetObjectParameterivAPPLE(objectType, name, GL_TRUE)) { + fprintf(stderr, + "Object marked purgeable is not set to purgeable\n"); + pass = GL_FALSE; + } + return pass; } @@ -131,6 +137,12 @@ test_ObjectunpurgeableAPPLE(GLenum objectType, GLuint name, GLenum option) break; } + if (!test_GetObjectParameterivAPPLE(objectType, name, GL_FALSE)) { + fprintf(stderr, "Object marked unpurgeable is not set to " + "unpurgeable\n"); + pass = GL_FALSE; + } + return pass; } @@ -172,41 +184,17 @@ GLboolean test_Purgeable(GLuint object, GLenum type) pass = GL_FALSE; } - if (!test_GetObjectParameterivAPPLE(type, object, GL_TRUE)) { - fprintf(stderr, - "Object marked purgeable is not set to purgeable\n"); - pass = GL_FALSE; - } - if (!test_ObjectunpurgeableAPPLE(type, object, GL_RETAINED_APPLE)) { pass = GL_FALSE; } - if (!test_GetObjectParameterivAPPLE(type, object, GL_FALSE)) { - fprintf(stderr, "Object marked unpurgeable is not set to " - "unpurgeable\n"); - pass = GL_FALSE; - } - if (!test_ObjectpurgeableAPPLE(type, object, GL_RELEASED_APPLE)) { pass = GL_FALSE; } - if (!test_GetObjectParameterivAPPLE(type, object, GL_TRUE)) { - fprintf(stderr, - "Object marked purgeable is not set to purgeable\n"); - pass = GL_FALSE; - } - if (!test_ObjectunpurgeableAPPLE(type, object, GL_UNDEFINED_APPLE)) { pass = GL_FALSE; } - if (!test_GetObjectParameterivAPPLE(type, object, GL_FALSE)) { - fprintf(stderr, "Object marked unpurgeable is not set to " - "unpurgeable\n"); - pass = GL_FALSE; - } - return pass; } |