From: Brian Date: Sat, 28 Apr 2007 14:51:23 +0000 (-0600) Subject: only load front/back face attrib if using a shader (bug 10788) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=af0ae93863b4c876e70efa4e7406f04a3409f135;p=mesa.git only load front/back face attrib if using a shader (bug 10788) --- 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;