<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Dec 1, 2017 at 5:20 PM, Jason Ekstrand <span dir="ltr"><<a href="mailto:jason@jlekstrand.net" target="_blank">jason@jlekstrand.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">We've had this optimization in the GL driver since July but never got<br>
around to hooking it up in Vulkan.  This lets us turn UBOs into push<br>
constants which are significantly faster since they read the UBO data<br>
once and the shader dispatch shoves it into the shader prior to program<br>
execution.<br>
<br>
I have zero benchmark numbers at the moment but I expect this to help<br>
anything which uses UBOs and has constant offsets into them which is<br>
basically everything.  Unfortunately, I'm at home and not near any<br>
hardware with stable enough performance characteristics to get decent<br>
numbers today.<br></blockquote><div><br></div><div>I have numbers now (which I have added to the commit message on the last patch:</div><div><br></div><div>    On my SKL GT4e, this improves the performance of Dota 2 and Talos by<br>    around 2.5% and improves Aztec Ruins by around 2%.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Cc: Kenneth Graunke <<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>><br>
Cc: Eero Tamminen <<a href="mailto:eero.t.tamminen@intel.com">eero.t.tamminen@intel.com</a>><br>
<br>
Jason Ekstrand (6):<br>
  anv/pipeline: Translate vulkan_resource_index to a constant when<br>
    possible<br>
  anv/cmd_buffer: Add some helpers for working with descriptor sets<br>
  anv/cmd_buffer: Add some stage asserts<br>
  anv/cmd_buffer: Add support for pushing UBO ranges<br>
  anv/device: Increase the UBO alignment requirement to 32<br>
  anv: Enable UBO pushing<br>
<br>
 src/intel/vulkan/anv_device.c                    |  13 +-<br>
 src/intel/vulkan/anv_nir_<wbr>apply_pipeline_layout.c |  15 +-<br>
 src/intel/vulkan/anv_pipeline.<wbr>c                  |   6 +<br>
 src/intel/vulkan/genX_cmd_<wbr>buffer.c               | 191 ++++++++++++++++++-----<br>
 src/intel/vulkan/genX_<wbr>pipeline.c                 |   3 +-<br>
 5 files changed, 179 insertions(+), 49 deletions(-)<br>
<span class="gmail-HOEnZb"><font color="#888888"><br>
--<br>
2.5.0.400.gff86faf<br>
<br>
</font></span></blockquote></div><br></div></div>