From d9b55244fd56b5971b40fdadb262a25840197096 Mon Sep 17 00:00:00 2001 From: Paul Berry Date: Mon, 16 Dec 2013 12:58:55 -0800 Subject: glsl: Don't return bad values from _mesa_shader_type_to_index. This will avoid compiler warnings in the patch that follows. There should be no user-visible effect because the change only affects the behaviour when an invalid enum is passed to _mesa_shader_type_to_index(), and that can only happen if there is a bug elsewhere in Mesa. Reviewed-by: Brian Paul --- src/mesa/main/shaderobj.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa/main') diff --git a/src/mesa/main/shaderobj.h b/src/mesa/main/shaderobj.h index de1c9fcaf1e..aff178f2690 100644 --- a/src/mesa/main/shaderobj.h +++ b/src/mesa/main/shaderobj.h @@ -113,7 +113,7 @@ _mesa_shader_type_to_index(GLenum v) return MESA_SHADER_GEOMETRY; default: ASSERT(0 && "bad value in _mesa_shader_type_to_index()"); - return MESA_SHADER_TYPES; + return MESA_SHADER_VERTEX; } } -- cgit v1.2.3