aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
index 9961ba08f3a..4ea7b4bd8a2 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
@@ -943,6 +943,7 @@ lp_build_sample_general(struct lp_build_sample_context *bld,
LLVMValueRef ilevel0, ilevel1 = NULL;
LLVMValueRef face_ddx[4], face_ddy[4];
LLVMValueRef texels[4];
+ LLVMValueRef first_level;
LLVMValueRef i32t_zero = lp_build_const_int32(bld->gallivm, 0);
unsigned chan;
@@ -1009,7 +1010,9 @@ lp_build_sample_general(struct lp_build_sample_context *bld,
lp_build_nearest_mip_level(bld, unit, lod_ipart, &ilevel0);
}
else {
- ilevel0 = i32t_zero;
+ first_level = bld->dynamic_state->first_level(bld->dynamic_state,
+ bld->gallivm, unit);
+ ilevel0 = first_level;
}
break;
case PIPE_TEX_MIPFILTER_NEAREST:
@@ -1068,7 +1071,7 @@ lp_build_sample_general(struct lp_build_sample_context *bld,
lp_build_sample_mipmap(bld, unit,
mag_filter, PIPE_TEX_MIPFILTER_NONE,
s, t, r,
- i32t_zero, NULL, NULL,
+ ilevel0, NULL, NULL,
texels);
}
lp_build_endif(&if_ctx);