nir: add lowering pass for clip plane enabling
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Wed, 17 Jun 2020 13:35:46 +0000 (09:35 -0400)
committerMarge Bot <eric+marge@anholt.net>
Fri, 3 Jul 2020 08:56:30 +0000 (08:56 +0000)
commitfb2fe802f638d7a70f0d00ec1d496f317d241765
tree048838ee2da74fb3a9ff9d3f40e0b342cbc49c57
parentf8946bd705ce8cfaf0d2d571fefcf67161f9c5d5
nir: add lowering pass for clip plane enabling

a pass which rewrites gl_ClipDistance[n] to an undef if the corresponding
clip plane is disabled in the rasterizer state

this pass is needed for zink to handle api disables of clip planes

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5529>
src/compiler/nir/meson.build
src/compiler/nir/nir.h
src/compiler/nir/nir_lower_clip_disable.c [new file with mode: 0644]