diff options
author | Keith Whitwell <[email protected]> | 2009-09-23 17:37:28 +0100 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2009-09-23 17:37:28 +0100 |
commit | 890679d4322e7ba4f12f32532a3fdd277edff886 (patch) | |
tree | 37df5e8a53f7da9fdcaf2e9660c694e28e14b5bc /src/mesa/swrast | |
parent | a1fa770c01d913658900de1c267fb4c41bc6300d (diff) | |
parent | 75276ea316610a5737f2115326482024aa09d02a (diff) |
Merge branch 'softpipe-opt'
Conflicts:
progs/demos/cubemap.c
src/gallium/drivers/softpipe/sp_tex_sample.c
src/gallium/drivers/softpipe/sp_texture.c
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r-- | src/mesa/swrast/s_texfilter.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mesa/swrast/s_texfilter.c b/src/mesa/swrast/s_texfilter.c index efe6f234740..004d4e05ae5 100644 --- a/src/mesa/swrast/s_texfilter.c +++ b/src/mesa/swrast/s_texfilter.c @@ -1905,8 +1905,12 @@ choose_cube_face(const struct gl_texture_object *texObj, } } - newCoord[0] = ( sc / ma + 1.0F ) * 0.5F; - newCoord[1] = ( tc / ma + 1.0F ) * 0.5F; + { + const float ima = 1.0F / ma; + newCoord[0] = ( sc * ima + 1.0F ) * 0.5F; + newCoord[1] = ( tc * ima + 1.0F ) * 0.5F; + } + return (const struct gl_texture_image **) texObj->Image[face]; } |