diff options
author | Brian Paul <brianp@vmware.com> | 2017-07-18 14:21:44 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2017-07-24 08:45:31 -0600 |
commit | 13fb3e143172ec680aebf1eea7803ca0aa1c2898 (patch) | |
tree | 87c18370ad6fb9b4f7f18406dab629054ad0681e /tests | |
parent | 1d5023fe19bf837b4930a3d0e8a8f82cce2a72ad (diff) |
arb_provoking_vertex: test OpenGL profile too
The GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION query is legal with
compat profile or GL 3.2.
Ideally, I guess we should have several variants of this test which
exercise different GL versions and profiles. I hand-edited the test and
ran it with those variations. Both NVIDIA and Mesa (with recent patch)
all pass.
Signed-off-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/spec/arb_provoking_vertex/quads-follow-provoking-vertex.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/tests/spec/arb_provoking_vertex/quads-follow-provoking-vertex.c b/tests/spec/arb_provoking_vertex/quads-follow-provoking-vertex.c index 91a18cea2..57d2b11b2 100644 --- a/tests/spec/arb_provoking_vertex/quads-follow-provoking-vertex.c +++ b/tests/spec/arb_provoking_vertex/quads-follow-provoking-vertex.c @@ -45,15 +45,22 @@ piglit_init(int argc, char **argv) { bool pass = true; GLboolean followsProvoking = false; - GLint major, minor; + GLint major, minor, profile; GLenum expected_error; glGetIntegerv(GL_MAJOR_VERSION, &major); glGetIntegerv(GL_MINOR_VERSION, &minor); printf("GL version: %d.%d\n", major, minor); - expected_error = - (major * 10 + minor > 32) ? GL_INVALID_ENUM : GL_NO_ERROR; + glGetIntegerv(GL_CONTEXT_PROFILE_MASK, &profile); + printf("GL profile: 0x%x\n", profile); + + if ((profile & GL_CONTEXT_COMPATIBILITY_PROFILE_BIT) || + major * 10 + minor == 32) { + expected_error = GL_NO_ERROR; + } else { + expected_error = GL_INVALID_ENUM; + } glGetBooleanv(GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION, &followsProvoking); |