spirv: initialize is_vertex_input
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Mon, 16 Jul 2018 19:36:29 +0000 (12:36 -0700)
committerCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Wed, 18 Jul 2018 15:29:51 +0000 (08:29 -0700)
commitff8abce361f022c4aae7fdaeabbfdfa65fb65e2d
treeba595373f373e6ef3f3b6aa744d5cd9eb09e740c
parentcbad8f3cc0aade2585abacbb616002b03a1428e5
spirv: initialize is_vertex_input

Fixes warning:

../../src/compiler/spirv/vtn_variables.c: In function ‘var_decoration_cb’:
../../src/compiler/spirv/vtn_variables.c:1400:12: warning: ‘is_vertex_input’ may be used uninitialized in this function [-Wmaybe-uninitialized]
       bool is_vertex_input;
            ^~~~~~~~~~~~~~~

The code used to set is_vertex_input in all possible codepaths, but
after 23edc5b1ef3 "spirv: translate default-block uniforms" the
compiler isn't sure all codepaths will initialize the variable.

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
src/compiler/spirv/vtn_variables.c