i965: Drop unnecessary switch statement in nir_setup_outputs()
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 13 Oct 2016 05:30:30 +0000 (22:30 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 24 Oct 2016 21:33:38 +0000 (14:33 -0700)
TCS and FS are skipped above.  CS has no output variables.
All remaining cases take the same path.

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
src/mesa/drivers/dri/i965/brw_fs_nir.cpp

index 4e68ffbf05bf8fce06a3a1070a205ba106f5e13f..9cad1a6d29573482aeb3aeefab84daa6533e614e 100644 (file)
@@ -87,18 +87,9 @@ fs_visitor::nir_setup_outputs()
    nir_outputs = bld.vgrf(BRW_REGISTER_TYPE_F, nir->num_outputs);
 
    nir_foreach_variable(var, &nir->outputs) {
-      switch (stage) {
-      case MESA_SHADER_VERTEX:
-      case MESA_SHADER_TESS_EVAL:
-      case MESA_SHADER_GEOMETRY: {
-         fs_reg reg = offset(nir_outputs, bld, var->data.driver_location);
-         unsigned location = var->data.location;
-         nir_setup_single_output_varying(&reg, var->type, &location);
-         break;
-      }
-      default:
-         unreachable("unhandled shader stage");
-      }
+      fs_reg reg = offset(nir_outputs, bld, var->data.driver_location);
+      unsigned location = var->data.location;
+      nir_setup_single_output_varying(&reg, var->type, &location);
    }
 }