[Piglit] [PATCH 02/18] shader_runner: Allow new drawing modes.
Fabian Bieler
fabianbieler at fastmail.fm
Mon Jun 10 15:26:40 PDT 2013
Add primitives with adjacency and (for extreme future-proofness) patches to
recognized drawing modes.
---
tests/shaders/shader_runner.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c
index 515fde1..e022b90 100644
--- a/tests/shaders/shader_runner.c
+++ b/tests/shaders/shader_runner.c
@@ -1481,8 +1481,13 @@ GLenum
decode_drawing_mode(const char *mode_str)
{
int i;
+#ifdef PIGLIT_USE_OPENGL
+ const GLenum max_prim_type = GL_PATCHES;
+#else
+ const GLenum max_prim_type = GL_POLYGON;
+#endif
- for (i = GL_POINTS; i <= GL_POLYGON; ++i) {
+ for (i = GL_POINTS; i <= max_prim_type; ++i) {
const char *name = piglit_get_prim_name(i);
if (0 == strcmp(mode_str, name))
return i;
--
1.8.1.2
More information about the Piglit
mailing list