.type = BI_SELECT,
.dest = bi_make_temp(ctx),
.dest_type = nir_type_int16,
- .src = { lod, BIR_INDEX_ZERO },
+ .src = { lod ? : BIR_INDEX_ZERO, BIR_INDEX_ZERO },
.src_types = { nir_type_int16, nir_type_int16 },
};
}
}
+ if (desc.op == BIFROST_TEX_OP_FETCH && !dregs[BIFROST_TEX_DREG_LOD])
+ dregs[BIFROST_TEX_DREG_LOD] = bi_emit_lod_cube(ctx, 0);
+
/* Allocate data registers contiguously. Index must not be marked SSA
* due to a quirk of RA for tied operands, could be fixed eventually */
bi_instruction combine = {