r600/sfn: Fix a few warnings in release builds
[1083/1142] Compiling C++ object src/gallium/drivers/r600/libr600.a.p/sfn_sfn_nir_lower_fs_out_to_vector.cpp.o ../src/gallium/drivers/r600/sfn/sfn_nir_lower_fs_out_to_vector.cpp: In member function ‘nir_ssa_def* r600::NirLowerFSOutToVector::create_combined_vector(nir_builder*, nir_ssa_def**, int, int)’: ../src/gallium/drivers/r600/sfn/sfn_nir_lower_fs_out_to_vector.cpp:442:48: warning: ‘op’ may be used uninitialized in this function [-Wmaybe-uninitialized] nir_alu_instr * instr = nir_alu_instr_create(b->shader, op); | ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ [1092/1142] Compiling C++ object src/gallium/drivers/r600/libr600.a.p/sfn_sfn_nir.cpp.o ../src/gallium/drivers/r600/sfn/sfn_nir.cpp: In function ‘int r600_shader_from_nir(r600_context*, r600_pipe_shader*, r600_shader_key*)’: ../src/gallium/drivers/r600/sfn/sfn_nir.cpp:859:24: warning: unused variable ‘func’ [-Wunused-variable] 859 | const nir_function *func = reinterpret_cast<const nir_function *>(exec_list_get_head_const(&sel->nir->functions)); | ^~~~ [1118/1142] Compiling C++ object src/gallium/drivers/r600/libr600.a.p/sfn_sfn_shader_base.cpp.o ../src/gallium/drivers/r600/sfn/sfn_shader_base.cpp: In member function ‘void r600::ShaderFromNirProcessor::add_array_deref(nir_deref_instr*)’: ../src/gallium/drivers/r600/sfn/sfn_shader_base.cpp:300:18: warning: unused variable ‘var’ [-Wunused-variable] 300 | nir_variable *var = nir_deref_instr_get_variable(instr); Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7820>
This commit is contained in:
parent
261f42f0c8
commit
166657a736
|
@ -855,10 +855,6 @@ int r600_shader_from_nir(struct r600_context *rctx,
|
|||
NIR_PASS_V(sel->nir, r600_append_tcs_TF_emission,
|
||||
(pipe_prim_type)key->tcs.prim_mode);
|
||||
|
||||
|
||||
const nir_function *func = reinterpret_cast<const nir_function *>(exec_list_get_head_const(&sel->nir->functions));
|
||||
assert(func->impl->registers.length() == 0 && !has_saturate(func));
|
||||
|
||||
NIR_PASS_V(sel->nir, nir_lower_ubo_vec4);
|
||||
|
||||
/* Lower to scalar to let some optimization work out better */
|
||||
|
|
|
@ -436,8 +436,7 @@ nir_ssa_def *NirLowerFSOutToVector::create_combined_vector(nir_builder *b, nir_s
|
|||
case 3: op = nir_op_vec3; break;
|
||||
case 4: op = nir_op_vec4; break;
|
||||
default:
|
||||
assert(0 && "combined vector must have 2 to 4 components");
|
||||
|
||||
unreachable("combined vector must have 2 to 4 components");
|
||||
}
|
||||
nir_alu_instr * instr = nir_alu_instr_create(b->shader, op);
|
||||
instr->exact = b->exact;
|
||||
|
|
|
@ -295,18 +295,6 @@ bool ShaderFromNirProcessor::process_outputs(nir_variable *output)
|
|||
return do_process_outputs(output);
|
||||
}
|
||||
|
||||
void ShaderFromNirProcessor::add_array_deref(nir_deref_instr *instr)
|
||||
{
|
||||
nir_variable *var = nir_deref_instr_get_variable(instr);
|
||||
|
||||
assert(nir_deref_mode_is(instr, nir_var_function_temp));
|
||||
assert(glsl_type_is_array(var->type));
|
||||
|
||||
// add an alias for the index to the register(s);
|
||||
|
||||
|
||||
}
|
||||
|
||||
void ShaderFromNirProcessor::set_var_address(nir_deref_instr *instr)
|
||||
{
|
||||
auto& dest = instr->dest;
|
||||
|
|
|
@ -170,8 +170,6 @@ private:
|
|||
bool process_inputs(nir_variable *input);
|
||||
bool process_outputs(nir_variable *output);
|
||||
|
||||
void add_array_deref(nir_deref_instr* instr);
|
||||
|
||||
void append_block(int nesting_change);
|
||||
|
||||
virtual void emit_shader_start();
|
||||
|
|
Loading…
Reference in New Issue