mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 13:00:09 +01:00
nir: Silence a couple of warnings in release builds
[28/716] Compiling C object 'src/compiler/nir/068b2c8@@nir@sta/nir_gather_xfb_info.c.o'.
../src/compiler/nir/nir_gather_xfb_info.c: In function ‘nir_gather_xfb_info’:
../src/compiler/nir/nir_gather_xfb_info.c:171:13: warning: variable ‘max_offset’ set but not used [-Wunused-but-set-variable]
unsigned max_offset[NIR_MAX_XFB_BUFFERS] = {0};
^~~~~~~~~~
[36/716] Compiling C object 'src/compiler/nir/068b2c8@@nir@sta/nir_instr_set.c.o'.
../src/compiler/nir/nir_instr_set.c:502:1: warning: ‘instr_each_src_and_dest_is_ssa’ defined but not used [-Wunused-function]
instr_each_src_and_dest_is_ssa(nir_instr *instr)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
This commit is contained in:
parent
6775665e5e
commit
b14d7a6b60
2 changed files with 3 additions and 1 deletions
|
|
@ -167,6 +167,7 @@ nir_gather_xfb_info(const nir_shader *shader, void *mem_ctx)
|
|||
qsort(xfb->outputs, xfb->output_count, sizeof(xfb->outputs[0]),
|
||||
compare_xfb_output_offsets);
|
||||
|
||||
#ifndef NDEBUG
|
||||
/* Finally, do a sanity check */
|
||||
unsigned max_offset[NIR_MAX_XFB_BUFFERS] = {0};
|
||||
for (unsigned i = 0; i < xfb->output_count; i++) {
|
||||
|
|
@ -175,6 +176,7 @@ nir_gather_xfb_info(const nir_shader *shader, void *mem_ctx)
|
|||
unsigned slots = util_bitcount(xfb->outputs[i].component_mask);
|
||||
max_offset[xfb->outputs[i].buffer] = xfb->outputs[i].offset + slots * 4;
|
||||
}
|
||||
#endif
|
||||
|
||||
return xfb;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -498,7 +498,7 @@ dest_is_ssa(nir_dest *dest, void *data)
|
|||
return dest->is_ssa;
|
||||
}
|
||||
|
||||
static bool
|
||||
static inline bool
|
||||
instr_each_src_and_dest_is_ssa(nir_instr *instr)
|
||||
{
|
||||
if (!nir_foreach_dest(instr, dest_is_ssa, NULL) ||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue