Home
last modified time | relevance | path

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

123

/external/mesa3d/src/compiler/nir/
Dnir_lower_subgroups.c68 lower_read_invocation_to_scalar(nir_builder *b, nir_intrinsic_instr *intrin) in lower_read_invocation_to_scalar() argument
71 assert(intrin->dest.ssa.num_components > 1); in lower_read_invocation_to_scalar()
73 nir_ssa_def *value = nir_ssa_for_src(b, intrin->src[0], in lower_read_invocation_to_scalar()
74 intrin->num_components); in lower_read_invocation_to_scalar()
77 for (unsigned i = 0; i < intrin->num_components; i++) { in lower_read_invocation_to_scalar()
79 nir_intrinsic_instr_create(b->shader, intrin->intrinsic); in lower_read_invocation_to_scalar()
81 1, intrin->dest.ssa.bit_size, NULL); in lower_read_invocation_to_scalar()
87 if (intrin->intrinsic == nir_intrinsic_read_invocation) in lower_read_invocation_to_scalar()
88 nir_src_copy(&chan_intrin->src[1], &intrin->src[1], chan_intrin); in lower_read_invocation_to_scalar()
95 return nir_vec(b, reads, intrin->num_components); in lower_read_invocation_to_scalar()
[all …]
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_lower_indirect_derefs.c149 nir_intrinsic_instr *intrin = nir_instr_as_intrinsic(instr); in lower_indirect_block() local
150 if (intrin->intrinsic != nir_intrinsic_load_var && in lower_indirect_block()
151 intrin->intrinsic != nir_intrinsic_interp_var_at_centroid && in lower_indirect_block()
152 intrin->intrinsic != nir_intrinsic_interp_var_at_sample && in lower_indirect_block()
153 intrin->intrinsic != nir_intrinsic_interp_var_at_offset && in lower_indirect_block()
154 intrin->intrinsic != nir_intrinsic_store_var) in lower_indirect_block()
157 if (!deref_has_indirect(intrin->variables[0])) in lower_indirect_block()
164 if (!(modes & intrin->variables[0]->var->data.mode) && in lower_indirect_block()
165 !intrin->variables[0]->var->data.compact) in lower_indirect_block()
168 b->cursor = nir_before_instr(&intrin->instr); in lower_indirect_block()
[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.c418 nir_intrinsic_instr *intrin = nir_instr_as_intrinsic(instr); in register_variable_uses_block() local
420 switch (intrin->intrinsic) { in register_variable_uses_block()
422 register_load_instr(intrin, state); in register_variable_uses_block()
426 register_store_instr(intrin, state); in register_variable_uses_block()
430 register_copy_instr(intrin, state); in register_variable_uses_block()
496 nir_intrinsic_instr *intrin = nir_instr_as_intrinsic(instr); in rename_variables() local
498 switch (intrin->intrinsic) { in rename_variables()
501 get_deref_node(intrin->variables[0], state); in rename_variables()
511 intrin->num_components, in rename_variables()
512 intrin->dest.ssa.bit_size); in rename_variables()
[all …]
Dnir_lower_locals_to_regs.c205 nir_intrinsic_instr *intrin = nir_instr_as_intrinsic(instr); in lower_locals_to_regs_block() local
207 switch (intrin->intrinsic) { in lower_locals_to_regs_block()
209 if (intrin->variables[0]->var->data.mode != nir_var_local) in lower_locals_to_regs_block()
213 mov->src[0].src = get_deref_reg_src(intrin->variables[0], in lower_locals_to_regs_block()
214 &intrin->instr, state); in lower_locals_to_regs_block()
215 mov->dest.write_mask = (1 << intrin->num_components) - 1; in lower_locals_to_regs_block()
216 if (intrin->dest.is_ssa) { in lower_locals_to_regs_block()
218 intrin->num_components, in lower_locals_to_regs_block()
219 intrin->dest.ssa.bit_size, NULL); in lower_locals_to_regs_block()
220 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()
92 nir_intrinsic_set_stream_id(lowered, nir_intrinsic_stream_id(intrin)); in rewrite_emit_vertex()
103 nir_instr_remove(&intrin->instr); in rewrite_emit_vertex()
112 rewrite_end_primitive(nir_intrinsic_instr *intrin, struct state *state) in rewrite_end_primitive() argument
116 b->cursor = nir_before_instr(&intrin->instr); in rewrite_end_primitive()
122 nir_intrinsic_set_stream_id(lowered, nir_intrinsic_stream_id(intrin)); in rewrite_end_primitive()
126 nir_instr_remove(&intrin->instr); in rewrite_end_primitive()
138 nir_intrinsic_instr *intrin = nir_instr_as_intrinsic(instr); in rewrite_intrinsics() local
139 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_opt_intrinsics.c43 nir_intrinsic_instr *intrin = nir_instr_as_intrinsic(instr); in opt_intrinsics_impl() local
47 switch (intrin->intrinsic) { in opt_intrinsics_impl()
50 if (nir_src_as_const_value(intrin->src[0])) in opt_intrinsics_impl()
51 replacement = nir_ssa_for_src(&b, intrin->src[0], 1); in opt_intrinsics_impl()
54 if (nir_src_as_const_value(intrin->src[0])) in opt_intrinsics_impl()
64 nir_ssa_def_rewrite_uses(&intrin->dest.ssa, in opt_intrinsics_impl()
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_opt_copy_propagate.c257 nir_intrinsic_instr *intrin = nir_instr_as_intrinsic(instr); in copy_prop_instr() local
259 i < nir_intrinsic_infos[intrin->intrinsic].num_srcs; i++) { in copy_prop_instr()
261 nir_intrinsic_infos[intrin->intrinsic].src_components[i]; in copy_prop_instr()
263 num_components = intrin->num_components; in copy_prop_instr()
265 while (copy_prop_src(&intrin->src[i], instr, NULL, num_components)) in copy_prop_instr()
270 i < nir_intrinsic_infos[intrin->intrinsic].num_variables; i++) { in copy_prop_instr()
271 if (copy_prop_deref_var(instr, intrin->variables[i])) in copy_prop_instr()
275 if (nir_intrinsic_infos[intrin->intrinsic].has_dest) { in copy_prop_instr()
276 while (copy_prop_dest(&intrin->dest, instr)) in copy_prop_instr()
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()
/external/mesa3d/src/intel/compiler/
Dbrw_nir.c31 is_input(nir_intrinsic_instr *intrin) in is_input() argument
33 return intrin->intrinsic == nir_intrinsic_load_input || in is_input()
34 intrin->intrinsic == nir_intrinsic_load_per_vertex_input || in is_input()
35 intrin->intrinsic == nir_intrinsic_load_interpolated_input; in is_input()
39 is_output(nir_intrinsic_instr *intrin) in is_output() argument
41 return intrin->intrinsic == nir_intrinsic_load_output || in is_output()
42 intrin->intrinsic == nir_intrinsic_load_per_vertex_output || in is_output()
43 intrin->intrinsic == nir_intrinsic_store_output || in is_output()
44 intrin->intrinsic == nir_intrinsic_store_per_vertex_output; in is_output()
67 nir_intrinsic_instr *intrin = nir_instr_as_intrinsic(instr); in add_const_offset_to_base_block() local
[all …]
Dbrw_nir_attribute_workarounds.c48 nir_intrinsic_instr *intrin = nir_instr_as_intrinsic(instr); in apply_attr_wa_block() local
49 if (intrin->intrinsic != nir_intrinsic_load_input) in apply_attr_wa_block()
52 uint8_t wa_flags = state->wa_flags[intrin->const_index[0]]; in apply_attr_wa_block()
58 nir_ssa_def *val = &intrin->dest.ssa; in apply_attr_wa_block()
125 nir_ssa_def_rewrite_uses_after(&intrin->dest.ssa, nir_src_for_ssa(val), in apply_attr_wa_block()
/external/mesa3d/src/gallium/drivers/swr/rasterizer/common/
Dsimdlib_512_avx512_knights.inl32 #define SIMD_WRAPPER_1_(op, intrin) \ argument
35 return intrin(a);\
41 #define SIMD_WRAPPER_2_(op, intrin) \ argument
44 return _mm512_##intrin(a, b);\
48 #define SIMD_WRAPPERI_2_(op, intrin) \ argument
51 return _mm512_castsi512_ps(_mm512_##intrin(\
61 #define SIMD_WRAPPER_2I_(op, intrin) \ argument
65 return _mm512_##intrin(a, b, ImmT);\
69 #define SIMD_DWRAPPER_2I_(op, intrin) \ argument
73 return _mm512_##intrin(a, b, ImmT);\
[all …]
Dsimdlib_128_avx512_core.inl36 #define SIMD_WRAPPER_1_(op, intrin, mask) \ argument
39 return __conv(_mm512_maskz_##intrin((mask), __conv(a)));\
43 #define SIMD_WRAPPER_1I_(op, intrin, mask) \ argument
47 return __conv(_mm512_maskz_##intrin((mask), __conv(a), ImmT));\
51 #define SIMD_WRAPPER_2_(op, intrin, mask) \ argument
54 return __conv(_mm512_maskz_##intrin((mask), __conv(a), __conv(b)));\
65 #define SIMD_WRAPPER_3_(op, intrin, mask) \ argument
68 return __conv(_mm512_maskz_##intrin((mask), __conv(a), __conv(b), __conv(c)));\
72 #define SIMD_DWRAPPER_1_(op, intrin, mask) \ argument
75 return __conv(_mm512_maskz_##intrin((mask), __conv(a)));\
[all …]
Dsimdlib_512_avx512_core.inl32 #define SIMD_WRAPPER_1_(op, intrin) \ argument
35 return intrin(a);\
41 #define SIMD_WRAPPER_2_(op, intrin) \ argument
44 return _mm512_##intrin(a, b);\
48 #define SIMD_WRAPPERI_2_(op, intrin) \ argument
51 return _mm512_castsi512_ps(_mm512_##intrin(\
61 #define SIMD_WRAPPER_2I_(op, intrin) \ argument
65 return _mm512_##intrin(a, b, ImmT);\
69 #define SIMD_DWRAPPER_2I_(op, intrin) \ argument
73 return _mm512_##intrin(a, b, ImmT);\
[all …]
Dsimdlib_256_avx512_core.inl36 #define SIMD_DWRAPPER_1_(op, intrin, mask) \ argument
39 return __conv(_mm512_maskz_##intrin((mask), __conv(a)));\
43 #define SIMD_DWRAPPER_1I_(op, intrin, mask) \ argument
47 return __conv(_mm512_maskz_##intrin((mask), __conv(a), ImmT));\
51 #define SIMD_DWRAPPER_2_(op, intrin, mask) \ argument
54 return __conv(_mm512_maskz_##intrin((mask), __conv(a), __conv(b)));\
58 #define SIMD_IWRAPPER_1_(op, intrin, mask) \ argument
61 return __conv(_mm512_maskz_##intrin((mask), __conv(a)));\
67 #define SIMD_IWRAPPER_1I_(op, intrin, mask) \ argument
71 return __conv(_mm512_maskz_##intrin((mask), __conv(a), ImmT));\
[all …]
Dsimdlib_128_avx512.inl45 #define SIMD_WRAPPER_1_(op, intrin, mask) \
48 return __conv(_mm512_maskz_##intrin((mask), __conv(a)));\
52 #define SIMD_WRAPPER_1I_(op, intrin, mask) \
56 return __conv(_mm512_maskz_##intrin((mask), __conv(a), ImmT));\
60 #define SIMD_WRAPPER_2_(op, intrin, mask) \
63 return __conv(_mm512_maskz_##intrin((mask), __conv(a), __conv(b)));\
74 #define SIMD_WRAPPER_3_(op, intrin, mask) \
77 return __conv(_mm512_maskz_##intrin((mask), __conv(a), __conv(b), __conv(c)));\
88 #define SIMD_IWRAPPER_1_(op, intrin, mask) \
91 return __conv(_mm512_maskz_##intrin((mask), __conv(a)));\
[all …]
/external/mesa3d/src/intel/vulkan/
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_const_value *const_array_index = nir_src_as_const_value(intrin->src[0]); 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()

123