Lines Matching defs:nir

10 #include "nir/nir_xfb_info.h"
11 #include "nir/nir_vulkan.h"
87 nir_shader *nir;
92 mem_ctx, &nir);
97 fprintf(stderr, "translated nir:\n");
98 nir_print_shader(nir, stderr);
104 NIR_PASS_V(nir, nir_lower_sysvals_to_varyings, &sysvals_to_varyings);
106 NIR_PASS_V(nir, nir_lower_global_vars_to_local);
107 NIR_PASS_V(nir, nir_split_var_copies);
108 NIR_PASS_V(nir, nir_lower_var_copies);
110 NIR_PASS_V(nir, nir_opt_copy_prop_vars);
111 NIR_PASS_V(nir, nir_opt_combine_stores, nir_var_all);
113 NIR_PASS_V(nir, nir_lower_is_helper_invocation);
115 NIR_PASS_V(nir, nir_lower_system_values);
117 NIR_PASS_V(nir, nir_lower_frexp);
119 ir3_optimize_loop(dev->compiler, nir);
121 NIR_PASS_V(nir, nir_opt_conditional_discard);
123 return nir;
678 tu_gather_xfb_info(nir_shader *nir, struct ir3_stream_output_info *info)
680 nir_shader_gather_xfb_info(nir);
682 if (!nir->xfb_info)
685 nir_xfb_info *xfb = nir->xfb_info;
690 nir_foreach_shader_out_variable(var, nir) {
721 nir_shader *nir,
735 NIR_PASS_V(nir, nir_opt_access, &(nir_opt_access_options) {
740 if (nir->info.stage == MESA_SHADER_FRAGMENT) {
741 NIR_PASS_V(nir, nir_lower_input_attachments,
759 ir3_nir_lower_io_to_temporaries(nir);
761 if (nir->info.stage == MESA_SHADER_VERTEX && key->multiview_mask) {
762 tu_nir_lower_multiview(nir, key->multiview_mask,
766 if (nir->info.stage == MESA_SHADER_FRAGMENT && key->force_sample_interp) {
767 nir_foreach_shader_in_variable(var, nir) {
773 NIR_PASS_V(nir, nir_lower_explicit_io, nir_var_mem_push_const,
776 NIR_PASS_V(nir, nir_lower_explicit_io,
780 NIR_PASS_V(nir, nir_lower_explicit_io,
784 if (nir->info.stage == MESA_SHADER_COMPUTE) {
785 NIR_PASS_V(nir, nir_lower_vars_to_explicit_types,
787 NIR_PASS_V(nir, nir_lower_explicit_io,
791 if (nir->info.zero_initialize_shared_memory && nir->info.shared_size > 0) {
798 const unsigned shared_size = ALIGN(nir->info.shared_size, chunk_size);
799 NIR_PASS_V(nir, nir_zero_initialize_shared_memory, shared_size, chunk_size);
805 NIR_PASS_V(nir, nir_lower_compute_system_values, &compute_sysval_options);
808 nir_assign_io_var_locations(nir, nir_var_shader_in, &nir->num_inputs, nir->info.stage);
809 nir_assign_io_var_locations(nir, nir_var_shader_out, &nir->num_outputs, nir->info.stage);
818 if (nir->info.stage == MESA_SHADER_VERTEX ||
819 nir->info.stage == MESA_SHADER_TESS_EVAL ||
820 nir->info.stage == MESA_SHADER_GEOMETRY)
821 tu_gather_xfb_info(nir, &so_info);
823 NIR_PASS_V(nir, tu_lower_io, dev, shader, layout);
825 nir_shader_gather_info(nir, nir_shader_get_entrypoint(nir));
827 ir3_finalize_nir(dev->compiler, nir);
835 ir3_shader_from_nir(dev->compiler, nir, &(struct ir3_shader_options) {