aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_blit.c
diff options
context:
space:
mode:
authorDylan Baker <[email protected]>2018-09-06 15:49:35 -0700
committerDylan Baker <[email protected]>2020-04-21 11:09:03 -0700
commit9d9a2819ee0e862f60abf50ba239a341b664845a (patch)
treee4c3e833504aa357913ba2919dacc9a116bb3517 /src/mesa/swrast/s_blit.c
parent72acb66527df6f38c7b8b15fa5062a616d67074b (diff)
replace IFLOOR with util_ifloor
which are exactly the same function with exactly the same implementation 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_blit.c')
-rw-r--r--src/mesa/swrast/s_blit.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mesa/swrast/s_blit.c b/src/mesa/swrast/s_blit.c
index 557f107b536..362d4daad17 100644
--- a/src/mesa/swrast/s_blit.c
+++ b/src/mesa/swrast/s_blit.c
@@ -409,7 +409,7 @@ resample_linear_row_ub(GLint srcWidth, GLint dstWidth,
for (dstCol = 0; dstCol < dstWidth; dstCol++) {
const GLfloat srcCol = (dstCol + 0.5F) / dstWidth * srcWidth - 0.5F;
- GLint srcCol0 = MAX2(0, IFLOOR(srcCol));
+ GLint srcCol0 = MAX2(0, util_ifloor(srcCol));
GLint srcCol1 = srcCol0 + 1;
GLfloat colWeight = srcCol - srcCol0; /* fractional part of srcCol */
GLfloat red, green, blue, alpha;
@@ -441,10 +441,10 @@ resample_linear_row_ub(GLint srcWidth, GLint dstWidth,
srcColor0[srcCol0][ACOMP], srcColor0[srcCol1][ACOMP],
srcColor1[srcCol0][ACOMP], srcColor1[srcCol1][ACOMP]);
- dstColor[dstCol][RCOMP] = IFLOOR(red);
- dstColor[dstCol][GCOMP] = IFLOOR(green);
- dstColor[dstCol][BCOMP] = IFLOOR(blue);
- dstColor[dstCol][ACOMP] = IFLOOR(alpha);
+ dstColor[dstCol][RCOMP] = util_ifloor(red);
+ dstColor[dstCol][GCOMP] = util_ifloor(green);
+ dstColor[dstCol][BCOMP] = util_ifloor(blue);
+ dstColor[dstCol][ACOMP] = util_ifloor(alpha);
}
}
@@ -464,7 +464,7 @@ resample_linear_row_float(GLint srcWidth, GLint dstWidth,
for (dstCol = 0; dstCol < dstWidth; dstCol++) {
const GLfloat srcCol = (dstCol + 0.5F) / dstWidth * srcWidth - 0.5F;
- GLint srcCol0 = MAX2(0, IFLOOR(srcCol));
+ GLint srcCol0 = MAX2(0, util_ifloor(srcCol));
GLint srcCol1 = srcCol0 + 1;
GLfloat colWeight = srcCol - srcCol0; /* fractional part of srcCol */
GLfloat red, green, blue, alpha;
@@ -630,7 +630,7 @@ blit_linear(struct gl_context *ctx,
for (dstRow = 0; dstRow < dstHeight; dstRow++) {
const GLint dstY = dstYpos + dstRow;
GLfloat srcRow = (dstRow + 0.5F) / dstHeight * srcHeight - 0.5F;
- GLint srcRow0 = MAX2(0, IFLOOR(srcRow));
+ GLint srcRow0 = MAX2(0, util_ifloor(srcRow));
GLint srcRow1 = srcRow0 + 1;
GLfloat rowWeight = srcRow - srcRow0; /* fractional part of srcRow */