r600g: fix relative addressing when splitting constant accesses
authorStephan Schmid <stephan_2303@gmx.de>
Mon, 11 Oct 2010 13:49:56 +0000 (15:49 +0200)
committerDave Airlie <airlied@redhat.com>
Wed, 13 Oct 2010 08:49:27 +0000 (18:49 +1000)
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/gallium/drivers/r600/r600_shader.c

index 8930d4e1831812509aef65fc23991cbd238d9b67..470f355cde275aeed3e5bac0d3dc074910694844 100644 (file)
@@ -808,6 +808,7 @@ static int tgsi_split_constant(struct r600_shader_ctx *ctx, struct r600_bc_alu_s
                                alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MOV);
                                alu.src[0].sel = r600_src[i].sel;
                                alu.src[0].chan = k;
+                               alu.src[0].rel = r600_src[i].rel;
                                alu.dst.sel = treg;
                                alu.dst.chan = k;
                                alu.dst.write = 1;
@@ -818,6 +819,7 @@ static int tgsi_split_constant(struct r600_shader_ctx *ctx, struct r600_bc_alu_s
                                        return r;
                        }
                        r600_src[i].sel = treg;
+                       r600_src[i].rel =0;
                        j--;
                }
        }