glsl: Extend lowering pass for gl_ClipDistance to support other arrays (v4)
authorTobias Klausmann <tobias.johannes.klausmann@mni.thm.de>
Sun, 8 May 2016 20:44:05 +0000 (22:44 +0200)
committerDave Airlie <airlied@redhat.com>
Fri, 13 May 2016 22:28:07 +0000 (08:28 +1000)
commitad355652c20b245f5f2faa8622e71461e3121a7f
tree9bd401adde19138d616d4accd941451dce1bcfe2
parentdd3390e12fa8c8fa127013a9fc7c83069747aad2
glsl: Extend lowering pass for gl_ClipDistance to support other arrays (v4)

This will come in handy when we want to lower gl_CullDistance into
gl_CullDistanceMESA.

[airlied: drop separate APIs for clip/cull - just use single API
to call both passes.]

v3: reexamine my sanity, this was pretty broken, the new code
creates one copy of gl_ClipDistanceMESA, as the clip distance
varying and lowers everything into that in two passes, one for clips
one for culls.
v4: rework using the passes in clip/cull sizes, instead of the
array sizes.

Signed-off-by: Tobias Klausmann <tobias.johannes.klausmann@mni.thm.de>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
src/compiler/glsl/ir_optimization.h
src/compiler/glsl/linker.cpp
src/compiler/glsl/lower_distance.cpp