Mesa (main): llvmpipe: initialize a local var to fix compiler warning in release build

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jul 14 20:00:37 UTC 2022


Module: Mesa
Branch: main
Commit: a0ea45fb687a44db5bee89f997c886ce6ac5197f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a0ea45fb687a44db5bee89f997c886ce6ac5197f

Author: Brian Paul <brianp at vmware.com>
Date:   Wed Jun 15 21:29:41 2022 -0600

llvmpipe: initialize a local var to fix compiler warning in release build

Signed-off-by: Brian Paul <brianp at vmware.com>
Reviewed-by: Roland Scheidegger <sroland at vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17062>

---

 src/gallium/drivers/llvmpipe/lp_state_fs_analysis.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs_analysis.c b/src/gallium/drivers/llvmpipe/lp_state_fs_analysis.c
index 9498a0b216f..2c28785f2b6 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_fs_analysis.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_fs_analysis.c
@@ -301,7 +301,7 @@ llvmpipe_nir_fn_is_linear_compat(const struct nir_shader *shader,
             nir_tex_instr *tex = nir_instr_as_tex(instr);
             struct lp_tgsi_texture_info *tex_info = &info->tex[info->num_texs];
             int texcoord_swizzle[4] = {-1, -1, -1, -1};
-            unsigned coord_fs_input_index;
+            unsigned coord_fs_input_index = 0;
 
             for (unsigned i = 0; i < tex->num_srcs; i++) {
                if (tex->src[i].src_type == nir_tex_src_coord) {



More information about the mesa-commit mailing list