nir_tex_instr *instr);
void nir_emit_jump(const brw::fs_builder &bld,
nir_jump_instr *instr);
- fs_reg get_nir_src(nir_src src);
- fs_reg get_nir_src_imm(nir_src src);
- fs_reg get_nir_dest(nir_dest dest);
+ fs_reg get_nir_src(const nir_src &src);
+ fs_reg get_nir_src_imm(const nir_src &src);
+ fs_reg get_nir_dest(const nir_dest &dest);
fs_reg get_nir_image_deref(const nir_deref_var *deref);
fs_reg get_indirect_offset(nir_intrinsic_instr *instr);
void emit_percomp(const brw::fs_builder &bld, const fs_inst &inst,
}
fs_reg
-fs_visitor::get_nir_src(nir_src src)
+fs_visitor::get_nir_src(const nir_src &src)
{
fs_reg reg;
if (src.is_ssa) {
* Return an IMM for constants; otherwise call get_nir_src() as normal.
*/
fs_reg
-fs_visitor::get_nir_src_imm(nir_src src)
+fs_visitor::get_nir_src_imm(const nir_src &src)
{
nir_const_value *val = nir_src_as_const_value(src);
return val ? fs_reg(brw_imm_d(val->i32[0])) : get_nir_src(src);
}
fs_reg
-fs_visitor::get_nir_dest(nir_dest dest)
+fs_visitor::get_nir_dest(const nir_dest &dest)
{
if (dest.is_ssa) {
const brw_reg_type reg_type =
virtual void nir_emit_undef(nir_ssa_undef_instr *instr);
virtual void nir_emit_ssbo_atomic(int op, nir_intrinsic_instr *instr);
- dst_reg get_nir_dest(nir_dest dest, enum brw_reg_type type);
- dst_reg get_nir_dest(nir_dest dest, nir_alu_type type);
- dst_reg get_nir_dest(nir_dest dest);
- src_reg get_nir_src(nir_src src, enum brw_reg_type type,
+ dst_reg get_nir_dest(const nir_dest &dest, enum brw_reg_type type);
+ dst_reg get_nir_dest(const nir_dest &dest, nir_alu_type type);
+ dst_reg get_nir_dest(const nir_dest &dest);
+ src_reg get_nir_src(const nir_src &src, enum brw_reg_type type,
unsigned num_components = 4);
- src_reg get_nir_src(nir_src src, nir_alu_type type,
+ src_reg get_nir_src(const nir_src &src, nir_alu_type type,
unsigned num_components = 4);
- src_reg get_nir_src(nir_src src,
+ src_reg get_nir_src(const nir_src &src,
unsigned num_components = 4);
src_reg get_indirect_offset(nir_intrinsic_instr *instr);
}
dst_reg
-vec4_visitor::get_nir_dest(nir_dest dest)
+vec4_visitor::get_nir_dest(const nir_dest &dest)
{
if (dest.is_ssa) {
dst_reg dst = dst_reg(VGRF, alloc.allocate(1));
}
dst_reg
-vec4_visitor::get_nir_dest(nir_dest dest, enum brw_reg_type type)
+vec4_visitor::get_nir_dest(const nir_dest &dest, enum brw_reg_type type)
{
return retype(get_nir_dest(dest), type);
}
dst_reg
-vec4_visitor::get_nir_dest(nir_dest dest, nir_alu_type type)
+vec4_visitor::get_nir_dest(const nir_dest &dest, nir_alu_type type)
{
return get_nir_dest(dest, brw_type_for_nir_type(type));
}
src_reg
-vec4_visitor::get_nir_src(nir_src src, enum brw_reg_type type,
+vec4_visitor::get_nir_src(const nir_src &src, enum brw_reg_type type,
unsigned num_components)
{
dst_reg reg;
}
src_reg
-vec4_visitor::get_nir_src(nir_src src, nir_alu_type type,
+vec4_visitor::get_nir_src(const nir_src &src, nir_alu_type type,
unsigned num_components)
{
return get_nir_src(src, brw_type_for_nir_type(type), num_components);
}
src_reg
-vec4_visitor::get_nir_src(nir_src src, unsigned num_components)
+vec4_visitor::get_nir_src(const nir_src &src, unsigned num_components)
{
/* if type is not specified, default to signed int */
return get_nir_src(src, nir_type_int, num_components);