summaryrefslogtreecommitdiffstats
path: root/src/mesa/tnl
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2008-09-21 10:28:06 -0700
committerKeith Whitwell <[email protected]>2008-09-21 10:28:06 -0700
commit9644fa6c48f596875f6955728c3a8af1b01a5028 (patch)
treed6007f177c5ce451dccce2636236ef7bbc7ed2de /src/mesa/tnl
parent99cdfc997b9da10fee57cf1048a55354e1ee4244 (diff)
parent32ef6e75839d6be283e034436e5dd34eabb67958 (diff)
Merge branch 'master' into gallium-0.2
Conflicts: include/GLES/egl.h include/GLES/egltypes.h src/egl/main/eglconfig.c src/egl/main/eglconfig.h src/glu/sgi/libnurbs/interface/bezierEval.h src/glu/sgi/libnurbs/interface/bezierPatch.h src/glu/sgi/libnurbs/interface/bezierPatchMesh.h src/glu/sgi/libnurbs/internals/dataTransform.h src/glu/sgi/libnurbs/internals/displaymode.h src/glu/sgi/libnurbs/internals/sorter.h src/glu/sgi/libnurbs/nurbtess/definitions.h src/glu/sgi/libnurbs/nurbtess/directedLine.h src/glu/sgi/libnurbs/nurbtess/gridWrap.h src/glu/sgi/libnurbs/nurbtess/monoChain.h src/glu/sgi/libnurbs/nurbtess/monoPolyPart.h src/glu/sgi/libnurbs/nurbtess/monoTriangulation.h src/glu/sgi/libnurbs/nurbtess/partitionX.h src/glu/sgi/libnurbs/nurbtess/partitionY.h src/glu/sgi/libnurbs/nurbtess/polyDBG.h src/glu/sgi/libnurbs/nurbtess/polyUtil.h src/glu/sgi/libnurbs/nurbtess/primitiveStream.h src/glu/sgi/libnurbs/nurbtess/quicksort.h src/glu/sgi/libnurbs/nurbtess/rectBlock.h src/glu/sgi/libnurbs/nurbtess/sampleComp.h src/glu/sgi/libnurbs/nurbtess/sampleCompBot.h src/glu/sgi/libnurbs/nurbtess/sampleCompRight.h src/glu/sgi/libnurbs/nurbtess/sampleCompTop.h src/glu/sgi/libnurbs/nurbtess/sampleMonoPoly.h src/glu/sgi/libnurbs/nurbtess/sampledLine.h src/glu/sgi/libnurbs/nurbtess/searchTree.h src/glu/sgi/libnurbs/nurbtess/zlassert.h src/glu/sgi/libutil/error.c src/glu/sgi/libutil/glue.c src/glu/sgi/libutil/gluint.h src/glu/sgi/libutil/project.c src/glu/sgi/libutil/registry.c src/glx/x11/Makefile src/glx/x11/glxclient.h src/glx/x11/glxext.c src/mesa/drivers/dri/ffb/ffb_dd.h src/mesa/drivers/dri/ffb/ffb_points.h src/mesa/drivers/dri/gamma/gamma_context.h src/mesa/drivers/dri/gamma/gamma_macros.h src/mesa/drivers/dri/i810/i810context.h src/mesa/drivers/dri/r128/r128_dd.h src/mesa/drivers/dri/r128/r128_tex.h src/mesa/drivers/dri/tdfx/tdfx_dd.h src/mesa/drivers/x11/xm_buffer.c src/mesa/glapi/glapi.c src/mesa/main/dispatch.c src/mesa/main/state.c src/mesa/main/texstate.c src/mesa/shader/arbprogparse.c src/mesa/shader/arbprogram.c src/mesa/shader/nvfragparse.c src/mesa/shader/nvprogram.c src/mesa/shader/shader_api.c src/mesa/sources src/mesa/swrast/s_aaline.c src/mesa/swrast/s_aaline.h src/mesa/swrast/s_aatriangle.h src/mesa/swrast/s_accum.c src/mesa/swrast/s_alpha.h src/mesa/swrast/s_bitmap.c src/mesa/swrast/s_blend.h src/mesa/swrast/s_context.c src/mesa/swrast/s_copypix.c src/mesa/swrast/s_depth.c src/mesa/swrast/s_depth.h src/mesa/swrast/s_drawpix.c src/mesa/swrast/s_drawpix.h src/mesa/swrast/s_feedback.c src/mesa/swrast/s_feedback.h src/mesa/swrast/s_fog.h src/mesa/swrast/s_lines.h src/mesa/swrast/s_logic.h src/mesa/swrast/s_masking.h src/mesa/swrast/s_points.c src/mesa/swrast/s_points.h src/mesa/swrast/s_readpix.c src/mesa/swrast/s_span.c src/mesa/swrast/s_span.h src/mesa/swrast/s_stencil.h src/mesa/swrast/s_texcombine.c src/mesa/swrast/s_texcombine.h src/mesa/swrast/s_texfilter.c src/mesa/swrast/s_texfilter.h src/mesa/swrast/s_texstore.c src/mesa/swrast/s_triangle.c src/mesa/swrast/s_triangle.h src/mesa/swrast/s_zoom.h src/mesa/swrast_setup/ss_context.c src/mesa/swrast_setup/ss_triangle.h src/mesa/tnl/t_draw.c src/mesa/tnl/t_vb_light.c src/mesa/tnl/t_vertex_generic.c src/mesa/tnl/t_vertex_sse.c src/mesa/tnl/t_vp_build.h src/mesa/tnl/tnl.h src/mesa/x86/common_x86.c
Diffstat (limited to 'src/mesa/tnl')
-rw-r--r--src/mesa/tnl/t_context.c20
-rw-r--r--src/mesa/tnl/t_draw.c2
-rw-r--r--src/mesa/tnl/t_vb_light.c4
-rw-r--r--src/mesa/tnl/t_vertex_generic.c2
-rw-r--r--src/mesa/tnl/t_vertex_sse.c4
5 files changed, 20 insertions, 12 deletions
diff --git a/src/mesa/tnl/t_context.c b/src/mesa/tnl/t_context.c
index dd590917701..ce37dc04282 100644
--- a/src/mesa/tnl/t_context.c
+++ b/src/mesa/tnl/t_context.c
@@ -1,8 +1,8 @@
/*
* Mesa 3-D graphics library
- * Version: 6.5.2
+ * Version: 7.2
*
- * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -136,11 +136,19 @@ _tnl_InvalidateState( GLcontext *ctx, GLuint new_state )
RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_COLOR_INDEX );
}
- if (ctx->Fog.Enabled ||
- ((ctx->FragmentProgram._Active || ctx->FragmentProgram._Current) &&
- (ctx->FragmentProgram._Current->FogOption != GL_NONE ||
- (ctx->FragmentProgram._Current->Base.InputsRead & FRAG_BIT_FOGC))))
+ if (ctx->Fog.Enabled) {
+ /* fixed-function fog */
RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_FOG );
+ }
+ else if (ctx->FragmentProgram._Active || ctx->FragmentProgram._Current) {
+ struct gl_fragment_program *fp = ctx->FragmentProgram._Current;
+ if (fp) {
+ if (fp->FogOption != GL_NONE || (fp->Base.InputsRead & FRAG_BIT_FOGC)) {
+ /* fragment program needs fog coord */
+ RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_FOG );
+ }
+ }
+ }
if (ctx->Polygon.FrontMode != GL_FILL ||
ctx->Polygon.BackMode != GL_FILL)
diff --git a/src/mesa/tnl/t_draw.c b/src/mesa/tnl/t_draw.c
index 173deff09c4..fd647c1f4ab 100644
--- a/src/mesa/tnl/t_draw.c
+++ b/src/mesa/tnl/t_draw.c
@@ -28,7 +28,7 @@
#include "main/glheader.h"
#include "main/context.h"
#include "main/imports.h"
-#include "state.h"
+#include "main/state.h"
#include "main/mtypes.h"
#include "main/macros.h"
#include "main/enums.h"
diff --git a/src/mesa/tnl/t_vb_light.c b/src/mesa/tnl/t_vb_light.c
index ebd3412d20f..f47f99397c9 100644
--- a/src/mesa/tnl/t_vb_light.c
+++ b/src/mesa/tnl/t_vb_light.c
@@ -26,10 +26,10 @@
#include "main/glheader.h"
#include "main/colormac.h"
-#include "light.h"
+#include "main/light.h"
#include "main/macros.h"
#include "main/imports.h"
-#include "simple_list.h"
+#include "main/simple_list.h"
#include "main/mtypes.h"
#include "math/m_translate.h"
diff --git a/src/mesa/tnl/t_vertex_generic.c b/src/mesa/tnl/t_vertex_generic.c
index c399423b9ec..db70ad4dad5 100644
--- a/src/mesa/tnl/t_vertex_generic.c
+++ b/src/mesa/tnl/t_vertex_generic.c
@@ -29,9 +29,9 @@
#include "main/glheader.h"
#include "main/context.h"
#include "main/colormac.h"
+#include "main/simple_list.h"
#include "t_context.h"
#include "t_vertex.h"
-#include "simple_list.h"
diff --git a/src/mesa/tnl/t_vertex_sse.c b/src/mesa/tnl/t_vertex_sse.c
index 53a6e55f4bf..76043bd1b54 100644
--- a/src/mesa/tnl/t_vertex_sse.c
+++ b/src/mesa/tnl/t_vertex_sse.c
@@ -28,10 +28,10 @@
#include "main/glheader.h"
#include "main/context.h"
#include "main/colormac.h"
+#include "main/simple_list.h"
+#include "main/enums.h"
#include "t_context.h"
#include "t_vertex.h"
-#include "simple_list.h"
-#include "main/enums.h"
#if defined(USE_SSE_ASM)