anv: Initialize variable to fix static analyzer warning
Static analyzer is complaning that tex_src could be not initialized and then used, this should not happen as an instruction with type of 'tex' type needs to have source a texture handle. But to make static analyzer happy here just initializing it to zero. Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29530>
This commit is contained in:

committed by
Marge Bot

parent
75b1fa9263
commit
1e0a0b4dd5
@@ -970,7 +970,7 @@ print_tex_handle(nir_builder *b,
|
||||
|
||||
nir_tex_instr *tex = nir_instr_as_tex(instr);
|
||||
|
||||
nir_src tex_src;
|
||||
nir_src tex_src = {};
|
||||
for (unsigned i = 0; i < tex->num_srcs; i++) {
|
||||
if (tex->src[i].src_type == nir_tex_src_texture_handle)
|
||||
tex_src = tex->src[i].src;
|
||||
|
Reference in New Issue
Block a user