summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/arbprogparse.c
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2009-07-02 11:28:56 +0100
committerKeith Whitwell <[email protected]>2009-07-02 11:28:56 +0100
commitb3e8e1cd4c1584f735e35914861ae2e8ae5b6b2b (patch)
treef3d95e61071c5ab50cc461b3cc86f7ad7ec06554 /src/mesa/shader/arbprogparse.c
parent578230dbbffbf5317d6002d1023dcd62b57186f5 (diff)
mesa: ensure UsesFogFragCoord value is set for non-glsl shaders
With recent changes to support frontfacing in glsl, it is necessary to ensure that the UsesFogFragCoord value is accurate in all shaders. We were previously not setting it for fixed-function and ARB_fs shaders.
Diffstat (limited to 'src/mesa/shader/arbprogparse.c')
-rw-r--r--src/mesa/shader/arbprogparse.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/shader/arbprogparse.c b/src/mesa/shader/arbprogparse.c
index bb4c5b38d41..f5053d3289a 100644
--- a/src/mesa/shader/arbprogparse.c
+++ b/src/mesa/shader/arbprogparse.c
@@ -3922,6 +3922,13 @@ _mesa_parse_arb_fragment_program(GLcontext* ctx, GLenum target,
if (program->FogOption)
program->Base.InputsRead |= FRAG_BIT_FOGC;
+
+ /* XXX: assume that ARB fragment programs don't have access to the
+ * FrontFacing and PointCoord values stuffed into the fog
+ * coordinate in GLSL shaders.
+ */
+ if (program->Base.InputsRead & FRAG_BIT_FOGC)
+ program->UsesFogFragCoord = TRUE;
if (program->Base.Instructions)
_mesa_free(program->Base.Instructions);