diff options
author | Brian <[email protected]> | 2007-03-10 11:30:19 -0700 |
---|---|---|
committer | Brian <[email protected]> | 2007-03-10 11:30:19 -0700 |
commit | 10b5895597d5e069183cb647d17eb412effceb4f (patch) | |
tree | 326f17498a851a18ecbd0e517ad2d64da4cbb8b0 /src/mesa/swrast | |
parent | 1fcb4ecc07685872c9c42569ba13faa1cad54d3c (diff) |
Implement gl_FrontFacing for fragment shaders.
For the time being, we put the gl_FrontFacing value in the FOGC.Y input
register. Combining FOGC and FrontFacing in one register is a bit of a
hack and may need to be changed someday.
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r-- | src/mesa/swrast/s_fragprog.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c index 698925cdba3..dbfc1b8c0cc 100644 --- a/src/mesa/swrast/s_fragprog.c +++ b/src/mesa/swrast/s_fragprog.c @@ -113,6 +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; + machine->CurElement = col; /* init condition codes */ |