From af0ae93863b4c876e70efa4e7406f04a3409f135 Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 28 Apr 2007 08:51:23 -0600 Subject: only load front/back face attrib if using a shader (bug 10788) --- src/mesa/swrast/s_fragprog.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c index 882fec29ef..09493873aa 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; -- cgit v1.2.3