From d628642a3469b94538c6eed1230d3345a74d19de Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Tue, 10 Apr 2018 10:37:42 -0700 Subject: [PATCH] intel/compiler: Silence unused parameter warnings MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit src/intel/compiler/brw_disasm_info.c: In function ‘nir_print_instr’: src/intel/compiler/brw_disasm_info.c:30:61: warning: unused parameter ‘instr’ [-Wunused-parameter] __attribute__((weak)) void nir_print_instr(const nir_instr *instr, FILE *fp) {} ^~~~~ src/intel/compiler/brw_disasm_info.c:30:74: warning: unused parameter ‘fp’ [-Wunused-parameter] __attribute__((weak)) void nir_print_instr(const nir_instr *instr, FILE *fp) {} ^~ src/intel/compiler/brw_disasm.c: In function ‘src_ia1’: src/intel/compiler/brw_disasm.c:850:18: warning: unused parameter ‘_reg_file’ [-Wunused-parameter] unsigned _reg_file, ^~~~~~~~~ src/intel/compiler/brw_fs_surface_builder.cpp: In function ‘void brw::surface_access::emit_byte_scattered_write(const brw::fs_builder&, const fs_reg&, const fs_reg&, const fs_reg&, unsigned int, unsigned int, unsigned int, brw_predicate)’: src/intel/compiler/brw_fs_surface_builder.cpp:193:57: warning: unused parameter ‘size’ [-Wunused-parameter] unsigned dims, unsigned size, ^~~~ v2: Update commit message. brw_fs_generator.cpp warnings were already fixed by another patch. Noticed by Caio. Signed-off-by: Ian Romanick Reviewed-by: Caio Marcelo de Oliveira Filho --- src/intel/compiler/brw_disasm.c | 3 --- src/intel/compiler/brw_disasm_info.c | 3 ++- src/intel/compiler/brw_fs_nir.cpp | 2 +- src/intel/compiler/brw_fs_surface_builder.cpp | 2 +- src/intel/compiler/brw_fs_surface_builder.h | 2 +- 5 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/intel/compiler/brw_disasm.c b/src/intel/compiler/brw_disasm.c index 5f75c67942e..e45762afb07 100644 --- a/src/intel/compiler/brw_disasm.c +++ b/src/intel/compiler/brw_disasm.c @@ -846,7 +846,6 @@ src_ia1(FILE *file, const struct gen_device_info *devinfo, unsigned opcode, enum brw_reg_type type, - unsigned _reg_file, int _addr_imm, unsigned _addr_subreg_nr, unsigned _negate, @@ -1326,7 +1325,6 @@ src0(FILE *file, const struct gen_device_info *devinfo, const brw_inst *inst) devinfo, brw_inst_opcode(devinfo, inst), brw_inst_src0_type(devinfo, inst), - brw_inst_src0_reg_file(devinfo, inst), brw_inst_src0_ia1_addr_imm(devinfo, inst), brw_inst_src0_ia_subreg_nr(devinfo, inst), brw_inst_src0_negate(devinfo, inst), @@ -1382,7 +1380,6 @@ src1(FILE *file, const struct gen_device_info *devinfo, const brw_inst *inst) devinfo, brw_inst_opcode(devinfo, inst), brw_inst_src1_type(devinfo, inst), - brw_inst_src1_reg_file(devinfo, inst), brw_inst_src1_ia1_addr_imm(devinfo, inst), brw_inst_src1_ia_subreg_nr(devinfo, inst), brw_inst_src1_negate(devinfo, inst), diff --git a/src/intel/compiler/brw_disasm_info.c b/src/intel/compiler/brw_disasm_info.c index f8f4c02e763..7a9a55d83ef 100644 --- a/src/intel/compiler/brw_disasm_info.c +++ b/src/intel/compiler/brw_disasm_info.c @@ -27,7 +27,8 @@ #include "common/gen_debug.h" #include "compiler/nir/nir.h" -__attribute__((weak)) void nir_print_instr(const nir_instr *instr, FILE *fp) {} +__attribute__((weak)) void nir_print_instr(UNUSED const nir_instr *instr, + UNUSED FILE *fp) {} void dump_assembly(void *assembly, struct disasm_info *disasm) diff --git a/src/intel/compiler/brw_fs_nir.cpp b/src/intel/compiler/brw_fs_nir.cpp index 6e9a5829d3b..1c43c3aebcb 100644 --- a/src/intel/compiler/brw_fs_nir.cpp +++ b/src/intel/compiler/brw_fs_nir.cpp @@ -4322,7 +4322,7 @@ fs_visitor::nir_emit_intrinsic(const fs_builder &bld, nir_intrinsic_instr *instr */ emit_byte_scattered_write(bld, surf_index, offset_reg, write_src, - 1 /* dims */, 1, + 1 /* dims */, bit_size, BRW_PREDICATE_NONE); } else { diff --git a/src/intel/compiler/brw_fs_surface_builder.cpp b/src/intel/compiler/brw_fs_surface_builder.cpp index c346ef9e701..1d147747456 100644 --- a/src/intel/compiler/brw_fs_surface_builder.cpp +++ b/src/intel/compiler/brw_fs_surface_builder.cpp @@ -174,7 +174,7 @@ namespace brw { void emit_byte_scattered_write(const fs_builder &bld, const fs_reg &surface, const fs_reg &addr, const fs_reg &src, - unsigned dims, unsigned size, + unsigned dims, unsigned bit_size, brw_predicate pred) { emit_send(bld, SHADER_OPCODE_BYTE_SCATTERED_WRITE_LOGICAL, diff --git a/src/intel/compiler/brw_fs_surface_builder.h b/src/intel/compiler/brw_fs_surface_builder.h index 194d61d4892..f0048220d5d 100644 --- a/src/intel/compiler/brw_fs_surface_builder.h +++ b/src/intel/compiler/brw_fs_surface_builder.h @@ -74,7 +74,7 @@ namespace brw { void emit_byte_scattered_write(const fs_builder &bld, const fs_reg &surface, const fs_reg &addr, const fs_reg &src, - unsigned dims, unsigned size, + unsigned dims, unsigned bit_size, brw_predicate pred = BRW_PREDICATE_NONE); } -- 2.30.2