diff options
author | Brian Paul <[email protected]> | 2008-10-14 12:52:16 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2008-10-14 12:54:31 -0600 |
commit | 4f56d5bbf2e52c815c820138eaad6c0fb93d47ba (patch) | |
tree | 9520b2d1a57bc065b4dfa5a0d28e067aa29260fa /src/gallium | |
parent | 6d2d5ceca21c87bea5e269e8099fb6f1d821b97a (diff) |
cell: fix broken negative texcoord conversion
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/cell/spu/spu_texture.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/drivers/cell/spu/spu_texture.c b/src/gallium/drivers/cell/spu/spu_texture.c index 267f2302f60..83cf7dc3942 100644 --- a/src/gallium/drivers/cell/spu/spu_texture.c +++ b/src/gallium/drivers/cell/spu/spu_texture.c @@ -138,8 +138,8 @@ sample_texture4_bilinear(vector float s, vector float t, vector float ss = spu_madd(s, spu.texture[unit].level[level].width4, spu_splats(-0.5f)); vector float tt = spu_madd(t, spu.texture[unit].level[level].height4, spu_splats(-0.5f)); - vector unsigned int is0 = spu_convtu(ss, 0); - vector unsigned int it0 = spu_convtu(tt, 0); + vector unsigned int is0 = (vector unsigned int) spu_convts(ss, 0); + vector unsigned int it0 = (vector unsigned int) spu_convts(tt, 0); /* is + 1, it + 1 */ vector unsigned int is1 = spu_add(is0, 1); @@ -281,8 +281,8 @@ sample_texture4_bilinear_2(vector float s, vector float t, vector float tt = spu_madd(t, spu.texture[unit].level[level].height4, half); /* convert float coords to fixed-pt coords with 8 fraction bits */ - vector unsigned int is = spu_convtu(ss, 8); - vector unsigned int it = spu_convtu(tt, 8); + vector unsigned int is = (vector unsigned int) spu_convts(ss, 8); + vector unsigned int it = (vector unsigned int) spu_convts(tt, 8); /* compute integer texel weights in [0, 255] */ vector signed int sWeights0 = spu_and((vector signed int) is, 255); |