[Mesa-dev] i965/blorp: Use flat vertex inputs instead of uniforms

Jason Ekstrand jason at jlekstrand.net
Fri Jul 1 04:44:32 UTC 2016


I keep saying I'm going to review this "tomorrow" but I really mean it this
time!  I would have today but I spent the whole day arguing the finer
points of surface layout, HiZ, fast clears, and color compression with
Chad.  It was a fun day! :-)

--Jason
On Jun 23, 2016 12:17 PM, "Topi Pohjolainen" <topi.pohjolainen at intel.com>
wrote:

> In addition to the actual vertex coordinates blorp will get another
> vertex input buffer providing the constants that are until now
> provided as uniforms. This will remove the need to configure push
> constants and their allocation in the pipeline.
>
> First three patches refactor the vertex data setup for blorp. The
> existing logic in blorp already supports all gens (gen6-gen9). I
> chose to change the core upload logic accordingly and simply use that
> for blorp.
>
> Patches 5-8 pack the constants in blorp programs into vec4s. By
> default compiler puts input variables two full hardware registers
> apart. Having them in vec4s drops the need to repack them.
>
> Last four patches take actual advantage of the change by dropping
> unnecessary pipeline reconfiguration.
>
> CC: Kenneth Graunke <kenneth at whitecape.org>
> CC: Jason Ekstrand <jason at jlekstrand.net>
>
> Topi Pohjolainen (18):
>   i965/draw: Expose vertex buffer state setup
>   i965: Unify vertex buffer setup
>   i965/blorp: Split vertex data and element setup
>   i965/blorp: Use core vertex buffer state setup
>   i965/blorp: Rename push constants to inputs
>   i965/blorp: Share input slot between pixel kill and blend/scaled
>   i965/blorp: Load tranformation coordinates as vec4
>   i965/blorp: Drop LOAD_UNIFORM macro
>   i965/blorp: Store input read mask
>   i965/blorp: Add support for flat input buffer
>   i965/blorp: Tell vertex fetcher about flat inputs
>   i965/blorp: Prepare for more than two vertex attributes
>   i965/blorp: Use flat inputs instead of uniforms
>   i965/blorp: Remove support for push constants
>   i965/urb: Allow blorp to record current settings
>   i965/blorp: Fix the size requirement for vertex elements
>   i965/blorp/gen7+: Stop trashing push constant allocation
>   i965/blorp/gen7+: Do not trigger push constant space reconfig
>
>  src/mesa/drivers/dri/i965/brw_blorp.c         |  18 +-
>  src/mesa/drivers/dri/i965/brw_blorp.h         |  81 ++++++---
>  src/mesa/drivers/dri/i965/brw_blorp_blit.cpp  | 135 +++++++++------
>  src/mesa/drivers/dri/i965/brw_blorp_clear.cpp |  15 +-
>  src/mesa/drivers/dri/i965/brw_context.h       |  12 +-
>  src/mesa/drivers/dri/i965/brw_draw.h          |  13 ++
>  src/mesa/drivers/dri/i965/brw_draw_upload.c   |  74 +++++---
>  src/mesa/drivers/dri/i965/gen6_blorp.c        | 240
> +++++++++++++-------------
>  src/mesa/drivers/dri/i965/gen7_blorp.c        | 153 ++++------------
>  src/mesa/drivers/dri/i965/gen7_urb.c          |  93 +++++-----
>  src/mesa/drivers/dri/i965/gen8_blorp.c        |  86 ++-------
>  src/mesa/drivers/dri/i965/gen8_draw_upload.c  |  41 ++---
>  12 files changed, 448 insertions(+), 513 deletions(-)
>
> --
> 2.5.5
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160630/c40f0c23/attachment.html>


More information about the mesa-dev mailing list