History log of /external/mesa3d/src/compiler/nir/nir_opt_conditional_discard.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
cd6f736c0702da3e620d9c97a1a01d911d72381f 24-Dec-2016 Jason Ekstrand <jason.ekstrand@intel.com> nir/conditional_if: Properly use the builder

We were passing around a void *mem_ctx and using that to initialize the
builder which was wrong since that pointed to ralloc_parent(impl) which
is the shader but the builder is supposed to be initialized with the
nir_function_impl.

Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
/external/mesa3d/src/compiler/nir/nir_opt_conditional_discard.c
b16dff2d88302e5113598a818d2f92f8af02cd79 02-Nov-2016 Dave Airlie <airlied@redhat.com> nir: add conditional discard optimisation (v4)

This is ported from GLSL and converts

if (cond)
discard;

into
discard_if(cond);

This removes a block, but also is needed by radv
to workaround a bug in the LLVM backend.

v2: handle if (a) discard_if(b) (nha)
cleanup and drop pointless loop (Matt)
make sure there are no dependent phis (Eric)
v3: make sure only one instruction in the then block.
v4: remove sneaky tabs, add cursor init (Eric)

Reviewed-by: Eric Anholt <eric@anholt.net>
Cc: "13.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/compiler/nir/nir_opt_conditional_discard.c