}
static inline nir_ssa_def *
-nir_build_imm(nir_builder *build, unsigned num_components, nir_const_value value)
+nir_build_imm(nir_builder *build, unsigned num_components,
+ unsigned bit_size, nir_const_value value)
{
nir_load_const_instr *load_const =
- nir_load_const_instr_create(build->shader, num_components, 32);
+ nir_load_const_instr_create(build->shader, num_components, bit_size);
if (!load_const)
return NULL;
memset(&v, 0, sizeof(v));
v.f32[0] = x;
- return nir_build_imm(build, 1, v);
+ return nir_build_imm(build, 1, 32, v);
}
static inline nir_ssa_def *
v.f32[2] = z;
v.f32[3] = w;
- return nir_build_imm(build, 4, v);
+ return nir_build_imm(build, 4, 32, v);
}
static inline nir_ssa_def *
memset(&v, 0, sizeof(v));
v.i32[0] = x;
- return nir_build_imm(build, 1, v);
+ return nir_build_imm(build, 1, 32, v);
}
static inline nir_ssa_def *
v.i32[2] = z;
v.i32[3] = w;
- return nir_build_imm(build, 4, v);
+ return nir_build_imm(build, 4, 32, v);
}
static inline nir_ssa_def *
nir_load_system_value(b, nir_intrinsic_load_local_invocation_id, 0);
sysval = nir_iadd(b, nir_imul(b, group_id,
- nir_build_imm(b, 3, local_size)),
+ nir_build_imm(b, 3, 32, local_size)),
local_id);
break;
}