From ff6ab9b45b180ab9bf261afa50888e6e740d7924 Mon Sep 17 00:00:00 2001 From: Nicolai Haehnle Date: Sun, 18 Mar 2007 13:29:18 +0100 Subject: r300: Fix fragment program reordering Do not move an instruction that writes to a temp forward past an instruction that reads the same temporary. --- src/mesa/drivers/dri/r300/r300_context.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/mesa/drivers/dri/r300/r300_context.h') diff --git a/src/mesa/drivers/dri/r300/r300_context.h b/src/mesa/drivers/dri/r300/r300_context.h index bc43953ff3..29436ab9e0 100644 --- a/src/mesa/drivers/dri/r300/r300_context.h +++ b/src/mesa/drivers/dri/r300/r300_context.h @@ -674,6 +674,11 @@ struct reg_lifetime { emitted instruction that writes to the register */ int vector_valid; int scalar_valid; + + /* Index to the slot where the register was last read. + This is also the first slot in which the register may be written again */ + int vector_lastread; + int scalar_lastread; }; -- cgit v1.2.3