tgsi: fix warning: ‘interp’ may be used uninitialized
authorMarek Olšák <marek.olsak@amd.com>
Mon, 22 Jul 2019 19:59:22 +0000 (15:59 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 23 Jul 2019 00:57:44 +0000 (20:57 -0400)
Reviewed-by: Dave Airlie <airlied@redhat.com>
src/gallium/auxiliary/tgsi/tgsi_exec.c

index 34b7285020814757aaf9b59e8a3629842e794d8f..18ee27502b443ff2a41446014f4de11fff5f49ef 100644 (file)
@@ -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: