nir: Avoid clip/cull distance lowering multiple times.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 23 Jan 2019 09:15:05 +0000 (01:15 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 5 Feb 2019 21:58:46 +0000 (13:58 -0800)
commitba9dcc80fb2fc103835eef17153895f403d8654e
tree3204c5eb104367b9913c498665ce695e7667421b
parent5730364d695b706c99c0d3fe6379cbeac61d79f1
nir: Avoid clip/cull distance lowering multiple times.

A couple places in st/nir assume that cull distances have been lowered
away, so it will need to call this lowering pass for drivers which opt
out of the GLSL IR lowering.  The Intel backend also calls this pass,
for i965 and anv.  We need to only do it once.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/compiler/nir/nir_lower_clip_cull_distance_arrays.c