[Mesa-dev] [PATCH 1/2] prog_to_nir: Use a variable for uniform data

Kenneth Graunke kenneth at whitecape.org
Sat May 23 11:47:31 PDT 2015

On Tuesday, May 19, 2015 05:28:17 PM Jason Ekstrand wrote:
> Previously, the prog_to_nir pass was directly generating uniform load/store
> intrinsics.  This converts it to use a single giant "parameters" variable
> and we now depend on lowering to get the uniform load/store intrinsics.
> One advantage of this is that we now have one code-path after we do the
> initial conversion into NIR.
> No shader-db changes.
> Signed-off-by: Jason Ekstrand <jason.ekstrand at intel.com>
> ---
>  src/mesa/drivers/dri/i965/brw_nir.c | 15 ++-------
>  src/mesa/program/prog_to_nir.c      | 65 ++++++++++++++++++++-----------------
>  2 files changed, 38 insertions(+), 42 deletions(-)

That is indeed nicer...much less special casing.  This patch also makes
an eventual goal of mine easier:

If we ever start converting ARB programs directly to NIR, we'll be able
to create multiple variables for disjoint sections of parameters---several
arrays, rather than one giant array.  (Currently, that information is lost
in Mesa IR, as far as I know.)  This would allow us to eliminate more
unused parameters in the presence of indirects.

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150523/a67e8258/attachment.sig>

More information about the mesa-dev mailing list