Home
last modified time | relevance | path

Searched refs:intrin (Results 1 – 25 of 52) sorted by relevance

123

/external/mesa3d/src/compiler/nir/
Dnir_lower_io.c158 lower_load(nir_intrinsic_instr *intrin, struct lower_io_state *state, in lower_load() argument
163 nir_variable *var = intrin->variables[0]->var; in lower_load()
208 load->num_components = intrin->num_components; in lower_load()
231 lower_store(nir_intrinsic_instr *intrin, struct lower_io_state *state, in lower_store() argument
235 nir_variable *var = intrin->variables[0]->var; in lower_store()
249 store->num_components = intrin->num_components; in lower_store()
251 nir_src_copy(&store->src[0], &intrin->src[0], store); in lower_store()
258 nir_intrinsic_set_write_mask(store, nir_intrinsic_write_mask(intrin)); in lower_store()
269 lower_atomic(nir_intrinsic_instr *intrin, struct lower_io_state *state, in lower_atomic() argument
272 nir_variable *var = intrin->variables[0]->var; in lower_atomic()
[all …]
Dnir_opt_copy_prop_vars.c378 nir_builder *b, nir_intrinsic_instr *intrin, in load_from_ssa_entry_value() argument
399 b->cursor = instr_remove_cursor(&intrin->instr); in load_from_ssa_entry_value()
400 intrin->instr.block = NULL; in load_from_ssa_entry_value()
405 intrin->intrinsic == nir_intrinsic_load_var && in load_from_ssa_entry_value()
406 (available & nir_ssa_def_components_read(&intrin->dest.ssa)) == 0) { in load_from_ssa_entry_value()
414 b->cursor = nir_after_instr(&intrin->instr); in load_from_ssa_entry_value()
417 intrin->intrinsic == nir_intrinsic_load_var ? &intrin->dest.ssa : NULL; in load_from_ssa_entry_value()
431 if (load_def->parent_instr == &intrin->instr) in load_from_ssa_entry_value()
447 assert(b->cursor.instr != &intrin->instr); in load_from_ssa_entry_value()
448 nir_instr_remove(&intrin->instr); in load_from_ssa_entry_value()
[all …]
Dnir_lower_vars_to_ssa.c414 nir_intrinsic_instr *intrin = nir_instr_as_intrinsic(instr); in register_variable_uses_block() local
416 switch (intrin->intrinsic) { in register_variable_uses_block()
418 register_load_instr(intrin, state); in register_variable_uses_block()
422 register_store_instr(intrin, state); in register_variable_uses_block()
426 register_copy_instr(intrin, state); in register_variable_uses_block()
492 nir_intrinsic_instr *intrin = nir_instr_as_intrinsic(instr); in rename_variables() local
494 switch (intrin->intrinsic) { in rename_variables()
497 get_deref_node(intrin->variables[0], state); in rename_variables()
507 intrin->num_components, in rename_variables()
508 intrin->dest.ssa.bit_size); in rename_variables()
[all …]
Dnir_lower_indirect_derefs.c168 nir_intrinsic_instr *intrin = nir_instr_as_intrinsic(instr); in lower_indirect_block() local
169 if (intrin->intrinsic != nir_intrinsic_load_var && in lower_indirect_block()
170 intrin->intrinsic != nir_intrinsic_store_var) in lower_indirect_block()
173 if (!deref_has_indirect(intrin->variables[0])) in lower_indirect_block()
180 if (!(modes & intrin->variables[0]->var->data.mode) && in lower_indirect_block()
181 !intrin->variables[0]->var->data.compact) in lower_indirect_block()
184 b->cursor = nir_before_instr(&intrin->instr); in lower_indirect_block()
186 if (intrin->intrinsic == nir_intrinsic_load_var) { in lower_indirect_block()
188 emit_load_store(b, intrin, intrin->variables[0], in lower_indirect_block()
189 &intrin->variables[0]->deref, &result, NULL); in lower_indirect_block()
[all …]
Dnir_lower_locals_to_regs.c206 nir_intrinsic_instr *intrin = nir_instr_as_intrinsic(instr); in lower_locals_to_regs_block() local
208 switch (intrin->intrinsic) { in lower_locals_to_regs_block()
210 if (intrin->variables[0]->var->data.mode != nir_var_local) in lower_locals_to_regs_block()
214 mov->src[0].src = get_deref_reg_src(intrin->variables[0], in lower_locals_to_regs_block()
215 &intrin->instr, state); in lower_locals_to_regs_block()
216 mov->dest.write_mask = (1 << intrin->num_components) - 1; in lower_locals_to_regs_block()
217 if (intrin->dest.is_ssa) { in lower_locals_to_regs_block()
219 intrin->num_components, in lower_locals_to_regs_block()
220 intrin->dest.ssa.bit_size, NULL); in lower_locals_to_regs_block()
221 nir_ssa_def_rewrite_uses(&intrin->dest.ssa, in lower_locals_to_regs_block()
[all …]
Dnir_lower_gs_intrinsics.c71 rewrite_emit_vertex(nir_intrinsic_instr *intrin, struct state *state) in rewrite_emit_vertex() argument
76 b->cursor = nir_before_instr(&intrin->instr); in rewrite_emit_vertex()
97 nir_intrinsic_set_stream_id(lowered, nir_intrinsic_stream_id(intrin)); in rewrite_emit_vertex()
106 nir_instr_remove(&intrin->instr); in rewrite_emit_vertex()
115 rewrite_end_primitive(nir_intrinsic_instr *intrin, struct state *state) in rewrite_end_primitive() argument
119 b->cursor = nir_before_instr(&intrin->instr); in rewrite_end_primitive()
125 nir_intrinsic_set_stream_id(lowered, nir_intrinsic_stream_id(intrin)); in rewrite_end_primitive()
129 nir_instr_remove(&intrin->instr); in rewrite_end_primitive()
141 nir_intrinsic_instr *intrin = nir_instr_as_intrinsic(instr); in rewrite_intrinsics() local
142 switch (intrin->intrinsic) { in rewrite_intrinsics()
[all …]
Dnir_gs_count_vertices.c33 nir_intrinsic_instr *intrin = nir_instr_as_intrinsic(instr); in as_intrinsic() local
34 if (intrin->intrinsic != op) in as_intrinsic()
37 return intrin; in as_intrinsic()
70 nir_intrinsic_instr *intrin = as_set_vertex_count(instr); in nir_gs_count_vertices() local
71 if (!intrin) in nir_gs_count_vertices()
74 nir_const_value *val = nir_src_as_const_value(intrin->src[0]); in nir_gs_count_vertices()
Dnir_propagate_invariant.c99 nir_intrinsic_instr *intrin = nir_instr_as_intrinsic(instr); in propagate_invariant_instr() local
100 switch (intrin->intrinsic) { in propagate_invariant_instr()
103 if (var_is_invariant(intrin->variables[0]->var, invariants)) in propagate_invariant_instr()
104 add_var(intrin->variables[1]->var, invariants); in propagate_invariant_instr()
108 if (dest_is_invariant(&intrin->dest, invariants)) in propagate_invariant_instr()
109 add_var(intrin->variables[0]->var, invariants); in propagate_invariant_instr()
113 if (var_is_invariant(intrin->variables[0]->var, invariants)) in propagate_invariant_instr()
114 add_src(&intrin->src[0], invariants); in propagate_invariant_instr()
Dnir_inline_functions.c64 nir_intrinsic_instr *intrin = nir_instr_as_intrinsic(instr); in rewrite_param_derefs() local
67 i < nir_intrinsic_infos[intrin->intrinsic].num_variables; i++) { in rewrite_param_derefs()
68 convert_deref_to_param_deref(instr, &intrin->variables[i], call); in rewrite_param_derefs()
117 nir_intrinsic_instr *intrin = nir_instr_as_intrinsic(instr); in lower_params_to_locals_block() local
119 switch (intrin->intrinsic) { in lower_params_to_locals_block()
121 lower_param_to_local(intrin->variables[0]->var, impl, true); in lower_params_to_locals_block()
125 lower_param_to_local(intrin->variables[0]->var, impl, true); in lower_params_to_locals_block()
126 lower_param_to_local(intrin->variables[1]->var, impl, false); in lower_params_to_locals_block()
134 i < nir_intrinsic_infos[intrin->intrinsic].num_variables; i++) { in lower_params_to_locals_block()
135 lower_param_to_local(intrin->variables[i]->var, impl, false); in lower_params_to_locals_block()
Dnir_opt_undef.c108 opt_undef_store(nir_intrinsic_instr *intrin) in opt_undef_store() argument
110 switch (intrin->intrinsic) { in opt_undef_store()
121 if (!intrin->src[0].is_ssa || in opt_undef_store()
122 intrin->src[0].ssa->parent_instr->type != nir_instr_type_ssa_undef) in opt_undef_store()
125 nir_instr_remove(&intrin->instr); in opt_undef_store()
147 nir_intrinsic_instr *intrin = nir_instr_as_intrinsic(instr); in nir_opt_undef() local
148 progress = opt_undef_store(intrin) || progress; in nir_opt_undef()
Dnir_opt_conditional_discard.c82 nir_intrinsic_instr *intrin = nir_instr_as_intrinsic(instr); in nir_opt_conditional_discard_block() local
83 if (intrin->intrinsic != nir_intrinsic_discard && in nir_opt_conditional_discard_block()
84 intrin->intrinsic != nir_intrinsic_discard_if) in nir_opt_conditional_discard_block()
90 if (intrin->intrinsic == nir_intrinsic_discard) in nir_opt_conditional_discard_block()
95 nir_ssa_for_src(b, intrin->src[0], 1))); in nir_opt_conditional_discard_block()
102 nir_instr_remove(&intrin->instr); in nir_opt_conditional_discard_block()
Dnir_lower_clip_cull_distance_arrays.c84 nir_intrinsic_instr *intrin = nir_instr_as_intrinsic(instr); in rewrite_references() local
87 assert(intrin->intrinsic != nir_intrinsic_copy_var); in rewrite_references()
89 if (intrin->intrinsic != nir_intrinsic_load_var && in rewrite_references()
90 intrin->intrinsic != nir_intrinsic_store_var) in rewrite_references()
93 nir_deref_var *var_ref = intrin->variables[0]; in rewrite_references()
112 nir_deref *tail = nir_deref_tail(&intrin->variables[0]->deref); in rewrite_references()
Dnir_lower_global_vars_to_local.c43 nir_intrinsic_instr *intrin = nir_instr_as_intrinsic(instr); in mark_global_var_uses_block() local
44 unsigned num_vars = nir_intrinsic_infos[intrin->intrinsic].num_variables; in mark_global_var_uses_block()
47 nir_variable *var = intrin->variables[i]->var; in mark_global_var_uses_block()
Dnir_remove_dead_variables.c127 nir_intrinsic_instr *intrin = nir_instr_as_intrinsic(instr); in remove_dead_var_writes() local
128 if (intrin->intrinsic != nir_intrinsic_copy_var && in remove_dead_var_writes()
129 intrin->intrinsic != nir_intrinsic_store_var) in remove_dead_var_writes()
133 if (intrin->variables[0]->var->data.mode == 0) in remove_dead_var_writes()
Dnir_opt_peephole_select.c66 nir_intrinsic_instr *intrin = nir_instr_as_intrinsic(instr); in block_check_for_allowed_instrs() local
68 switch (intrin->intrinsic) { in block_check_for_allowed_instrs()
70 switch (intrin->variables[0]->var->data.mode) { in block_check_for_allowed_instrs()
Dnir_lower_io_to_temporaries.c88 nir_intrinsic_instr *intrin = nir_instr_as_intrinsic(instr); in emit_output_copies_impl() local
89 if (intrin->intrinsic == nir_intrinsic_emit_vertex) { in emit_output_copies_impl()
90 nir_cursor cursor = nir_before_instr(&intrin->instr); in emit_output_copies_impl()
Dnir_loop_analyze.c686 nir_intrinsic_instr *intrin = nir_instr_as_intrinsic(instr); in force_unroll_heuristics() local
691 if (intrin->intrinsic == nir_intrinsic_load_var || in force_unroll_heuristics()
692 intrin->intrinsic == nir_intrinsic_store_var || in force_unroll_heuristics()
693 intrin->intrinsic == nir_intrinsic_copy_var) { in force_unroll_heuristics()
695 nir_intrinsic_infos[intrin->intrinsic].num_variables; in force_unroll_heuristics()
697 if (force_unroll_array_access(state, ns, intrin->variables[i])) in force_unroll_heuristics()
/external/mesa3d/src/mesa/drivers/dri/i965/
Dbrw_nir.c30 is_input(nir_intrinsic_instr *intrin) in is_input() argument
32 return intrin->intrinsic == nir_intrinsic_load_input || in is_input()
33 intrin->intrinsic == nir_intrinsic_load_per_vertex_input || in is_input()
34 intrin->intrinsic == nir_intrinsic_load_interpolated_input; in is_input()
38 is_output(nir_intrinsic_instr *intrin) in is_output() argument
40 return intrin->intrinsic == nir_intrinsic_load_output || in is_output()
41 intrin->intrinsic == nir_intrinsic_load_per_vertex_output || in is_output()
42 intrin->intrinsic == nir_intrinsic_store_output || in is_output()
43 intrin->intrinsic == nir_intrinsic_store_per_vertex_output; in is_output()
66 nir_intrinsic_instr *intrin = nir_instr_as_intrinsic(instr); in add_const_offset_to_base_block() local
[all …]
Dbrw_nir_attribute_workarounds.c50 nir_intrinsic_instr *intrin = nir_instr_as_intrinsic(instr); in apply_attr_wa_block() local
51 if (intrin->intrinsic != nir_intrinsic_load_input) in apply_attr_wa_block()
54 uint8_t wa_flags = state->wa_flags[intrin->const_index[0]]; in apply_attr_wa_block()
60 nir_ssa_def *val = &intrin->dest.ssa; in apply_attr_wa_block()
139 nir_ssa_def_rewrite_uses_after(&intrin->dest.ssa, nir_src_for_ssa(val), in apply_attr_wa_block()
/external/mesa3d/src/intel/vulkan/
Danv_nir_apply_dynamic_offsets.c39 nir_intrinsic_instr *intrin = nir_instr_as_intrinsic(instr); in apply_dynamic_offsets_block() local
42 switch (intrin->intrinsic) { in apply_dynamic_offsets_block()
54 nir_instr *res_instr = intrin->src[block_idx_src].ssa->parent_instr; in apply_dynamic_offsets_block()
66 b->cursor = nir_before_instr(&intrin->instr); in apply_dynamic_offsets_block()
84 nir_src *offset_src = nir_get_io_offset_src(intrin); in apply_dynamic_offsets_block()
87 nir_instr_rewrite_src(&intrin->instr, offset_src, in apply_dynamic_offsets_block()
100 nir_instr_remove(&intrin->instr); in apply_dynamic_offsets_block()
101 nir_instr_insert_after_cf_list(&if_stmt->then_list, &intrin->instr); in apply_dynamic_offsets_block()
103 if (intrin->intrinsic != nir_intrinsic_store_ssbo) { in apply_dynamic_offsets_block()
107 intrin->num_components, in apply_dynamic_offsets_block()
[all …]
Danv_nir_apply_pipeline_layout.c63 nir_intrinsic_instr *intrin = nir_instr_as_intrinsic(instr); in get_used_bindings_block() local
64 switch (intrin->intrinsic) { in get_used_bindings_block()
66 add_binding(state, nir_intrinsic_desc_set(intrin), in get_used_bindings_block()
67 nir_intrinsic_binding(intrin)); in get_used_bindings_block()
82 add_var_binding(state, intrin->variables[0]->var); in get_used_bindings_block()
105 lower_res_index_intrinsic(nir_intrinsic_instr *intrin, in lower_res_index_intrinsic() argument
110 b->cursor = nir_before_instr(&intrin->instr); in lower_res_index_intrinsic()
112 uint32_t set = nir_intrinsic_desc_set(intrin); in lower_res_index_intrinsic()
113 uint32_t binding = nir_intrinsic_binding(intrin); in lower_res_index_intrinsic()
119 nir_ssa_def *block_index = nir_ssa_for_src(b, intrin->src[0], 1); in lower_res_index_intrinsic()
[all …]
Danv_nir_lower_push_constants.c38 nir_intrinsic_instr *intrin = nir_instr_as_intrinsic(instr); in anv_nir_lower_push_constants() local
41 if (intrin->intrinsic != nir_intrinsic_load_push_constant) in anv_nir_lower_push_constants()
44 assert(intrin->const_index[0] % 4 == 0); in anv_nir_lower_push_constants()
47 intrin->intrinsic = nir_intrinsic_load_uniform; in anv_nir_lower_push_constants()
/external/mesa3d/src/mesa/state_tracker/
Dst_nir_lower_builtin.c161 nir_intrinsic_instr *intrin = nir_instr_as_intrinsic(instr); in lower_builtin_block() local
163 if (intrin->intrinsic != nir_intrinsic_load_var) in lower_builtin_block()
166 nir_variable *var = intrin->variables[0]->var; in lower_builtin_block()
182 get_element(desc, intrin->variables[0]); in lower_builtin_block()
196 get_variable(state, intrin->variables[0], element); in lower_builtin_block()
208 def = nir_swizzle(b, def, swiz, intrin->num_components, true); in lower_builtin_block()
211 assert(intrin->dest.is_ssa); in lower_builtin_block()
212 nir_ssa_def_rewrite_uses(&intrin->dest.ssa, nir_src_for_ssa(def)); in lower_builtin_block()
219 exec_node_remove(&intrin->instr.node); in lower_builtin_block()
/external/mesa3d/src/compiler/spirv/
Dvtn_glsl450.c669 nir_intrinsic_instr *intrin = nir_intrinsic_instr_create(b->nb.shader, op); in handle_glsl450_interpolation() local
672 intrin->variables[0] = nir_deref_var_clone(deref, intrin); in handle_glsl450_interpolation()
679 intrin->src[0] = nir_src_for_ssa(vtn_ssa_value(b, w[6])->def); in handle_glsl450_interpolation()
685 intrin->num_components = glsl_get_vector_elements(dest_type); in handle_glsl450_interpolation()
686 nir_ssa_dest_init(&intrin->instr, &intrin->dest, in handle_glsl450_interpolation()
689 val->ssa->def = &intrin->dest.ssa; in handle_glsl450_interpolation()
691 nir_builder_instr_insert(&b->nb, &intrin->instr); in handle_glsl450_interpolation()
/external/mesa3d/src/gallium/drivers/swr/rasterizer/common/
Dsimd16intrin.h77 #define SIMD16_EMU_AVX512_0(type, func, intrin) \ argument
82 result.lo = intrin();\
83 result.hi = intrin();\
88 #define SIMD16_EMU_AVX512_1(type, func, intrin) \ argument
93 result.lo = intrin(a.lo);\
94 result.hi = intrin(a.hi);\
99 #define SIMD16_EMU_AVX512_2(type, func, intrin) \ argument
104 result.lo = intrin(a.lo, b.lo);\
105 result.hi = intrin(a.hi, b.hi);\
110 #define SIMD16_EMU_AVX512_3(type, func, intrin) \ argument
[all …]

123