diff options
author | Brian <brian.paul@tungstengraphics.com> | 2007-11-08 15:02:42 -0700 |
---|---|---|
committer | Brian <brian.paul@tungstengraphics.com> | 2007-11-08 15:02:42 -0700 |
commit | f66fed57e65c518c751dc71ca26439ac76313ce9 (patch) | |
tree | 4a2e88fd9853e2304f6b9a0844f2821a50f8c55a /src/mesa/pipe | |
parent | 3d8c05f7320151898dd224c1daaf3118e1f7ea34 (diff) |
For TGSI_TEXTURE_2D/RECT, need to provide 3 coords (STP) in case shadow compare mode is enabled.
Diffstat (limited to 'src/mesa/pipe')
-rw-r--r-- | src/mesa/pipe/tgsi/exec/tgsi_exec.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/mesa/pipe/tgsi/exec/tgsi_exec.c b/src/mesa/pipe/tgsi/exec/tgsi_exec.c index 3494b21599..5c2fecb3e3 100644 --- a/src/mesa/pipe/tgsi/exec/tgsi_exec.c +++ b/src/mesa/pipe/tgsi/exec/tgsi_exec.c @@ -1253,12 +1253,14 @@ exec_tex(struct tgsi_exec_machine *mach, FETCH(&r[0], 0, CHAN_X); FETCH(&r[1], 0, CHAN_Y); + FETCH(&r[2], 0, CHAN_Z); switch (inst->FullSrcRegisters[0].SrcRegisterExtSwz.ExtDivide) { case TGSI_EXTSWIZZLE_W: - FETCH(&r[2], 0, CHAN_W); - micro_div( &r[0], &r[0], &r[2] ); - micro_div( &r[1], &r[1], &r[2] ); + FETCH(&r[3], 0, CHAN_W); + micro_div( &r[0], &r[0], &r[3] ); + micro_div( &r[1], &r[1], &r[3] ); + micro_div( &r[2], &r[2], &r[3] ); break; case TGSI_EXTSWIZZLE_ONE: @@ -1269,15 +1271,15 @@ exec_tex(struct tgsi_exec_machine *mach, } if (biasLod) { - FETCH(&r[2], 0, CHAN_W); - lodBias = r[2].f[0]; + FETCH(&r[3], 0, CHAN_W); + lodBias = r[3].f[0]; } else lodBias = 0.0; fetch_texel(&mach->Samplers[unit], - &r[0], &r[1], NULL, lodBias, - &r[0], &r[1], &r[2], &r[3]); + &r[0], &r[1], &r[2], lodBias, /* inputs */ + &r[0], &r[1], &r[2], &r[3]); /* outputs */ break; case TGSI_TEXTURE_3D: |