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

Jason Ekstrand jason at jlekstrand.net
Tue Dec 5 01:19:36 UTC 2017


On Fri, Dec 1, 2017 at 5:20 PM, Jason Ekstrand <jason at jlekstrand.net> wrote:

> 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.
>

I have numbers now (which I have added to the commit message on the last
patch:

    On my SKL GT4e, this improves the performance of Dota 2 and Talos by
    around 2.5% and improves Aztec Ruins by around 2%.


> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20171204/cb68613d/attachment.html>


More information about the mesa-dev mailing list