diff options
author | Corbin Simpson <MostAwesomeDude@gmail.com> | 2009-03-16 17:00:27 -0700 |
---|---|---|
committer | Corbin Simpson <MostAwesomeDude@gmail.com> | 2009-03-17 02:13:03 -0700 |
commit | 175f58baa9a758919163f9ada79306294e4139ce (patch) | |
tree | a5970ff8cb8a0d6d6682c4f1e90b6c14acbe4c1a /src/gallium/drivers/r300 | |
parent | 307e68f73996160cdf4a05a84c112e11e0d7a3c2 (diff) |
r300-gallium: r500-fs: Properly set up TEX/OUT.
Diffstat (limited to 'src/gallium/drivers/r300')
-rw-r--r-- | src/gallium/drivers/r300/r300_state_shader.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/gallium/drivers/r300/r300_state_shader.c b/src/gallium/drivers/r300/r300_state_shader.c index 7803494130..0b600b9f51 100644 --- a/src/gallium/drivers/r300/r300_state_shader.c +++ b/src/gallium/drivers/r300/r300_state_shader.c @@ -350,11 +350,21 @@ static INLINE void r500_emit_tex(struct r500_fragment_shader* fs, if (dst->DstRegister.File == TGSI_FILE_OUTPUT) { fs->instructions[i].inst2 |= - R500_TEX_DST_ADDR(assembler->temp_offset + - assembler->temp_count); - } + R500_TEX_DST_ADDR(assembler->temp_count + + assembler->temp_offset); - fs->instruction_count++; + fs->instruction_count++; + + /* Setup and emit a MOV. */ + src[0].SrcRegister.Index = assembler->temp_count; + src[0].SrcRegister.File = TGSI_FILE_TEMPORARY; + + src[1] = src[0]; + src[2] = r500_constant_zero; + r500_emit_maths(fs, assembler, src, dst, TGSI_OPCODE_MOV, 3); + } else { + fs->instruction_count++; + } } static void r500_fs_instruction(struct r500_fragment_shader* fs, |