diff options
author | Nicolai Hähnle <nhaehnle@gmail.com> | 2009-07-25 01:08:37 +0200 |
---|---|---|
committer | Nicolai Hähnle <nhaehnle@gmail.com> | 2009-07-27 22:51:38 +0200 |
commit | 1348a7ebc0524276f2bd53086f13d2c263134db7 (patch) | |
tree | 9bf6e59eb25b1bb63b2eb2433d61929911327e18 /src/mesa/drivers/dri/r300/r300_fragprog_common.c | |
parent | 3f7838168781b69aea04514a57058d0aa0cc2cbb (diff) |
r300/fragprog: Finally get rid of the duplicate program copy
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
Diffstat (limited to 'src/mesa/drivers/dri/r300/r300_fragprog_common.c')
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_fragprog_common.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_fragprog_common.c b/src/mesa/drivers/dri/r300/r300_fragprog_common.c index 0ce57e834b..05f46ad060 100644 --- a/src/mesa/drivers/dri/r300/r300_fragprog_common.c +++ b/src/mesa/drivers/dri/r300/r300_fragprog_common.c @@ -96,14 +96,21 @@ static void translate_fragment_program(GLcontext *ctx, struct r300_fragment_prog compiler.code = &fp->code; compiler.state = fp->state; - compiler.program = _mesa_clone_program(ctx, &cont->Base.Base); compiler.is_r500 = (r300->radeon.radeonScreen->chip_family >= CHIP_FAMILY_RV515) ? GL_TRUE : GL_FALSE; + if (compiler.Base.Debug) { + fflush(stdout); + _mesa_printf("Fragment Program: Initial program:\n"); + _mesa_print_program(&cont->Base.Base); + fflush(stdout); + } + + rc_mesa_to_rc_program(&compiler.Base, &cont->Base.Base); + r3xx_compile_fragment_program(&compiler); fp->error = compiler.Base.Error; fp->InputsRead = compiler.Base.Program.InputsRead; - fp->Base = compiler.program; rc_destroy(&compiler.Base); } |