LLVMGetUndef(bld_base->base.vec_type),
LLVMGetUndef(bld_base->base.vec_type),
LLVMGetUndef(bld_base->base.vec_type) };
- LLVMValueRef texel[4], orig_offset;
+ LLVMValueRef texel[4], orig_offset, orig_lod;
unsigned i;
orig_texel_ptr = params->texel;
-
+ orig_lod = params->lod;
for (i = 0; i < 5; i++) {
coords[i] = params->coords[i];
}
idx, "");
params->type = lp_elem_type(bld_base->base.type);
+ if (orig_lod)
+ params->lod = LLVMBuildExtractElement(gallivm->builder, orig_lod, idx, "");
params->texel = texel;
bld->sampler->emit_tex_sample(bld->sampler,
gallivm,