st/mesa: use pipe_shader_type_from_mesa
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 17 May 2017 16:09:14 +0000 (18:09 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 5 Jul 2017 10:27:12 +0000 (12:27 +0200)
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/mesa/state_tracker/st_glsl_to_tgsi.cpp

index 7852941acd22988cbdf94809d282c985785ab7c1..7c64a3897e966213e6ea93f718d9070d72f1106a 100644 (file)
@@ -6747,27 +6747,8 @@ st_translate_program(
 
       for (i = program->shader->Stage+1; i <= MESA_SHADER_FRAGMENT; i++) {
          if (program->shader_program->_LinkedShaders[i]) {
-            unsigned next;
-
-            switch (i) {
-            case MESA_SHADER_TESS_CTRL:
-               next = PIPE_SHADER_TESS_CTRL;
-               break;
-            case MESA_SHADER_TESS_EVAL:
-               next = PIPE_SHADER_TESS_EVAL;
-               break;
-            case MESA_SHADER_GEOMETRY:
-               next = PIPE_SHADER_GEOMETRY;
-               break;
-            case MESA_SHADER_FRAGMENT:
-               next = PIPE_SHADER_FRAGMENT;
-               break;
-            default:
-               assert(0);
-               continue;
-            }
-
-            ureg_set_next_shader_processor(ureg, next);
+            ureg_set_next_shader_processor(
+                  ureg, pipe_shader_type_from_mesa((gl_shader_stage)i));
             break;
          }
       }