+
+ /* add potential cube/array/mip offsets now as they are constant per pixel */
+ if (bld->static_state->target == PIPE_TEXTURE_CUBE ||
+ bld->static_state->target == PIPE_TEXTURE_1D_ARRAY ||
+ bld->static_state->target == PIPE_TEXTURE_2D_ARRAY) {
+ LLVMValueRef z_offset;
+ z_offset = lp_build_mul(&bld->int_coord_bld, r, img_stride_vec);
+ /* The r coord is the cube face in [0,5] or array layer */
+ x_offset0 = lp_build_add(&bld->int_coord_bld, x_offset0, z_offset);
+ x_offset1 = lp_build_add(&bld->int_coord_bld, x_offset1, z_offset);
+ }