glsl: Add compute to _mesa_shader_stage_to_string(); use unreachable.
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 19 Feb 2015 21:36:07 +0000 (13:36 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 19 Feb 2015 23:15:46 +0000 (15:15 -0800)
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 <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/glsl/glsl_parser_extras.cpp

index 2e44dc1567adc1ccd8c5fc5c085c608a145fae61..9f79313800912d844a21b449f4421ef363391a19 100644 (file)
@@ -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.");
 }
 
 /**