[Mesa-dev] [PATCH 2/5] glxinfo: Convert print_shader_limits to use a switch-statement
Ian Romanick
idr at freedesktop.org
Sun Jan 26 20:50:26 PST 2014
From: Ian Romanick <ian.d.romanick at intel.com>
More shader targets are coming.
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
src/xdemos/glxinfo.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/xdemos/glxinfo.c b/src/xdemos/glxinfo.c
index a2c7b40..2333daa 100644
--- a/src/xdemos/glxinfo.c
+++ b/src/xdemos/glxinfo.c
@@ -536,7 +536,8 @@ print_shader_limits(GLenum target)
GLint max[1];
int i;
- if (target == GL_VERTEX_SHADER_ARB) {
+ switch (target) {
+ case GL_VERTEX_SHADER:
printf(" GL_VERTEX_SHADER_ARB:\n");
for (i = 0; vertex_limits[i].token; i++) {
glGetIntegerv(vertex_limits[i].token, max);
@@ -544,8 +545,9 @@ print_shader_limits(GLenum target)
printf(" %s = %d\n", vertex_limits[i].name, max[0]);
}
}
- }
- if (target == GL_FRAGMENT_SHADER_ARB) {
+ break;
+
+ case GL_FRAGMENT_SHADER:
printf(" GL_FRAGMENT_SHADER_ARB:\n");
for (i = 0; fragment_limits[i].token; i++) {
glGetIntegerv(fragment_limits[i].token, max);
@@ -553,6 +555,7 @@ print_shader_limits(GLenum target)
printf(" %s = %d\n", fragment_limits[i].name, max[0]);
}
}
+ break;
}
}
--
1.8.1.4
More information about the mesa-dev
mailing list