anv/pipeline: Constant fold after apply_pipeline_layout
authorJason Ekstrand <jason.ekstrand@intel.com>
Thu, 10 Jan 2019 07:47:14 +0000 (01:47 -0600)
committerJason Ekstrand <jason@jlekstrand.net>
Thu, 10 Jan 2019 20:34:00 +0000 (20:34 +0000)
commit8ea8727a87b7fe0ee89aa8fcb583b126b57ed3f9
tree3260965c6a05fa2c68e476a41cb5c65ef548c457
parent031e94dc72bda818e440bb66a8caf52e3d669748
anv/pipeline: Constant fold after apply_pipeline_layout

Thanks to the new NIR load_descriptor intrinsic added by the UBO/SSBO
lowering series, we weren't getting UBO pushing because the UBO range
detection pass couldn't see the constants it needed.  This fixes that
problem with a quick round of constant folding.  Because we're folding
we no longer need to go out of our way to generate constants when we
lower the vulkan_resource_index intrinsic and we can make it a bit
simpler.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/intel/vulkan/anv_nir_apply_pipeline_layout.c
src/intel/vulkan/anv_pipeline.c