Home
last modified time | relevance | path

Searched full:nir (Results 1 – 25 of 1331) sorted by relevance

12345678910>>...54

/external/mesa3d/src/compiler/
DMakefile.sources198 nir/nir_builder_opcodes.h \
199 nir/nir_constant_expressions.c \
200 nir/nir_intrinsics.c \
201 nir/nir_intrinsics.h \
202 nir/nir_opcodes.c \
203 nir/nir_opcodes.h \
204 nir/nir_opt_algebraic.c
207 nir/nir.c \
208 nir/nir.h \
209 nir/nir_builder.h \
[all …]
/external/mesa3d/src/intel/compiler/
Dbrw_kernel.c31 #include "compiler/nir/nir_builder.h"
45 nir_shader *nir = nir_load_libclc_shader(64, disk_cache, in load_clc_shader() local
48 if (nir == NULL) in load_clc_shader()
52 p_atomic_cmpxchg(&compiler->clc_shader, NULL, nir); in load_clc_shader()
55 ralloc_steal(compiler, nir); in load_clc_shader()
56 return nir; in load_clc_shader()
59 ralloc_free(nir); in load_clc_shader()
125 implement_intel_builtins(nir_shader *nir) in implement_intel_builtins() argument
129 nir_foreach_function(func, nir) { in implement_intel_builtins()
156 nir_shader_preserve_all_metadata(nir); in implement_intel_builtins()
[all …]
Dbrw_compile_vs.cpp18 struct nir_shader *nir = params->base.nir; in brw_compile_vs() local
22 brw_should_print_shader(nir, params->base.debug_flag ? in brw_compile_vs()
26 prog_data->base.base.ray_queries = nir->info.ray_queries; in brw_compile_vs()
29 brw_nir_apply_key(nir, compiler, &key->base, 8); in brw_compile_vs()
31 prog_data->inputs_read = nir->info.inputs_read; in brw_compile_vs()
32 prog_data->double_inputs_read = nir->info.vs.double_inputs; in brw_compile_vs()
34 brw_nir_lower_vs_inputs(nir); in brw_compile_vs()
35 brw_nir_lower_vue_outputs(nir); in brw_compile_vs()
36 brw_postprocess_nir(nir, compiler, debug_enabled, in brw_compile_vs()
40 ((1 << nir->info.clip_distance_array_size) - 1); in brw_compile_vs()
[all …]
Dbrw_nir_lower_cs_intrinsics.c25 #include "compiler/nir/nir_builder.h"
28 nir_shader *nir; member
37 nir_shader *nir, in compute_local_index_id() argument
50 if (nir->info.workgroup_size_variable) { in compute_local_index_id()
55 size_x = nir_imm_int(b, nir->info.workgroup_size[0]); in compute_local_index_id()
56 size_y = nir_imm_int(b, nir->info.workgroup_size[1]); in compute_local_index_id()
78 switch (nir->info.cs.derivative_group) { in compute_local_index_id()
80 if (nir->info.num_images == 0 && in compute_local_index_id()
81 nir->info.num_textures == 0) { in compute_local_index_id()
89 } else if (!nir->info.workgroup_size_variable && in compute_local_index_id()
[all …]
/external/mesa3d/src/gallium/drivers/radeonsi/
Dsi_shader_nir.c72 void si_nir_opts(struct si_screen *sscreen, struct nir_shader *nir, bool first) in si_nir_opts() argument
81 NIR_PASS(progress, nir, nir_lower_vars_to_ssa); in si_nir_opts()
82 NIR_PASS(progress, nir, nir_lower_alu_to_scalar, in si_nir_opts()
83 nir->options->lower_to_scalar_filter, (void *)sscreen->use_aco); in si_nir_opts()
84 NIR_PASS(progress, nir, nir_lower_phis_to_scalar, false); in si_nir_opts()
87 NIR_PASS(progress, nir, nir_split_array_vars, nir_var_function_temp); in si_nir_opts()
88 NIR_PASS(lower_alu_to_scalar, nir, nir_shrink_vec_array_vars, nir_var_function_temp); in si_nir_opts()
89 NIR_PASS(progress, nir, nir_opt_find_array_copies); in si_nir_opts()
91 NIR_PASS(progress, nir, nir_opt_copy_prop_vars); in si_nir_opts()
92 NIR_PASS(progress, nir, nir_opt_dead_write_vars); in si_nir_opts()
[all …]
/external/mesa3d/src/compiler/nir/
Dnir_sweep.c24 #include "nir.h"
43 static void sweep_cf_node(nir_shader *nir, nir_cf_node *cf_node);
46 sweep_block(nir_shader *nir, nir_block *block) in sweep_block() argument
48 ralloc_steal(nir, block); in sweep_block()
60 gc_mark_live(nir->gctx, instr); in sweep_block()
64 gc_mark_live(nir->gctx, nir_instr_as_tex(instr)->src); in sweep_block()
68 gc_mark_live(nir->gctx, src); in sweep_block()
77 sweep_if(nir_shader *nir, nir_if *iff) in sweep_if() argument
79 ralloc_steal(nir, iff); in sweep_if()
82 sweep_cf_node(nir, cf_node); in sweep_if()
[all …]
/external/mesa3d/src/imagination/rogue/
Drogue_nir.c25 #include "nir/nir.h"
34 * \brief Contains SPIR-V and NIR-specific functions.
38 * \brief SPIR-V to NIR compilation options.
57 * \brief Applies optimizations and passes required to lower the NIR shader into
65 nir_shader *nir, in rogue_nir_passes() argument
71 bool nir_debug_print_shader_prev = nir_debug_print_shader[nir->info.stage]; in rogue_nir_passes()
72 nir_debug_print_shader[nir->info.stage] = ROGUE_DEBUG(NIR_PASSES); in rogue_nir_passes()
75 nir_validate_shader(nir, "after spirv_to_nir"); in rogue_nir_passes()
77 NIR_PASS_V(nir, nir_lower_vars_to_ssa); in rogue_nir_passes()
80 NIR_PASS_V(nir, nir_split_var_copies); in rogue_nir_passes()
[all …]
/external/mesa3d/src/gallium/frontends/rusticl/mesa/compiler/
Dnir.rs46 ($nir:ident, $pass:ident, $func:ident $(,$arg:expr)* $(,)?) => {
54 $nir.metadata_set_validation_flag();
55 if $nir.should_print() {
58 if $nir.$pass($func $(,$arg)*) {
59 $nir.validate(&format!("after {} in {}:{}", func_str, file!(), line!()));
60 if $nir.should_print() {
61 $nir.print();
63 $nir.metadata_check_validation_flag();
73 $nir.validate_clone();
77 $nir.validate_serialize_deserialize();
[all …]
/external/mesa3d/src/gallium/drivers/lima/standalone/
Dlima_compiler_cmdline.c62 sort_varyings(nir_shader *nir, nir_variable_mode mode) in sort_varyings() argument
66 nir_foreach_variable_with_modes_safe(var, nir, mode) { in sort_varyings()
70 exec_list_append(&nir->variables, &new_list); in sort_varyings()
74 fixup_varying_slots(nir_shader *nir, nir_variable_mode mode) in fixup_varying_slots() argument
76 nir_foreach_variable_with_modes(var, nir, mode) { in fixup_varying_slots()
115 nir_shader *nir = glsl_to_nir(&local_ctx.Const, prog, stage, nir_options); in load_glsl() local
117 /* required NIR passes: */ in load_glsl()
119 nir->info.stage == MESA_SHADER_VERTEX || in load_glsl()
120 nir->info.stage == MESA_SHADER_GEOMETRY) { in load_glsl()
121 NIR_PASS_V(nir, nir_lower_io_to_temporaries, in load_glsl()
[all …]
/external/mesa3d/src/gallium/frontends/clover/nir/
Dinvocation.cpp36 #include <compiler/nir/nir_builder.h>
37 #include <compiler/nir/nir_serialize.h>
180 clover_lower_nir(nir_shader *nir, std::vector<binary::argument> &args, in clover_lower_nir() argument
184 if (nir->constant_data_size) { in clover_lower_nir()
187 constant_var = nir_variable_create(nir, nir_var_uniform, type, in clover_lower_nir()
198 return nir_shader_lower_instructions(nir, in clover_lower_nir()
232 struct disk_cache *clover::nir::create_clc_disk_cache(void) in create_clc_disk_cache()
239 if (!disk_cache_get_function_identifier((void *)clover::nir::create_clc_disk_cache, &ctx)) in create_clc_disk_cache()
248 void clover::nir::check_for_libclc(const device &dev) in check_for_libclc()
254 nir_shader *clover::nir::load_libclc_nir(const device &dev, std::string &r_log) in load_libclc_nir()
[all …]
/external/mesa3d/src/microsoft/spirv_to_dxil/
Ddxil_spirv_nir.c87 dxil_spirv_nir_prep(nir_shader *nir) in dxil_spirv_nir_prep() argument
93 NIR_PASS_V(nir, nir_lower_variable_initializers, nir_var_function_temp); in dxil_spirv_nir_prep()
94 NIR_PASS_V(nir, nir_lower_returns); in dxil_spirv_nir_prep()
95 NIR_PASS_V(nir, nir_inline_functions); in dxil_spirv_nir_prep()
96 NIR_PASS_V(nir, nir_copy_prop); in dxil_spirv_nir_prep()
97 NIR_PASS_V(nir, nir_opt_deref); in dxil_spirv_nir_prep()
100 nir_remove_non_entrypoints(nir); in dxil_spirv_nir_prep()
107 NIR_PASS_V(nir, nir_lower_variable_initializers, ~0); in dxil_spirv_nir_prep()
112 NIR_PASS_V(nir, nir_split_var_copies); in dxil_spirv_nir_prep()
113 NIR_PASS_V(nir, nir_split_per_member_structs); in dxil_spirv_nir_prep()
[all …]
/external/mesa3d/src/amd/vulkan/nir/
Dradv_nir_lower_io.c27 #include "nir.h"
40 radv_nir_lower_io_to_scalar_early(nir_shader *nir, nir_variable_mode mask) in radv_nir_lower_io_to_scalar_early() argument
44 NIR_PASS(progress, nir, nir_lower_io_to_scalar_early, mask); in radv_nir_lower_io_to_scalar_early()
47 NIR_PASS(_, nir, nir_copy_prop); in radv_nir_lower_io_to_scalar_early()
48 NIR_PASS(_, nir, nir_opt_shrink_vectors); in radv_nir_lower_io_to_scalar_early()
52 NIR_PASS(_, nir, nir_opt_constant_folding); in radv_nir_lower_io_to_scalar_early()
55 NIR_PASS(_, nir, nir_opt_cse); in radv_nir_lower_io_to_scalar_early()
64 if (nir->info.stage == MESA_SHADER_TESS_CTRL) in radv_nir_lower_io_to_scalar_early()
65 NIR_PASS(_, nir, nir_opt_copy_prop_vars); in radv_nir_lower_io_to_scalar_early()
67 NIR_PASS(_, nir, nir_opt_dce); in radv_nir_lower_io_to_scalar_early()
[all …]
/external/angle/third_party/mesa/
Dmesa_autogen.gni136 "src/compiler/nir/nir.c",
137 "src/compiler/nir/nir_builder.c",
138 "src/compiler/nir/nir_builder_opcodes_h.py",
139 "src/compiler/nir/nir_builtin_builder.c",
140 "src/compiler/nir/nir_clone.c",
141 "src/compiler/nir/nir_constant_expressions.py",
142 "src/compiler/nir/nir_control_flow.c",
143 "src/compiler/nir/nir_convert_ycbcr.c",
144 "src/compiler/nir/nir_deref.c",
145 "src/compiler/nir/nir_divergence_analysis.c",
[all …]
/external/mesa3d/src/gallium/drivers/freedreno/ir3/
Dir3_cmdline.c37 #include "nir/tgsi_to_nir.h"
80 sort_varyings(nir_shader *nir, nir_variable_mode mode) in sort_varyings() argument
84 nir_foreach_variable_with_modes_safe (var, nir, mode) { in sort_varyings()
88 exec_list_append(&nir->variables, &new_list); in sort_varyings()
92 fixup_varying_slots(nir_shader *nir, nir_variable_mode mode) in fixup_varying_slots() argument
94 nir_foreach_variable_with_modes (var, nir, mode) { in fixup_varying_slots()
123 nir_shader *nir = glsl_to_nir(&local_ctx.Const, prog, stage, nir_options); in load_glsl() local
125 /* required NIR passes: */ in load_glsl()
127 nir->info.stage == MESA_SHADER_VERTEX || in load_glsl()
128 nir->info.stage == MESA_SHADER_GEOMETRY) { in load_glsl()
[all …]
/external/mesa3d/src/mesa/state_tracker/
Dst_glsl_to_nir.cpp45 #include "compiler/nir/nir.h"
46 #include "compiler/nir/nir_builder.h"
65 * may need to fix up varying slots so the glsl->nir path is aligned
66 * with the anything->tgsi->nir path.
96 st_nir_assign_vs_in_locations(struct nir_shader *nir) in st_nir_assign_vs_in_locations() argument
98 if (nir->info.stage != MESA_SHADER_VERTEX || nir->info.io_lowered) in st_nir_assign_vs_in_locations()
101 nir->num_inputs = util_bitcount64(nir->info.inputs_read); in st_nir_assign_vs_in_locations()
105 nir_foreach_shader_in_variable_safe(var, nir) { in st_nir_assign_vs_in_locations()
106 /* NIR already assigns dual-slot inputs to two locations so all we have in st_nir_assign_vs_in_locations()
109 if (nir->info.inputs_read & BITFIELD64_BIT(var->data.location)) { in st_nir_assign_vs_in_locations()
[all …]
Dst_program.c38 #include "nir/pipe_nir.h"
45 #include "compiler/nir/nir.h"
46 #include "compiler/nir/nir_serialize.h"
323 /* Note: Any setup of ->ir.nir that has had pipe->create_*_state called on in st_release_variants()
324 * it has resulted in the driver taking ownership of the NIR. Those in st_release_variants()
325 * callers should be NULLing out the nir field in any pipe_shader_state in st_release_variants()
328 * GLSL IR and ARB programs will have set gl_program->nir to the same in st_release_variants()
329 * shader as ir->ir.nir, so it will be freed by _mesa_delete_program(). in st_release_variants()
347 st_finalize_nir_before_variants(struct nir_shader *nir) in st_finalize_nir_before_variants() argument
349 NIR_PASS(_, nir, nir_split_var_copies); in st_finalize_nir_before_variants()
[all …]
/external/mesa3d/src/microsoft/clc/
Dclc_compiler.c24 #include "nir.h"
276 clc_lower_images(nir_shader *nir, struct clc_image_lower_context *context) in clc_lower_images() argument
278 nir_foreach_function(func, nir) { in clc_lower_images()
299 nir_foreach_variable_with_modes_safe(var, nir, nir_var_image) { in clc_lower_images()
306 clc_lower_64bit_semantics(nir_shader *nir) in clc_lower_64bit_semantics() argument
308 nir_foreach_function_impl(impl, nir) { in clc_lower_64bit_semantics()
347 clc_lower_nonnormalized_samplers(nir_shader *nir, in clc_lower_nonnormalized_samplers() argument
350 nir_foreach_function(func, nir) { in clc_lower_nonnormalized_samplers()
416 add_kernel_inputs_var(struct clc_dxil_object *dxil, nir_shader *nir, in add_kernel_inputs_var() argument
424 nir_foreach_variable_with_modes(var, nir, nir_var_uniform) in add_kernel_inputs_var()
[all …]
/external/mesa3d/src/nouveau/compiler/
Dnak_nir.c12 #define OPT(nir, pass, ...) ({ \ argument
14 NIR_PASS(this_progress, nir, pass, ##__VA_ARGS__); \
20 #define OPT_V(nir, pass, ...) NIR_PASS_V(nir, pass, ##__VA_ARGS__) argument
23 nak_nir_workgroup_has_one_subgroup(const nir_shader *nir) in nak_nir_workgroup_has_one_subgroup() argument
25 switch (nir->info.stage) { in nak_nir_workgroup_has_one_subgroup()
42 if (nir->info.workgroup_size_variable) in nak_nir_workgroup_has_one_subgroup()
45 uint16_t wg_sz = nir->info.workgroup_size[0] * in nak_nir_workgroup_has_one_subgroup()
46 nir->info.workgroup_size[1] * in nak_nir_workgroup_has_one_subgroup()
47 nir->info.workgroup_size[2]; in nak_nir_workgroup_has_one_subgroup()
58 optimize_nir(nir_shader *nir, const struct nak_compiler *nak, bool allow_copies) in optimize_nir() argument
[all …]
/external/mesa3d/src/intel/vulkan/
Danv_internal_kernels.c29 #include "compiler/nir/nir.h"
30 #include "compiler/nir/nir_builder.h"
52 link_libanv(nir_shader *nir, const nir_shader *libanv) in link_libanv() argument
54 nir_link_shader_functions(nir, libanv); in link_libanv()
55 NIR_PASS_V(nir, nir_inline_functions); in link_libanv()
56 NIR_PASS_V(nir, nir_remove_non_entrypoints); in link_libanv()
57 NIR_PASS_V(nir, nir_lower_vars_to_explicit_types, nir_var_function_temp, in link_libanv()
59 NIR_PASS_V(nir, nir_opt_deref); in link_libanv()
60 NIR_PASS_V(nir, nir_lower_vars_to_ssa); in link_libanv()
61 NIR_PASS_V(nir, nir_lower_explicit_io, in link_libanv()
[all …]
/external/mesa3d/src/asahi/clc/
Dasahi_clc.c16 #include "nir.h"
125 optimize(nir_shader *nir) in optimize() argument
131 NIR_PASS(progress, nir, nir_lower_var_copies); in optimize()
132 NIR_PASS(progress, nir, nir_lower_vars_to_ssa); in optimize()
134 NIR_PASS(progress, nir, nir_copy_prop); in optimize()
135 NIR_PASS(progress, nir, nir_opt_remove_phis); in optimize()
136 NIR_PASS(progress, nir, nir_lower_phis_to_scalar, true); in optimize()
137 NIR_PASS(progress, nir, nir_opt_dce); in optimize()
138 NIR_PASS(progress, nir, nir_opt_dead_cf); in optimize()
139 NIR_PASS(progress, nir, nir_opt_cse); in optimize()
[all …]
/external/mesa3d/src/gallium/frontends/lavapipe/
Dlvp_pipeline.c32 #include "nir/nir_builder.h"
33 #include "nir/nir_serialize.h"
37 #include "nir/nir_xfb_info.h"
50 gl_shader_stage stage = shader->pipeline_nir->nir->info.stage; in shader_destroy()
154 remove_barriers(nir_shader *nir, bool is_compute) in remove_barriers() argument
156 return nir_shader_intrinsics_pass(nir, remove_barriers_impl, in remove_barriers()
176 lower_demote(nir_shader *nir) in lower_demote() argument
178 return nir_shader_intrinsics_pass(nir, lower_demote_impl, in lower_demote()
216 optimize(nir_shader *nir) in optimize() argument
222 NIR_PASS(progress, nir, nir_lower_flrp, 32|64, true); in optimize()
[all …]
/external/mesa3d/src/intel/compiler/elk/
Delk_nir_lower_cs_intrinsics.c25 #include "compiler/nir/nir_builder.h"
28 nir_shader *nir; member
37 nir_shader *nir, in compute_local_index_id() argument
50 if (nir->info.workgroup_size_variable) { in compute_local_index_id()
55 size_x = nir_imm_int(b, nir->info.workgroup_size[0]); in compute_local_index_id()
56 size_y = nir_imm_int(b, nir->info.workgroup_size[1]); in compute_local_index_id()
78 switch (nir->info.cs.derivative_group) { in compute_local_index_id()
80 if (nir->info.num_images == 0 && in compute_local_index_id()
81 nir->info.num_textures == 0) { in compute_local_index_id()
89 } else if (!nir->info.workgroup_size_variable && in compute_local_index_id()
[all …]
/external/mesa3d/src/gallium/auxiliary/nir/
Dnir_to_tgsi_info.c33 #include "nir.h"
129 static void gather_intrinsic_load_deref_info(const nir_shader *nir, in gather_intrinsic_load_deref_info() argument
138 if (nir->info.stage == MESA_SHADER_FRAGMENT) in gather_intrinsic_load_deref_info()
142 switch (nir->info.stage) { in gather_intrinsic_load_deref_info()
160 static void scan_instruction(const struct nir_shader *nir, in scan_instruction() argument
241 gather_intrinsic_load_deref_info(nir, intr, deref, need_texcoord, var, info); in scan_instruction()
250 void nir_tgsi_scan_shader(const struct nir_shader *nir, in nir_tgsi_scan_shader() argument
256 info->processor = pipe_shader_type_from_mesa(nir->info.stage); in nir_tgsi_scan_shader()
260 pipe_shader_type_from_mesa(nir->info.next_stage); in nir_tgsi_scan_shader()
262 if (nir->info.stage == MESA_SHADER_VERTEX) { in nir_tgsi_scan_shader()
[all …]
/external/mesa3d/src/amd/vulkan/
Dradv_shader_info.c23 #include "nir/nir.h"
24 #include "nir/nir_xfb_info.h"
37 gather_intrinsic_load_input_info(const nir_shader *nir, const nir_intrinsic_instr *instr, struct ra… in gather_intrinsic_load_input_info() argument
39 switch (nir->info.stage) { in gather_intrinsic_load_input_info()
57 gather_intrinsic_store_output_info(const nir_shader *nir, const nir_intrinsic_instr *instr, in gather_intrinsic_store_output_info() argument
66 switch (nir->info.stage) { in gather_intrinsic_store_output_info()
107 if (nir->info.stage == MESA_SHADER_GEOMETRY) { in gather_intrinsic_store_output_info()
114 gather_push_constant_info(const nir_shader *nir, const nir_intrinsic_instr *instr, struct radv_shad… in gather_push_constant_info() argument
132 gather_intrinsic_info(const nir_shader *nir, const nir_intrinsic_instr *instr, struct radv_shader_i… in gather_intrinsic_info() argument
200 gather_push_constant_info(nir, instr, info); in gather_intrinsic_info()
[all …]
/external/mesa3d/src/gallium/frontends/rusticl/core/
Dkernel.rs10 use mesa_rust::compiler::nir::*;
85 fn from_spirv_nir(spirv: &[spirv::SPIRVKernelArg], nir: &mut NirShader) -> Vec<Self> { in from_spirv_nir()
86 let nir_arg_map: HashMap<_, _> = nir in from_spirv_nir()
95 let nir = nir_arg_map.get(&(i as i32)).unwrap(); in from_spirv_nir() localVariable
98 if unsafe { glsl_type_is_sampler(nir.type_) } { in from_spirv_nir()
111 if unsafe { glsl_type_is_image(nir.type_) } { in from_spirv_nir()
112 let access = nir.data.access(); in from_spirv_nir()
128 size: unsafe { glsl_get_cl_size(nir.type_) } as usize, in from_spirv_nir()
142 nir: &mut NirShader, in assign_locations()
144 for var in nir.variables_with_mode( in assign_locations()
[all …]

12345678910>>...54