projects
/
profile
/
ivi
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fd19e8a
)
mesa/swrast: use one fewer divide in swrast's choose_cube_face also
author
Keith Whitwell
<keithw@vmware.com>
Sun, 23 Aug 2009 22:50:27 +0000
(23:50 +0100)
committer
Keith Whitwell
<keithw@vmware.com>
Mon, 24 Aug 2009 07:26:33 +0000
(08:26 +0100)
Same change as for softpipe
src/mesa/swrast/s_texfilter.c
patch
|
blob
|
history
diff --git
a/src/mesa/swrast/s_texfilter.c
b/src/mesa/swrast/s_texfilter.c
index
6b1f934
..
216c107
100644
(file)
--- 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];
}