swrast: Use fixed-function processing instead _TexEnvProgram for DrawPixels
authorIan Romanick <ian.d.romanick@intel.com>
Fri, 20 Jan 2012 01:29:37 +0000 (17:29 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Tue, 24 Jan 2012 20:30:57 +0000 (12:30 -0800)
commit9be3be3c6654da18466626c2d45ff4d06b5fb953
tree5b8673766b68dfb611ea7caf138d6506f17f0726
parent34db7a8c1e775aaefad7952133e087f1c1a569f6
swrast: Use fixed-function processing instead _TexEnvProgram for DrawPixels

This is a hack to work around drivers such as i965 that:

    - Set _MaintainTexEnvProgram to generate GLSL IR for
      fixed-function fragment processing.
    - Don't call _mesa_ir_link_shader to generate Mesa IR from the
      GLSL IR.
    - May use swrast to handle glDrawPixels.

Since _mesa_ir_link_shader is never called, there is no Mesa IR to
execute.  Instead do regular fixed-function processing.

Even on platforms that don't need this, the software fixed-function
code is much faster than the software shader code.

NOTE: This is a candidate for the 8.0 branch.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44749
src/mesa/swrast/s_span.c