From: Ian Romanick Date: Fri, 13 May 2016 00:44:46 +0000 (-0700) Subject: i965: Silence unused parameter warnings X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f687b8e1785df0825443f07778e5d0ddf6f9be09;p=mesa.git i965: Silence unused parameter warnings The only place that actually used the type parameter was the GS visitor, and it was always passed glsl_type::int. Just remove the parameter. brw_vec4_vs_visitor.cpp:38:61: warning: unused parameter ‘type’ [-Wunused-parameter] const glsl_type *type) ^ Signed-off-by: Ian Romanick Reviewed-by: Timothy Arceri --- diff --git a/src/mesa/drivers/dri/i965/brw_vec4.h b/src/mesa/drivers/dri/i965/brw_vec4.h index 4708b6620e3..bc54eaff16d 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4.h +++ b/src/mesa/drivers/dri/i965/brw_vec4.h @@ -337,8 +337,7 @@ public: unsigned num_components = 4); src_reg get_indirect_offset(nir_intrinsic_instr *instr); - virtual dst_reg *make_reg_for_system_value(int location, - const glsl_type *type) = 0; + virtual dst_reg *make_reg_for_system_value(int location) = 0; dst_reg *nir_locals; dst_reg *nir_ssa_values; diff --git a/src/mesa/drivers/dri/i965/brw_vec4_gs_nir.cpp b/src/mesa/drivers/dri/i965/brw_vec4_gs_nir.cpp index e915aee3bd0..9ebfb27ed2a 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_gs_nir.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_gs_nir.cpp @@ -43,8 +43,7 @@ vec4_gs_visitor::nir_setup_system_value_intrinsic(nir_intrinsic_instr *instr) case nir_intrinsic_load_invocation_id: reg = &this->nir_system_values[SYSTEM_VALUE_INVOCATION_ID]; if (reg->file == BAD_FILE) - *reg = *this->make_reg_for_system_value(SYSTEM_VALUE_INVOCATION_ID, - glsl_type::int_type); + *reg = *this->make_reg_for_system_value(SYSTEM_VALUE_INVOCATION_ID); break; default: diff --git a/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp index f591addfc04..76a80a54f44 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp @@ -52,10 +52,9 @@ vec4_gs_visitor::vec4_gs_visitor(const struct brw_compiler *compiler, dst_reg * -vec4_gs_visitor::make_reg_for_system_value(int location, - const glsl_type *type) +vec4_gs_visitor::make_reg_for_system_value(int location) { - dst_reg *reg = new(mem_ctx) dst_reg(this, type); + dst_reg *reg = new(mem_ctx) dst_reg(this, glsl_type::int_type); switch (location) { case SYSTEM_VALUE_INVOCATION_ID: diff --git a/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.h b/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.h index 6ca83a9d9a3..380d6f73aa0 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.h +++ b/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.h @@ -51,8 +51,7 @@ public: virtual void nir_setup_system_value_intrinsic(nir_intrinsic_instr *instr); protected: - virtual dst_reg *make_reg_for_system_value(int location, - const glsl_type *type); + virtual dst_reg *make_reg_for_system_value(int location); virtual void setup_payload(); virtual void emit_prolog(); virtual void emit_thread_end(); diff --git a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp index c7dc23b365b..29f52faefee 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp @@ -60,36 +60,31 @@ vec4_visitor::nir_setup_system_value_intrinsic(nir_intrinsic_instr *instr) case nir_intrinsic_load_vertex_id_zero_base: reg = &nir_system_values[SYSTEM_VALUE_VERTEX_ID_ZERO_BASE]; if (reg->file == BAD_FILE) - *reg = *make_reg_for_system_value(SYSTEM_VALUE_VERTEX_ID_ZERO_BASE, - glsl_type::int_type); + *reg = *make_reg_for_system_value(SYSTEM_VALUE_VERTEX_ID_ZERO_BASE); break; case nir_intrinsic_load_base_vertex: reg = &nir_system_values[SYSTEM_VALUE_BASE_VERTEX]; if (reg->file == BAD_FILE) - *reg = *make_reg_for_system_value(SYSTEM_VALUE_BASE_VERTEX, - glsl_type::int_type); + *reg = *make_reg_for_system_value(SYSTEM_VALUE_BASE_VERTEX); break; case nir_intrinsic_load_instance_id: reg = &nir_system_values[SYSTEM_VALUE_INSTANCE_ID]; if (reg->file == BAD_FILE) - *reg = *make_reg_for_system_value(SYSTEM_VALUE_INSTANCE_ID, - glsl_type::int_type); + *reg = *make_reg_for_system_value(SYSTEM_VALUE_INSTANCE_ID); break; case nir_intrinsic_load_base_instance: reg = &nir_system_values[SYSTEM_VALUE_BASE_INSTANCE]; if (reg->file == BAD_FILE) - *reg = *make_reg_for_system_value(SYSTEM_VALUE_BASE_INSTANCE, - glsl_type::int_type); + *reg = *make_reg_for_system_value(SYSTEM_VALUE_BASE_INSTANCE); break; case nir_intrinsic_load_draw_id: reg = &nir_system_values[SYSTEM_VALUE_DRAW_ID]; if (reg->file == BAD_FILE) - *reg = *make_reg_for_system_value(SYSTEM_VALUE_DRAW_ID, - glsl_type::int_type); + *reg = *make_reg_for_system_value(SYSTEM_VALUE_DRAW_ID); break; default: diff --git a/src/mesa/drivers/dri/i965/brw_vec4_tcs.cpp b/src/mesa/drivers/dri/i965/brw_vec4_tcs.cpp index 2e1a9a671af..f61c612b3a7 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_tcs.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_tcs.cpp @@ -54,7 +54,7 @@ vec4_tcs_visitor::nir_setup_system_value_intrinsic(nir_intrinsic_instr *instr) } dst_reg * -vec4_tcs_visitor::make_reg_for_system_value(int location, const glsl_type *type) +vec4_tcs_visitor::make_reg_for_system_value(int location) { return NULL; } diff --git a/src/mesa/drivers/dri/i965/brw_vec4_tcs.h b/src/mesa/drivers/dri/i965/brw_vec4_tcs.h index a6de2b17e97..329cd7dfc25 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_tcs.h +++ b/src/mesa/drivers/dri/i965/brw_vec4_tcs.h @@ -49,8 +49,7 @@ public: const struct brw_vue_map *input_vue_map); protected: - virtual dst_reg *make_reg_for_system_value(int location, - const glsl_type *type); + virtual dst_reg *make_reg_for_system_value(int location); virtual void nir_setup_system_value_intrinsic(nir_intrinsic_instr *instr); virtual void setup_payload(); virtual void emit_prolog(); diff --git a/src/mesa/drivers/dri/i965/brw_vec4_tes.cpp b/src/mesa/drivers/dri/i965/brw_vec4_tes.cpp index 7ba494fbffc..6639c86a8a6 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_tes.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_tes.cpp @@ -46,7 +46,7 @@ vec4_tes_visitor::vec4_tes_visitor(const struct brw_compiler *compiler, dst_reg * -vec4_tes_visitor::make_reg_for_system_value(int location, const glsl_type *type) +vec4_tes_visitor::make_reg_for_system_value(int location) { return NULL; } diff --git a/src/mesa/drivers/dri/i965/brw_vec4_tes.h b/src/mesa/drivers/dri/i965/brw_vec4_tes.h index 4b697aa592f..31a28f35974 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_tes.h +++ b/src/mesa/drivers/dri/i965/brw_vec4_tes.h @@ -47,8 +47,7 @@ public: int shader_time_index); protected: - virtual dst_reg *make_reg_for_system_value(int location, - const glsl_type *type); + virtual dst_reg *make_reg_for_system_value(int location); virtual void nir_setup_system_value_intrinsic(nir_intrinsic_instr *instr); virtual void nir_emit_intrinsic(nir_intrinsic_instr *instr); diff --git a/src/mesa/drivers/dri/i965/brw_vec4_vs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_vs_visitor.cpp index 39f0c0b932d..058ee3a7dad 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_vs_visitor.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_vs_visitor.cpp @@ -34,8 +34,7 @@ vec4_vs_visitor::emit_prolog() dst_reg * -vec4_vs_visitor::make_reg_for_system_value(int location, - const glsl_type *type) +vec4_vs_visitor::make_reg_for_system_value(int location) { /* VertexID is stored by the VF as the last vertex element, but * we don't represent it with a flag in inputs_read, so we call diff --git a/src/mesa/drivers/dri/i965/brw_vs.h b/src/mesa/drivers/dri/i965/brw_vs.h index 31ab1ce5766..7ccc1884b2e 100644 --- a/src/mesa/drivers/dri/i965/brw_vs.h +++ b/src/mesa/drivers/dri/i965/brw_vs.h @@ -84,8 +84,7 @@ public: bool use_legacy_snorm_formula); protected: - virtual dst_reg *make_reg_for_system_value(int location, - const glsl_type *type); + virtual dst_reg *make_reg_for_system_value(int location); virtual void setup_payload(); virtual void emit_prolog(); virtual void emit_thread_end(); diff --git a/src/mesa/drivers/dri/i965/test_vec4_cmod_propagation.cpp b/src/mesa/drivers/dri/i965/test_vec4_cmod_propagation.cpp index 8d4a447a88b..0b74165bcf7 100644 --- a/src/mesa/drivers/dri/i965/test_vec4_cmod_propagation.cpp +++ b/src/mesa/drivers/dri/i965/test_vec4_cmod_propagation.cpp @@ -58,8 +58,7 @@ public: protected: /* Dummy implementation for pure virtual methods */ - virtual dst_reg *make_reg_for_system_value(int location, - const glsl_type *type) + virtual dst_reg *make_reg_for_system_value(int location) { unreachable("Not reached"); } diff --git a/src/mesa/drivers/dri/i965/test_vec4_copy_propagation.cpp b/src/mesa/drivers/dri/i965/test_vec4_copy_propagation.cpp index 311f07a7cca..0638246d24f 100644 --- a/src/mesa/drivers/dri/i965/test_vec4_copy_propagation.cpp +++ b/src/mesa/drivers/dri/i965/test_vec4_copy_propagation.cpp @@ -56,8 +56,7 @@ public: } protected: - virtual dst_reg *make_reg_for_system_value(int location, - const glsl_type *type) + virtual dst_reg *make_reg_for_system_value(int location) { unreachable("Not reached"); } diff --git a/src/mesa/drivers/dri/i965/test_vec4_register_coalesce.cpp b/src/mesa/drivers/dri/i965/test_vec4_register_coalesce.cpp index cc4a2de89d5..1873d9ca16e 100644 --- a/src/mesa/drivers/dri/i965/test_vec4_register_coalesce.cpp +++ b/src/mesa/drivers/dri/i965/test_vec4_register_coalesce.cpp @@ -59,8 +59,7 @@ public: } protected: - virtual dst_reg *make_reg_for_system_value(int location, - const glsl_type *type) + virtual dst_reg *make_reg_for_system_value(int location) { unreachable("Not reached"); }