diff options
author | Nicolai Hähnle <nhaehnle@gmail.com> | 2009-07-16 19:57:43 +0200 |
---|---|---|
committer | Nicolai Hähnle <nhaehnle@gmail.com> | 2009-07-27 20:32:02 +0200 |
commit | cb8c694adb8e0a9e1d357cac9cf7a7ce263df3ae (patch) | |
tree | 0dbdaf275b4c70b9923eaaf0c14d62ae9f7fd94d /src/mesa/drivers/dri/r300/compiler/radeon_program_pair.c | |
parent | 78f88d8b8799f013e4ab3abc87666b25071ed917 (diff) |
r300/program_pair: Introduce driver-specific texture instruction structure
This is to prepare more experimentation and possible internal changes in the
compiler.
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
Diffstat (limited to 'src/mesa/drivers/dri/r300/compiler/radeon_program_pair.c')
-rw-r--r-- | src/mesa/drivers/dri/r300/compiler/radeon_program_pair.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_program_pair.c b/src/mesa/drivers/dri/r300/compiler/radeon_program_pair.c index 6ce6b4d8ff..3274c83d4d 100644 --- a/src/mesa/drivers/dri/r300/compiler/radeon_program_pair.c +++ b/src/mesa/drivers/dri/r300/compiler/radeon_program_pair.c @@ -602,7 +602,25 @@ static void emit_all_tex(struct pair_state *s) _mesa_print_instruction(inst); fflush(stdout); } - s->Error = s->Error || !s->Handler->EmitTex(s->UserData, inst); + + struct radeon_pair_texture_instruction rpti; + + switch(inst->Opcode) { + case OPCODE_TEX: rpti.Opcode = RADEON_OPCODE_TEX; break; + case OPCODE_TXB: rpti.Opcode = RADEON_OPCODE_TXB; break; + case OPCODE_TXP: rpti.Opcode = RADEON_OPCODE_TXP; break; + default: + case OPCODE_KIL: rpti.Opcode = RADEON_OPCODE_KIL; break; + } + + rpti.DestIndex = inst->DstReg.Index; + rpti.WriteMask = inst->DstReg.WriteMask; + rpti.TexSrcUnit = inst->TexSrcUnit; + rpti.TexSrcTarget = inst->TexSrcTarget; + rpti.SrcIndex = inst->SrcReg[0].Index; + rpti.SrcSwizzle = inst->SrcReg[0].Swizzle; + + s->Error = s->Error || !s->Handler->EmitTex(s->UserData, &rpti); } if (s->Debug) |