diff options
author | Keith Whitwell <[email protected]> | 2005-09-08 18:45:03 +0000 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2005-09-08 18:45:03 +0000 |
commit | b5cbaf945dd5213d5faf7bb7e4d68d0d25a25b55 (patch) | |
tree | 751a298d043ab63ff66928f7d3a181e1d4932d03 /src/mesa/main/texenvprogram.c | |
parent | b15f46a093b2be2a6c630d8f3a2848627a34d728 (diff) |
Keep NumTemporaries uptodate.
Make sure oC alpha is populated when separate_specular enabled.
Diffstat (limited to 'src/mesa/main/texenvprogram.c')
-rw-r--r-- | src/mesa/main/texenvprogram.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/main/texenvprogram.c b/src/mesa/main/texenvprogram.c index 4cb97469a58..7c0d40ea211 100644 --- a/src/mesa/main/texenvprogram.c +++ b/src/mesa/main/texenvprogram.c @@ -362,6 +362,9 @@ static struct ureg get_temp( struct texenv_fragment_program *p ) exit(1); } + if (bit > p->program->Base.NumTemporaries) + p->program->Base.NumTemporaries = bit; + p->temp_in_use |= 1<<(bit-1); return make_ureg(PROGRAM_TEMPORARY, (bit-1)); } @@ -387,6 +390,9 @@ static struct ureg get_tex_temp( struct texenv_fragment_program *p ) exit(1); } + if (bit > p->program->Base.NumTemporaries) + p->program->Base.NumTemporaries = bit; + p->temp_in_use |= 1<<(bit-1); return make_ureg(PROGRAM_TEMPORARY, (bit-1)); } @@ -1031,6 +1037,7 @@ static void create_new_program(struct state_key *key, GLcontext *ctx, */ struct ureg s = register_input(&p, FRAG_ATTRIB_COL1); emit_arith( &p, FP_OPCODE_ADD, out, WRITEMASK_XYZ, 0, cf, s, undef ); + emit_arith( &p, FP_OPCODE_MOV, out, WRITEMASK_W, 0, cf, undef, undef ); } else if (memcmp(&cf, &out, sizeof(cf)) != 0) { /* Will wind up in here if no texture enabled or a couple of |