From: Kenneth Graunke Date: Thu, 19 Feb 2015 21:36:07 +0000 (-0800) Subject: glsl: Add compute to _mesa_shader_stage_to_string(); use unreachable. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=75f6ed617fcdf0b28381c59e4d4a3030678d7faa;p=mesa.git glsl: Add compute to _mesa_shader_stage_to_string(); use unreachable. This is basically Ian's review feedback for my patch that added _mesa_shader_stage_to_abbrev() - it just makes both consistent again. Signed-off-by: Kenneth Graunke Reviewed-by: Ian Romanick --- diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp index 2e44dc1567a..9f793138009 100644 --- a/src/glsl/glsl_parser_extras.cpp +++ b/src/glsl/glsl_parser_extras.cpp @@ -370,10 +370,10 @@ _mesa_shader_stage_to_string(unsigned stage) case MESA_SHADER_VERTEX: return "vertex"; case MESA_SHADER_FRAGMENT: return "fragment"; case MESA_SHADER_GEOMETRY: return "geometry"; + case MESA_SHADER_COMPUTE: return "compute"; } - assert(!"Should not get here."); - return "unknown"; + unreachable("Unknown shader stage."); } /**