diff options
author | Eric Anholt <eric@anholt.net> | 2010-10-31 10:51:59 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2011-03-11 12:55:13 -0800 |
commit | cdacca4868bbfe2e39f72d524556e7b2c7200ba5 (patch) | |
tree | ea2faab50ad1d3e65c40f5fbbaa2daebf06394a7 /src/mesa/main | |
parent | e1cb12bfff7f65c3599c9b68b9269f73942b1602 (diff) |
mesa: Move texenvprogram.c to ff_fragment_shader.cpp.
This file is about to change to generating a shader program instead of
a fragment program.
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/ff_fragment_shader.cpp (renamed from src/mesa/main/texenvprogram.c) | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/mesa/main/texenvprogram.c b/src/mesa/main/ff_fragment_shader.cpp index c1380f2a64..9be531735e 100644 --- a/src/mesa/main/texenvprogram.c +++ b/src/mesa/main/ff_fragment_shader.cpp @@ -26,6 +26,7 @@ * **************************************************************************/ +extern "C" { #include "glheader.h" #include "imports.h" #include "mtypes.h" @@ -37,7 +38,7 @@ #include "program/prog_statevars.h" #include "program/programopt.h" #include "texenvprogram.h" - +} /* * Note on texture units: @@ -524,7 +525,7 @@ struct ureg { static const struct ureg undef = { PROGRAM_UNDEFINED, - ~0, + 255, 0, 0, 0 @@ -686,14 +687,15 @@ static struct ureg register_param5( struct texenv_fragment_program *p, GLint s3, GLint s4) { - gl_state_index tokens[STATE_LENGTH]; + int tokens[STATE_LENGTH]; GLuint idx; tokens[0] = s0; tokens[1] = s1; tokens[2] = s2; tokens[3] = s3; tokens[4] = s4; - idx = _mesa_add_state_reference( p->program->Base.Parameters, tokens ); + idx = _mesa_add_state_reference(p->program->Base.Parameters, + (gl_state_index *)tokens); return make_ureg(PROGRAM_STATE_VAR, idx); } @@ -1586,6 +1588,7 @@ create_new_program(struct gl_context *ctx, struct state_key *key, } } +extern "C" { /** * Return a fragment program which implements the current @@ -1616,3 +1619,5 @@ _mesa_get_fixed_func_fragment_program(struct gl_context *ctx) return prog; } + +} |