From 75f6ed617fcdf0b28381c59e4d4a3030678d7faa Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Thu, 19 Feb 2015 13:36:07 -0800 Subject: [PATCH] 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 --- src/glsl/glsl_parser_extras.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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."); } /** -- 2.30.2