summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-04-28 08:51:23 -0600
committerBrian <[email protected]>2007-04-28 08:51:23 -0600
commitaf0ae93863b4c876e70efa4e7406f04a3409f135 (patch)
tree96a9c2005ef663607fe86e9426c68646313967ae /src
parentbcc3baadbafc3f3deb79e3a753d9ee3867917073 (diff)
only load front/back face attrib if using a shader (bug 10788)
Diffstat (limited to 'src')
-rw-r--r--src/mesa/swrast/s_fragprog.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c
index 882fec29efe..09493873aa2 100644
--- a/src/mesa/swrast/s_fragprog.c
+++ b/src/mesa/swrast/s_fragprog.c
@@ -113,8 +113,10 @@ init_machine(GLcontext *ctx, struct gl_program_machine *machine,
/* Setup pointer to input attributes */
machine->Attribs = span->array->attribs;
- /* Store front/back facing value in register FOGC.Y */
- machine->Attribs[FRAG_ATTRIB_FOGC][col][1] = (GLfloat) ctx->_Facing;
+ if (ctx->Shader.CurrentProgram) {
+ /* Store front/back facing value in register FOGC.Y */
+ machine->Attribs[FRAG_ATTRIB_FOGC][col][1] = (GLfloat) ctx->_Facing;
+ }
machine->CurElement = col;