i965: Don't use _mesa_ir_link_shader to do our dirty work
authorIan Romanick <ian.d.romanick@intel.com>
Sat, 7 Jan 2012 00:26:49 +0000 (16:26 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Wed, 11 Jan 2012 20:51:24 +0000 (12:51 -0800)
commit1c177452005a0366db01629d875da553f7949ddd
tree386f2547dbd9698c9fc1411fdffc2ae860d98056
parentefdc8bf1894790a85c118881395a998cbae34c1a
i965: Don't use _mesa_ir_link_shader to do our dirty work

Instead, do the uniform setting and input / output mapping directly in
brw_link_shader.  Hurray for not generating Mesa IR!  However, once
the i965 driver stops calling _mesa_ir_link_shader, UsesClipDistance
and UsesKill are no longer set.

Ideally gen6_upload_vs_push_constants should use the
gl_shader_program, but I don't see a way to propagate the information
there.  The other alternative, since this is the only usage, is to
move gl_vertex_program::UsesClipDistance to brw_vertex_program.

The compile (and precompile) stages use UsesKill to determine the
cache key for the shader.  This is then used to determine whether or
not to compile the shader.  Calculating this data during compilation
is too late.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/brw_shader.cpp