[Mesa-dev] [PATCH 0/9] Big pile of fog clean up

Corbin Simpson mostawesomedude at gmail.com
Sat Apr 16 09:45:36 PDT 2011


On Fri, Apr 15, 2011 at 11:10 PM, Ian Romanick <idr at freedesktop.org> wrote:
> This patch series cleans out the last vestiges of fixed-function fog
> support with ARB_fragment_program.  We talked about doing this quite
> some time ago, but we decided to hold off.  The thinking at the time
> was that there was still a chance that someone might add support for
> the fixed-function fog on either i915 or r300.
>
> Reality check: there is no chance because nobody cares. :)
>
> Patch 1/9 cleans up a couple minor bugs in the fixed-function
> fragment program code.
>
> Patches 2/9, 3/9, and 4/9 remove code that checks for fp.FogOption to
> be non-GL_NONE.  Thanks to the first patch, this can *never* happen.
>
> Patch 5/9 removes gl_fragment_program::FogOption.
>
> The remaining four patches remove all the dangling bits of support for
> fixed-function fog on i915.  Since fog is (and always has been)
> handled by fragment programs on i915, this code is completely useless.
>
> I have tested this whole series on Ironlake (i965 driver) and G33
> (i915 driver).  There were no piglit or GTF regressions in either
> case.
>
> I believe that, at the very least, the first four patches are suitable
> for the stable branches (after a suitable settling period on master,
> of course).  The remaining five patches may also be suitable.
>
>  src/mesa/drivers/dri/i915/i915_context.c           |    8 +-
>  src/mesa/drivers/dri/i915/i915_context.h           |   15 --
>  src/mesa/drivers/dri/i915/i915_fragprog.c          |   11 +--
>  src/mesa/drivers/dri/i915/i915_state.c             |  164 +-------------------
>  src/mesa/drivers/dri/i915/i915_vtbl.c              |    9 -
>  src/mesa/drivers/dri/i965/brw_program.c            |    5 -
>  .../drivers/dri/r300/compiler/r300_fragprog_emit.c |    2 -
>  src/mesa/main/ff_fragment_shader.cpp               |   44 +++---
>  src/mesa/main/mtypes.h                             |    1 -
>  src/mesa/program/arbprogparse.c                    |   18 +--
>  src/mesa/program/program.c                         |    1 -
>  src/mesa/program/programopt.c                      |   33 +++--
>  src/mesa/program/programopt.h                      |    4 +-
>  src/mesa/swrast/s_context.c                        |   15 +--
>  src/mesa/tnl/t_context.c                           |   12 +-
>  15 files changed, 70 insertions(+), 272 deletions(-)

r300 *did* support FF fog at one point, but it got tossed out because
we couldn't get it to work with fog coordinates. (Well, *I* couldn't
get it to work; I think osiris got it mostly-working-sort-of at one
point.) This code will not be missed.

~ C.

-- 
When the facts change, I change my mind. What do you do, sir? ~ Keynes

Corbin Simpson
<MostAwesomeDude at gmail.com>


More information about the mesa-dev mailing list