diff options
author | Kenneth Graunke <kenneth@whitecape.org> | 2016-10-12 22:30:30 -0700 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2016-10-27 11:04:57 +0100 |
commit | 188a866fd024314545eee8942c348d920c0e2679 (patch) | |
tree | 78fc1264cc9635224dd6ea68fbfaa510887daa35 /src/mesa/drivers | |
parent | a850e69b7e6de1d6926b2944b795826c2cc5c1c1 (diff) | |
download | external_mesa3d-188a866fd024314545eee8942c348d920c0e2679.zip external_mesa3d-188a866fd024314545eee8942c348d920c0e2679.tar.gz external_mesa3d-188a866fd024314545eee8942c348d920c0e2679.tar.bz2 |
i965: Drop unnecessary switch statement in nir_setup_outputs()
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>
(cherry picked from commit 3728ee000aecb19793dec56d45aff9d6cfce3e5b)
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp index 4e68ffb..9cad1a6 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp @@ -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(®, 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(®, var->type, &location); } } |