mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 13:48:06 +02:00
mesa/swrast: use one fewer divide in swrast's choose_cube_face also
Same change as for softpipe
This commit is contained in:
parent
fd19e8adcd
commit
67d4a5b15c
1 changed files with 6 additions and 2 deletions
|
|
@ -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];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue