*/
assert(dst_pos->num_components == 2);
nir_ssa_def *dst_x = nir_channel(&b, dst_pos, 0);
- comp = nir_umod(&b, dst_x, nir_imm_int(&b, 3));
+ comp = nir_umod_imm(&b, dst_x, 3);
dst_pos = nir_vec2(&b, nir_idiv(&b, dst_x, nir_imm_int(&b, 3)),
nir_channel(&b, dst_pos, 1));
}
if (clear_rgb_as_red) {
nir_ssa_def *pos = nir_f2i32(&b, nir_load_frag_coord(&b));
- nir_ssa_def *comp = nir_umod(&b, nir_channel(&b, pos, 0),
- nir_imm_int(&b, 3));
+ nir_ssa_def *comp = nir_umod_imm(&b, nir_channel(&b, pos, 0), 3);
color = nir_pad_vec4(&b, nir_vector_extract(&b, color, comp));
}
nir_ssa_def *in_bounds = blorp_check_in_bounds(&b, bounds_rect, dst_pos);
if (clear_rgb_as_red) {
- nir_ssa_def *comp = nir_umod(&b, nir_channel(&b, dst_pos, 0),
- nir_imm_int(&b, 3));
+ nir_ssa_def *comp = nir_umod_imm(&b, nir_channel(&b, dst_pos, 0), 3);
color = nir_pad_vec4(&b, nir_vector_extract(&b, color, comp));
}
* that to an actual view id.
*/
nir_ssa_def *compacted =
- nir_umod(b, nir_load_instance_id(b),
- nir_imm_int(b, util_bitcount(state->view_mask)));
+ nir_umod_imm(b, nir_load_instance_id(b),
+ util_bitcount(state->view_mask));
if (util_is_power_of_two_or_zero(state->view_mask + 1)) {
/* If we have a full view mask, then compacted is what we want */
* that to an actual view id.
*/
nir_ssa_def *compacted =
- nir_umod(b, nir_load_instance_id(b),
- nir_imm_int(b, util_bitcount(state->view_mask)));
+ nir_umod_imm(b, nir_load_instance_id(b),
+ util_bitcount(state->view_mask));
if (util_is_power_of_two_or_zero(state->view_mask + 1)) {
/* If we have a full view mask, then compacted is what we want */