{
LLVMValueRef maxlayer;
- layer = lp_build_iround(&bld->coord_bld, layer);
maxlayer = bld->dynamic_state->depth(bld->dynamic_state,
bld->gallivm, unit);
maxlayer = lp_build_sub(&bld->int_bld, maxlayer, bld->int_bld.one);
derivs = &face_derivs;
}
else if (target == PIPE_TEXTURE_1D_ARRAY) {
- *r = lp_build_layer_coord(bld, unit, *t);
+ *r = lp_build_iround(&bld->coord_bld, *t);
+ *r = lp_build_layer_coord(bld, unit, *r);
}
else if (target == PIPE_TEXTURE_2D_ARRAY) {
+ *r = lp_build_iround(&bld->coord_bld, *r);
*r = lp_build_layer_coord(bld, unit, *r);
}