glsl: Mark whole variable used for ClipDistance and TessLevel*.
authorKenneth Graunke <kenneth@whitecape.org>
Sun, 15 Nov 2015 12:22:10 +0000 (04:22 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 6 Jan 2017 23:55:39 +0000 (15:55 -0800)
commit5c580e64cc206ab160e1767c42e4d6c81f67da4d
tree2ce6ecebfcb03fad1927522f19d39c00ec127ce4
parent8b5749f65ac434961308ccb579fb8a816e4f29d5
glsl: Mark whole variable used for ClipDistance and TessLevel*.

There's no point in trying to mark partial array access for
gl_ClipDistance, gl_TessLevelOuter, or gl_TessLevelInner - they're
special built-in variables that control fixed function hardware,
and will likely be used in an all-or-nothing fashion.

Since these arrays only occupy 1-2 varying slots, we have to avoid
our normal processing which increments the slot value by the array
index.

(I wrote this code before i965 switched from ir_set_program_inouts
to nir_shader_gather_info.  It's not used by anyone today, and I'm
not sure how valuable it is...the alternative to GLSL IR lowering
is NIR compact arrays, at which point you should use nir_gather_info.)

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
src/compiler/glsl/ir_set_program_inouts.cpp