intel/compiler: remove unused member 'input_vue_map'

v2: Instead of fixing unitialized member 'fs_visitor::input_vue_map'
(as reported by Coverity Scan in defect CID 1474559),
remove unused members 'vec4_tcs_visitor::input_vue_map' and
'fs_visitor::input_vue_map'.

Also fixed 'debug_enabled' argument skipped in a fs_visitor constructor
call from brw_compile_tes().

Signed-off-by: Yevhenii Kharchenko <yevhenii.kharchenko@globallogic.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10040>
This commit is contained in:
Yevhenii Kharchenko
2021-04-07 01:23:08 +03:00
committed by Marge Bot
parent 63772f3ca5
commit edd12acbec
5 changed files with 8 additions and 17 deletions

View File

@@ -100,8 +100,7 @@ public:
const nir_shader *shader,
unsigned dispatch_width,
int shader_time_index,
bool debug_enabled,
const struct brw_vue_map *input_vue_map = NULL);
bool debug_enabled);
fs_visitor(const struct brw_compiler *compiler, void *log_data,
void *mem_ctx,
struct brw_gs_compile *gs_compile,
@@ -346,8 +345,6 @@ public:
struct brw_stage_prog_data *prog_data;
const struct brw_vue_map *input_vue_map;
brw_analysis<brw::fs_live_variables, backend_shader> live_analysis;
brw_analysis<brw::register_pressure, fs_visitor> regpressure_analysis;
brw_analysis<brw::performance, fs_visitor> performance_analysis;

View File

@@ -901,12 +901,10 @@ fs_visitor::fs_visitor(const struct brw_compiler *compiler, void *log_data,
const nir_shader *shader,
unsigned dispatch_width,
int shader_time_index,
bool debug_enabled,
const struct brw_vue_map *input_vue_map)
bool debug_enabled)
: backend_shader(compiler, log_data, mem_ctx, shader, prog_data,
debug_enabled),
key(key), gs_compile(NULL), prog_data(prog_data),
input_vue_map(input_vue_map),
live_analysis(this), regpressure_analysis(this),
performance_analysis(this),
dispatch_width(dispatch_width),

View File

@@ -1395,7 +1395,7 @@ brw_compile_tes(const struct brw_compiler *compiler,
if (is_scalar) {
fs_visitor v(compiler, log_data, mem_ctx, &key->base,
&prog_data->base.base, nir, 8,
shader_time_index, input_vue_map);
shader_time_index, debug_enabled);
if (!v.run_tes()) {
if (error_str)
*error_str = ralloc_strdup(mem_ctx, v.fail_msg);

View File

@@ -41,11 +41,10 @@ vec4_tcs_visitor::vec4_tcs_visitor(const struct brw_compiler *compiler,
const nir_shader *nir,
void *mem_ctx,
int shader_time_index,
bool debug_enabled,
const struct brw_vue_map *input_vue_map)
bool debug_enabled)
: vec4_visitor(compiler, log_data, &key->base.tex, &prog_data->base,
nir, mem_ctx, false, shader_time_index, debug_enabled),
input_vue_map(input_vue_map), key(key)
key(key)
{
}
@@ -460,7 +459,7 @@ brw_compile_tcs(const struct brw_compiler *compiler,
if (is_scalar) {
fs_visitor v(compiler, log_data, mem_ctx, &key->base,
&prog_data->base.base, nir, 8,
shader_time_index, debug_enabled, &input_vue_map);
shader_time_index, debug_enabled);
if (!v.run_tcs()) {
if (error_str)
*error_str = ralloc_strdup(mem_ctx, v.fail_msg);
@@ -488,7 +487,7 @@ brw_compile_tcs(const struct brw_compiler *compiler,
} else {
brw::vec4_tcs_visitor v(compiler, log_data, key, prog_data,
nir, mem_ctx, shader_time_index,
debug_enabled, &input_vue_map);
debug_enabled);
if (!v.run()) {
if (error_str)
*error_str = ralloc_strdup(mem_ctx, v.fail_msg);

View File

@@ -46,8 +46,7 @@ public:
const nir_shader *nir,
void *mem_ctx,
int shader_time_index,
bool debug_enabled,
const struct brw_vue_map *input_vue_map);
bool debug_enabled);
protected:
virtual void setup_payload();
@@ -75,8 +74,6 @@ protected:
virtual void emit_urb_write_header(int /* mrf */) {}
virtual vec4_instruction *emit_urb_write_opcode(bool /* complete */) { return NULL; }
const struct brw_vue_map *input_vue_map;
const struct brw_tcs_prog_key *key;
src_reg invocation_id;
};