nir: Support vec8/vec16 in nir_lower_bit_size
[mesa.git] / src / compiler / nir / nir_lower_clamp_color_outputs.c
index b76a4d51aacad927fa2c141018669037b5586053..07ed1d7925b2bf279d6fb8a696dc08bc77afae18 100644 (file)
@@ -36,6 +36,7 @@ is_color_output(lower_state *state, nir_variable *out)
    switch (state->shader->info.stage) {
    case MESA_SHADER_VERTEX:
    case MESA_SHADER_GEOMETRY:
+   case MESA_SHADER_TESS_EVAL:
       switch (out->data.location) {
       case VARYING_SLOT_COL0:
       case VARYING_SLOT_COL1:
@@ -47,13 +48,8 @@ is_color_output(lower_state *state, nir_variable *out)
       }
       break;
    case MESA_SHADER_FRAGMENT:
-      switch (out->data.location) {
-      case FRAG_RESULT_COLOR:
-         return true;
-      default:
-         return false;
-      }
-      break;
+      return (out->data.location == FRAG_RESULT_COLOR ||
+              out->data.location >= FRAG_RESULT_DATA0);
    default:
       return false;
    }