summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/gallivm/lp_bld_sample.c
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2010-10-10 18:47:24 +0100
committerJosé Fonseca <jfonseca@vmware.com>2010-10-10 18:48:02 +0100
commit48003f3567d2732cfab08186934c4261c0447c9c (patch)
tree0eb44d65d9ec59ede12ac1203adf7483f6f08014 /src/gallium/auxiliary/gallivm/lp_bld_sample.c
parent124adf253c5cd4940088ca2f10bc12da30375683 (diff)
gallivm: Allow to disable bri-linear filtering with GALLIVM_DEBUG=no_brilinear runtime option
Diffstat (limited to 'src/gallium/auxiliary/gallivm/lp_bld_sample.c')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_sample.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample.c b/src/gallium/auxiliary/gallivm/lp_bld_sample.c
index 1a27a24118..9d15a6f4da 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_sample.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_sample.c
@@ -47,8 +47,7 @@
/*
- * Bri-linear factor. Use zero or any other number less than one to force
- * tri-linear filtering.
+ * Bri-linear factor. Should be greater than one.
*/
#define BRILINEAR_FACTOR 2
@@ -464,7 +463,7 @@ lp_build_lod_selector(struct lp_build_sample_context *bld,
return;
}
if (mip_filter == PIPE_TEX_MIPFILTER_LINEAR &&
- BRILINEAR_FACTOR > 1.0) {
+ !(gallivm_debug & GALLIVM_DEBUG_NO_BRILINEAR)) {
lp_build_brilinear_rho(float_bld, rho, BRILINEAR_FACTOR,
out_lod_ipart, out_lod_fpart);
return;
@@ -507,7 +506,7 @@ lp_build_lod_selector(struct lp_build_sample_context *bld,
}
if (mip_filter == PIPE_TEX_MIPFILTER_LINEAR) {
- if (BRILINEAR_FACTOR > 1.0) {
+ if (!(gallivm_debug & GALLIVM_DEBUG_NO_BRILINEAR)) {
lp_build_brilinear_lod(float_bld, lod, BRILINEAR_FACTOR,
out_lod_ipart, out_lod_fpart);
}