else
return NULL;
- case nir_instr_type_texture:
- tex_instr = nir_instr_as_texture(instr);
+ case nir_instr_type_tex:
+ tex_instr = nir_instr_as_tex(instr);
return &tex_instr->dest;
case nir_instr_type_load_const:
nir_tex_instr_create(void *mem_ctx, unsigned num_srcs)
{
nir_tex_instr *instr = ralloc(mem_ctx, nir_tex_instr);
- instr_init(&instr->instr, nir_instr_type_texture);
+ instr_init(&instr->instr, nir_instr_type_tex);
dest_init(&instr->dest);
return visit_alu_dest(nir_instr_as_alu(instr), cb, state);
case nir_instr_type_intrinsic:
return visit_intrinsic_dest(nir_instr_as_intrinsic(instr), cb, state);
- case nir_instr_type_texture:
- return visit_texture_dest(nir_instr_as_texture(instr), cb, state);
+ case nir_instr_type_tex:
+ return visit_texture_dest(nir_instr_as_tex(instr), cb, state);
case nir_instr_type_load_const:
return visit_load_const_dest(nir_instr_as_load_const(instr), cb, state);
case nir_instr_type_phi:
if (!visit_intrinsic_src(nir_instr_as_intrinsic(instr), cb, state))
return false;
break;
- case nir_instr_type_texture:
- if (!visit_tex_src(nir_instr_as_texture(instr), cb, state))
+ case nir_instr_type_tex:
+ if (!visit_tex_src(nir_instr_as_tex(instr), cb, state))
return false;
break;
case nir_instr_type_call:
typedef enum {
nir_instr_type_alu,
nir_instr_type_call,
- nir_instr_type_texture,
+ nir_instr_type_tex,
nir_instr_type_intrinsic,
nir_instr_type_load_const,
nir_instr_type_jump,
NIR_DEFINE_CAST(nir_instr_as_alu, nir_instr, nir_alu_instr, instr)
NIR_DEFINE_CAST(nir_instr_as_call, nir_instr, nir_call_instr, instr)
NIR_DEFINE_CAST(nir_instr_as_jump, nir_instr, nir_jump_instr, instr)
-NIR_DEFINE_CAST(nir_instr_as_texture, nir_instr, nir_tex_instr, instr)
+NIR_DEFINE_CAST(nir_instr_as_tex, nir_instr, nir_tex_instr, instr)
NIR_DEFINE_CAST(nir_instr_as_intrinsic, nir_instr, nir_intrinsic_instr, instr)
NIR_DEFINE_CAST(nir_instr_as_load_const, nir_instr, nir_load_const_instr, instr)
NIR_DEFINE_CAST(nir_instr_as_ssa_undef, nir_instr, nir_ssa_undef_instr, instr)
lower_state *state = (lower_state *) _state;
nir_foreach_instr(block, instr) {
- if (instr->type == nir_instr_type_texture) {
- nir_tex_instr *tex_instr = nir_instr_as_texture(instr);
+ if (instr->type == nir_instr_type_tex) {
+ nir_tex_instr *tex_instr = nir_instr_as_tex(instr);
lower_sampler(tex_instr, state->shader_program, state->prog);
}
}
}
return true;
}
- case nir_instr_type_texture:
+ case nir_instr_type_tex:
return false;
case nir_instr_type_load_const: {
nir_load_const_instr *load1 = nir_instr_as_load_const(instr1);
case nir_instr_type_phi:
return nir_foreach_dest(instr, dest_is_ssa, NULL) &&
nir_foreach_src(instr, src_is_ssa, NULL);
- case nir_instr_type_texture:
+ case nir_instr_type_tex:
return false; /* TODO */
case nir_instr_type_intrinsic:
case nir_instr_type_call:
}
break;
- case nir_instr_type_texture:
- tex_instr = nir_instr_as_texture(instr);
+ case nir_instr_type_tex:
+ tex_instr = nir_instr_as_tex(instr);
if (!tex_instr->dest.is_ssa)
worklist_push(worklist, instr);
break;
print_intrinsic_instr(nir_instr_as_intrinsic(instr), state, fp);
break;
- case nir_instr_type_texture:
- print_tex_instr(nir_instr_as_texture(instr), state, fp);
+ case nir_instr_type_tex:
+ print_tex_instr(nir_instr_as_tex(instr), state, fp);
break;
case nir_instr_type_load_const:
add_var_use_call(nir_instr_as_call(instr), live);
break;
- case nir_instr_type_texture:
- add_var_use_tex(nir_instr_as_texture(instr), live);
+ case nir_instr_type_tex:
+ add_var_use_tex(nir_instr_as_tex(instr), live);
break;
default:
else
return NULL;
- case nir_instr_type_texture:
- tex_instr = nir_instr_as_texture(instr);
+ case nir_instr_type_tex:
+ tex_instr = nir_instr_as_tex(instr);
if (tex_instr->has_predicate)
return &tex_instr->predicate;
else
validate_intrinsic_instr(nir_instr_as_intrinsic(instr), state);
break;
- case nir_instr_type_texture:
- validate_tex_instr(nir_instr_as_texture(instr), state);
+ case nir_instr_type_tex:
+ validate_tex_instr(nir_instr_as_tex(instr), state);
break;
case nir_instr_type_load_const:
nir_emit_intrinsic(nir_instr_as_intrinsic(instr));
break;
- case nir_instr_type_texture:
- nir_emit_texture(nir_instr_as_texture(instr));
+ case nir_instr_type_tex:
+ nir_emit_texture(nir_instr_as_tex(instr));
break;
case nir_instr_type_load_const: