summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/softpipe/sp_tex_sample.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-08-22 15:25:21 -0600
committerBrian Paul <brian.paul@tungstengraphics.com>2008-08-22 15:25:21 -0600
commit1a46dcc8a927dfb38ca1381e7b3dafb789f8257c (patch)
tree2f8fdae0e1e2858b73ca012f485777362792778e /src/gallium/drivers/softpipe/sp_tex_sample.c
parent1c2ff4d9e65563c071747a9c3bd907bd24706da0 (diff)
gallium: replace LOG2() macro with util_fast_log2() inline func
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_tex_sample.c')
-rw-r--r--src/gallium/drivers/softpipe/sp_tex_sample.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/softpipe/sp_tex_sample.c b/src/gallium/drivers/softpipe/sp_tex_sample.c
index 01f4d0ca81..d7680ffa81 100644
--- a/src/gallium/drivers/softpipe/sp_tex_sample.c
+++ b/src/gallium/drivers/softpipe/sp_tex_sample.c
@@ -41,6 +41,7 @@
#include "pipe/p_defines.h"
#include "pipe/p_util.h"
#include "tgsi/tgsi_exec.h"
+#include "util/u_math.h"
/*
@@ -499,7 +500,7 @@ compute_lambda(struct tgsi_sampler *sampler,
rho = MAX2(rho, max);
}
- lambda = LOG2(rho);
+ lambda = util_fast_log2(rho);
lambda += lodbias + sampler->state->lod_bias;
lambda = CLAMP(lambda, sampler->state->min_lod, sampler->state->max_lod);