nir: Support vec8/vec16 in nir_lower_bit_size
[mesa.git] / src / compiler / nir / nir_lower_clamp_color_outputs.c
index ec3984898239f7f312ca5f7a4574ff9c47b80df3..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;
    }
@@ -67,9 +63,6 @@ lower_intrinsic(lower_state *state, nir_intrinsic_instr *intr)
    nir_ssa_def *s;
 
    switch (intr->intrinsic) {
-   case nir_intrinsic_store_var:
-      out = intr->variables[0]->var;
-      break;
    case nir_intrinsic_store_deref:
       out = nir_deref_instr_get_variable(nir_src_as_deref(intr->src[0]));
       break;