[Mesa-dev] [PATCH] nir/builder: Add an init function that creates a simple shader for you

Kenneth Graunke kenneth at whitecape.org
Tue Dec 29 12:39:05 PST 2015


On Tuesday, December 29, 2015 9:59:08 AM PST Jason Ekstrand wrote:
> A hugely common case when using nir_builder is to have a shader with a
> single function called main.  This adds a helper that gives you just that.
> This commit also makes us use it in the NIR control-flow unit tests as well
> as tgsi_to_nir and prog_to_nir.
> ---
>  src/gallium/auxiliary/nir/tgsi_to_nir.c   | 12 ++++--------
>  src/glsl/nir/nir_builder.h                | 11 +++++++++++
>  src/glsl/nir/tests/control_flow_tests.cpp | 26 ++++++++++----------------
>  src/mesa/program/prog_to_nir.c            | 13 +++----------
>  4 files changed, 28 insertions(+), 34 deletions(-)

This would have saved me a fair bit of boilerplate in my attempt to
write a passthrough TCS in NIR.  It's a good idea.

Acked-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/20151229/43482245/attachment.sig>


More information about the mesa-dev mailing list