anv: Lower some SSBO operations in apply_pipeline_layout
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 11 Jan 2019 22:52:43 +0000 (16:52 -0600)
committerJason Ekstrand <jason@jlekstrand.net>
Fri, 19 Apr 2019 19:56:42 +0000 (19:56 +0000)
commit3cf78ec2bdc22833082d026d59ccb28d79b07f6f
treefa846e78f95867cbffb2c5b41f462e3930b41a23
parente7a1e8f7356922726ec38326b65e81a99d7ff96e
anv: Lower some SSBO operations in apply_pipeline_layout

In order to avoid the potential overhead of A64 operations on all SSBO
ops, we look for those SSBO ops where we can get to the descriptor set
from the SSBO access operation and lower those to a binding-table
approach.  When robustBufferAccess is enabled, this lets the hardware do
the bounds checking for us.  It also avoids some potentially expensive
64-bit integer calculations.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
src/intel/vulkan/anv_nir_apply_pipeline_layout.c