anv: Always initialize target_stencil_layout
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Fri, 24 Jan 2020 19:11:20 +0000 (11:11 -0800)
committerCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Fri, 24 Jan 2020 22:01:38 +0000 (14:01 -0800)
commitc1a2ac2abe97ec30706d035e8838df1c7a7da665
treead3c027751fb0edeb3baa0ea5fe2c556488e8c64
parent41bffe091350d858ae4f82d179671c6cfb44253b
anv: Always initialize target_stencil_layout

Pass down stencil data from the subpass attachment like we do
elsewhere.  Only stencil attachments will make use of it.

Fixes warnings like

    ../src/intel/vulkan/genX_cmd_buffer.c: In function ‘cmd_buffer_begin_subpass’:
    ../src/intel/vulkan/genX_cmd_buffer.c:4656:41: warning: ‘target_stencil_layout’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     4656 |       att_state->current_stencil_layout = target_stencil_layout;
          |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3557>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3557>
src/intel/vulkan/genX_cmd_buffer.c