nir/lower_system_values: Refactor and use the builder.
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 15 Dec 2015 02:56:59 +0000 (18:56 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 15 Dec 2015 22:12:31 +0000 (14:12 -0800)
commitd7cb1634d2819f6ac2586afe98d80f563e5db7c8
treea7618ae4b45735c38919ee244f19a5ef76013da3
parentf6910f072a4117da442ca30d0358f6f79380667e
nir/lower_system_values: Refactor and use the builder.

Now that we have a helper in the builder for system values and a helper in
core NIR to get the intrinsic opcode, there's really no point in having
things split out into a helper function.  This commit "modernizes" this
pass to use helpers better and look more like newer passes.

Reviewed-by: Eric Anholt <eric@anholt.net>
src/glsl/nir/nir_lower_system_values.c