Mesa (master): tgsi: fix warning: ‘interp’ may be used uninitialized

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jul 23 00:58:03 UTC 2019


Module: Mesa
Branch: master
Commit: 850619117e35932e1a7ca290b0d0c2a0c9f1e7fa
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=850619117e35932e1a7ca290b0d0c2a0c9f1e7fa

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Mon Jul 22 15:59:22 2019 -0400

tgsi: fix warning: ‘interp’ may be used uninitialized

Reviewed-by: Dave Airlie <airlied at redhat.com>

---

 src/gallium/auxiliary/tgsi/tgsi_exec.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi/tgsi_exec.c
index 34b72850208..18ee27502b4 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_exec.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_exec.c
@@ -3087,6 +3087,7 @@ exec_declaration(struct tgsi_exec_machine *mach,
 
             case TGSI_INTERPOLATE_COLOR:
                eval = mach->flatshade_color ? eval_constant_coef : eval_perspective_coef;
+               interp = mach->flatshade_color ? interp_constant_offset : interp_perspective_offset;
                break;
 
             default:




More information about the mesa-commit mailing list