[Mesa-dev] [PATCH 0/6] anv: Add support for pushing ranges of UBOs

Jason Ekstrand jason at jlekstrand.net
Sat Dec 2 01:20:03 UTC 2017


We've had this optimization in the GL driver since July but never got
around to hooking it up in Vulkan.  This lets us turn UBOs into push
constants which are significantly faster since they read the UBO data
once and the shader dispatch shoves it into the shader prior to program
execution.

I have zero benchmark numbers at the moment but I expect this to help
anything which uses UBOs and has constant offsets into them which is
basically everything.  Unfortunately, I'm at home and not near any
hardware with stable enough performance characteristics to get decent
numbers today.

Cc: Kenneth Graunke <kenneth at whitecape.org>
Cc: Eero Tamminen <eero.t.tamminen at intel.com>

Jason Ekstrand (6):
  anv/pipeline: Translate vulkan_resource_index to a constant when
    possible
  anv/cmd_buffer: Add some helpers for working with descriptor sets
  anv/cmd_buffer: Add some stage asserts
  anv/cmd_buffer: Add support for pushing UBO ranges
  anv/device: Increase the UBO alignment requirement to 32
  anv: Enable UBO pushing

 src/intel/vulkan/anv_device.c                    |  13 +-
 src/intel/vulkan/anv_nir_apply_pipeline_layout.c |  15 +-
 src/intel/vulkan/anv_pipeline.c                  |   6 +
 src/intel/vulkan/genX_cmd_buffer.c               | 191 ++++++++++++++++++-----
 src/intel/vulkan/genX_pipeline.c                 |   3 +-
 5 files changed, 179 insertions(+), 49 deletions(-)

-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list