The HW doesn't add the base level anywhere (the min/max lod clamping is
what does base level), so we need to add it manually in this case.
Fixes piglit tex-miplevel-selection *Lod 2D.
p0_unpacked.bias_supplied = true;
break;
case nir_tex_src_lod:
- /* XXX: Needs base level addition */
coords[next_coord++] =
- ntq_get_src(c, instr->src[i].src, 0);
+ vir_FADD(c,
+ ntq_get_src(c, instr->src[i].src, 0),
+ vir_uniform(c, QUNIFORM_TEXTURE_FIRST_LEVEL,
+ unit));
if (instr->op != nir_texop_txf &&
instr->op != nir_texop_tg4) {
break;
case QUNIFORM_TEXTURE_FIRST_LEVEL:
+ cl_aligned_f(&uniforms,
+ texstate->textures[uinfo->data[i]]->u.tex.first_level);
+ break;
+
case QUNIFORM_TEXTURE_BORDER_COLOR:
/* XXX */
break;