diff options
author | Brian Paul <[email protected]> | 2008-10-10 16:36:40 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2008-10-10 16:40:03 -0600 |
commit | 01e312a73b68dc5ddffca0d1b1472fc5dcb6f59e (patch) | |
tree | d6047a94b00deb998afbdc4488e9bfd3797df8cb /src/gallium/drivers/cell/ppu | |
parent | 33ff407874d6fed998b1f01dab68a2b4f1df988a (diff) |
cell: pass texture unit (sampler number) to txp() function
The glsl/multitex demo runs now.
Diffstat (limited to 'src/gallium/drivers/cell/ppu')
-rw-r--r-- | src/gallium/drivers/cell/ppu/cell_gen_fp.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/cell/ppu/cell_gen_fp.c b/src/gallium/drivers/cell/ppu/cell_gen_fp.c index 3d0e7976dfb..ef84059d8f5 100644 --- a/src/gallium/drivers/cell/ppu/cell_gen_fp.c +++ b/src/gallium/drivers/cell/ppu/cell_gen_fp.c @@ -1285,9 +1285,12 @@ static boolean emit_TXP(struct codegen *gen, const struct tgsi_full_instruction *inst) { const uint addr = lookup_function(gen->cell, "spu_txp"); + const uint unit = inst->FullSrcRegisters[1].SrcRegister.Index; int ch; int coord_regs[4], d_regs[4]; + assert(inst->FullSrcRegisters[1].SrcRegister.File == TGSI_FILE_SAMPLER); + spe_comment(gen->f, -4, "CALL txp:"); /* get src/dst reg info */ @@ -1314,6 +1317,7 @@ emit_TXP(struct codegen *gen, const struct tgsi_full_instruction *inst) for (i = 0; i < 4; i++) { spe_move(gen->f, 3 + i, coord_regs[i]); } + spe_load_uint(gen->f, 7, unit); /* sampler unit */ /* branch to function, save return addr */ spe_brasl(gen->f, SPE_REG_RA, addr); |