anv/pipeline: set active_stages early
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Thu, 15 Mar 2018 20:09:30 +0000 (13:09 -0700)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Mon, 19 Mar 2018 18:00:49 +0000 (18:00 +0000)
commitf6338c3b856711d6a399b7f6dccbf3a7062b4586
treea90d8b47fa1c745eb3c9b9f86ff916fb6f84203f
parent318073ce660ca72b47ba83e37d1d0bc756f779b7
anv/pipeline: set active_stages early

Since the intermediate states of active_stages are not used,
i.e. active_stages is read only after all stages were set into it,
just set its value before compiling the shaders.

This will allow to conditionally run certain passes based on what
other shaders are being used, e.g. a certain pass might only be
applicable to the vertex shader if there's no geometry or tessellation
shader being used.

v2: Use vk_to_mesa_shader_stage. (Lionel)
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/intel/vulkan/anv_pipeline.c
src/intel/vulkan/genX_pipeline.c