aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_aatriangle.c
diff options
context:
space:
mode:
authorDylan Baker <[email protected]>2018-09-07 14:44:05 -0700
committerDylan Baker <[email protected]>2020-04-21 11:09:03 -0700
commit64014c8302da52480643cb7711298153cfdb0d51 (patch)
treeb95d0cc34255ceb05962582bfd5266b76088a2af /src/mesa/swrast/s_aatriangle.c
parent9d9a2819ee0e862f60abf50ba239a341b664845a (diff)
Replace IROUND_POS with _mesa_roundevenf
Which has the same behavior as long as you don't change the FPU rounding mode. Other code in mesa makes the same assumption so it should be safe to make that assumption more generally. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Matt Turner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3024>
Diffstat (limited to 'src/mesa/swrast/s_aatriangle.c')
-rw-r--r--src/mesa/swrast/s_aatriangle.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mesa/swrast/s_aatriangle.c b/src/mesa/swrast/s_aatriangle.c
index 952bfb1a177..342b6e9f3ae 100644
--- a/src/mesa/swrast/s_aatriangle.c
+++ b/src/mesa/swrast/s_aatriangle.c
@@ -31,7 +31,6 @@
#include "main/glheader.h"
#include "main/context.h"
#include "main/macros.h"
-#include "util/imports.h"
#include "main/state.h"
#include "s_aatriangle.h"
#include "s_context.h"
@@ -124,7 +123,7 @@ solve_plane_chan(GLfloat x, GLfloat y, const GLfloat plane[4])
return 0;
else if (z > CHAN_MAX)
return CHAN_MAX;
- return (GLchan) IROUND_POS(z);
+ return (GLchan) lroundf(z);
#endif
}