nir: Add nir_lower_alu_to_scalar.
authorEric Anholt <eric@anholt.net>
Thu, 13 Nov 2014 20:40:59 +0000 (12:40 -0800)
committerEric Anholt <eric@anholt.net>
Sat, 24 Jan 2015 00:37:23 +0000 (16:37 -0800)
commit447ddfc1371b1ca6e8a9fe53ea8ea6bca6dbd795
tree7421024cf9b49d6329841c7ef8f507f99f10a7dc
parentb2001278169b1f943c0bb6edb2d6985348beab4a
nir: Add nir_lower_alu_to_scalar.

This is the equivalent of brw_fs_channel_expressions.cpp, which I wanted
for vc4.

v2: Use the nir_src_for_ssa() helper, and another instance of
    nir_alu_src_copy().
v3: Drop the non-SSA support.  All intended callers will have SSA-only ALU
    ops.
v4: Use insert_before, drop stale bcsel/fcsel comment, drop now-unused
    unsupported() function, drop lower_context struct.
v5: Completely rename the pass to nir_lower_alu_to_scalar(), add an assert
    about weird input_sizes[].

Reviewed-by: Jason Ekstrand <jason.ekstrand@iastate.edu>
src/glsl/Makefile.sources
src/glsl/nir/nir.h
src/glsl/nir/nir_lower_alu_to_scalar.c [new file with mode: 0644]