summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorNicolai Haehnle <[email protected]>2007-03-25 13:02:26 +0200
committerNicolai Haehnle <[email protected]>2007-03-25 13:04:03 +0200
commit7143c61283e4b7bffcb27f220517ada2e2c857e5 (patch)
treeeb961ad7125b53d7dc426f0019ebe0e40d653010 /src/mesa/drivers
parent74ceaf545feb530a61f2de1554c32d6ef0bd46f8 (diff)
r300: Fix regression: unnecessary node indirection
The texture_rectangle fix introduced a bug where every texture instruction caused a new indirection.
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/r300/r300_fragprog.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_fragprog.c b/src/mesa/drivers/dri/r300/r300_fragprog.c
index 68a75ec7f00..e01f56d99df 100644
--- a/src/mesa/drivers/dri/r300/r300_fragprog.c
+++ b/src/mesa/drivers/dri/r300/r300_fragprog.c
@@ -934,6 +934,9 @@ static void emit_tex(struct r300_fragment_program *rp,
int hwsrc, hwdest;
GLuint tempreg = 0;
+ uin = cs->used_in_node;
+ din = cs->dest_in_node;
+
/* Resolve source/dest to hardware registers */
if (opcode != R300_FPITX_OP_KIL) {
if (fpi->TexSrcTarget == TEXTURE_RECT_INDEX) {
@@ -958,6 +961,10 @@ static void emit_tex(struct r300_fragment_program *rp,
emit_arith(rp, PFS_OP_MAD, tempreg, WRITEMASK_XYZW,
coord, factorreg, pfs_zero, 0);
+ /* Ensure correct node indirection */
+ uin = cs->used_in_node;
+ din = cs->dest_in_node;
+
hwsrc = t_hw_src(rp, tempreg, GL_TRUE);
} else {
hwsrc = t_hw_src(rp, coord, GL_TRUE);
@@ -986,8 +993,6 @@ static void emit_tex(struct r300_fragment_program *rp,
hwsrc = t_hw_src(rp, coord, GL_TRUE);
}
- din = cs->dest_in_node;
- uin = cs->used_in_node;
/* Indirection if source has been written in this node, or if the
* dest has been read/written in this node