i965: Silence unused parameter warnings
authorIan Romanick <ian.d.romanick@intel.com>
Fri, 13 May 2016 00:44:46 +0000 (17:44 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Wed, 18 May 2016 17:53:34 +0000 (10:53 -0700)
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 <ian.d.romanick@intel.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
14 files changed:
src/mesa/drivers/dri/i965/brw_vec4.h
src/mesa/drivers/dri/i965/brw_vec4_gs_nir.cpp
src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp
src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.h
src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
src/mesa/drivers/dri/i965/brw_vec4_tcs.cpp
src/mesa/drivers/dri/i965/brw_vec4_tcs.h
src/mesa/drivers/dri/i965/brw_vec4_tes.cpp
src/mesa/drivers/dri/i965/brw_vec4_tes.h
src/mesa/drivers/dri/i965/brw_vec4_vs_visitor.cpp
src/mesa/drivers/dri/i965/brw_vs.h
src/mesa/drivers/dri/i965/test_vec4_cmod_propagation.cpp
src/mesa/drivers/dri/i965/test_vec4_copy_propagation.cpp
src/mesa/drivers/dri/i965/test_vec4_register_coalesce.cpp

index 4708b6620e310677f2612147763acbf1f7cfa8b0..bc54eaff16d81d253c10af3a6721cd67a5443cff 100644 (file)
@@ -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;
index e915aee3bd0630e8d7e172d57e9f7006d3863537..9ebfb27ed2ab1d9aff3b7e78ff3003ae4fa20284 100644 (file)
@@ -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:
index f591addfc04a181f838303c0e6e826e47fc88d7a..76a80a54f44113c9067c5ae3cadb8e693af6c60e 100644 (file)
@@ -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:
index 6ca83a9d9a369d3f76b7fbf6ba50031da139f2ef..380d6f73aa0fe072ab4627ff5745b59340f4309d 100644 (file)
@@ -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();
index c7dc23b365bb0c23891ae2d48e4995f92fc31c43..29f52faefee4d57a9d97af04f9166abf0ba740c4 100644 (file)
@@ -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:
index 2e1a9a671af8ca43f6979482d37cdedb09ac358d..f61c612b3a73b0b11b20850bab092d88bc2423b3 100644 (file)
@@ -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;
 }
index a6de2b17e97cec952892dc81b865196d8087ecea..329cd7dfc2527a136b91ffbec0bf37cadde323fe 100644 (file)
@@ -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();
index 7ba494fbffc47e91a89eb1c578fca6f1e65aa338..6639c86a8a64058b78b4f40f7332178b31c6fa4e 100644 (file)
@@ -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;
 }
index 4b697aa592fd62a27d4109be4a3747d44f205afb..31a28f359742bbeed004b9bcb3f675960f947ab9 100644 (file)
@@ -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);
 
index 39f0c0b932d3d73e4b6140ccc54fe520af05a72a..058ee3a7dadf63e737ec9b1e0732671c16e505e3 100644 (file)
@@ -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
index 31ab1ce5766ccdd5edac399387a83f200bddc564..7ccc1884b2ed9e0d2ed60b6969865525121c911f 100644 (file)
@@ -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();
index 8d4a447a88bb957615cdbd57d0f34e96adeb34dc..0b74165bcf702995895b6644e9e2b570e60255fc 100644 (file)
@@ -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");
    }
index 311f07a7cca468d392cba4f75053f6434ae5a615..0638246d24faabe7c4ff5164ddd57f21b4b400fa 100644 (file)
@@ -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");
    }
index cc4a2de89d5bcd8dd6555860679f16701221f35c..1873d9ca16e158ebace09aa7495f8dbd24ca75e8 100644 (file)
@@ -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");
    }