From: Nicolai Hähnle Date: Sun, 20 Sep 2009 14:33:59 +0000 (+0200) Subject: r300/compiler: Fix R300 fragment program regression introduced by 0723cd1... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6c323a2473cbfcdf41a8b3c395fcd277e16b963c;p=mesa.git r300/compiler: Fix R300 fragment program regression introduced by 0723cd1... We obviously need to move the code addr register backwards because their may be overlap. This bug affected in particular the Compiz water plugin. Signed-off-by: Nicolai Hähnle --- diff --git a/src/mesa/drivers/dri/r300/compiler/r300_fragprog_emit.c b/src/mesa/drivers/dri/r300/compiler/r300_fragprog_emit.c index 305dc074ee8..c7227bbd15b 100644 --- a/src/mesa/drivers/dri/r300/compiler/r300_fragprog_emit.c +++ b/src/mesa/drivers/dri/r300/compiler/r300_fragprog_emit.c @@ -352,7 +352,7 @@ void r300BuildFragmentProgramHwCode(struct r300_fragment_program_compiler *compi if (emit.current_node < 3) { int shift = 3 - emit.current_node; int i; - for(i = 0; i <= emit.current_node; ++i) + for(i = emit.current_node; i >= 0; --i) code->code_addr[shift + i] = code->code_addr[i]; for(i = 0; i < shift; ++i) code->code_addr[i] = 0;