Module: Mesa Branch: master Commit: d9b55244fd56b5971b40fdadb262a25840197096 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d9b55244fd56b5971b40fdadb262a25840197096
Author: Paul Berry <stereotype...@gmail.com> Date: Mon Dec 16 12:58:55 2013 -0800 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 <bri...@vmware.com> --- src/glsl/standalone_scaffolding.h | 2 +- src/mesa/main/shaderobj.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/glsl/standalone_scaffolding.h b/src/glsl/standalone_scaffolding.h index 7afb1c3..9f4818a 100644 --- a/src/glsl/standalone_scaffolding.h +++ b/src/glsl/standalone_scaffolding.h @@ -60,7 +60,7 @@ _mesa_shader_type_to_index(GLenum v) return MESA_SHADER_GEOMETRY; default: assert(!"bad value in _mesa_shader_type_to_index()"); - return MESA_SHADER_TYPES; + return MESA_SHADER_VERTEX; } } diff --git a/src/mesa/main/shaderobj.h b/src/mesa/main/shaderobj.h index de1c9fc..aff178f 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; } } _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit