nir_shader_get_entrypoint(nir), true, false);
NIR_PASS(_, nir, nir_lower_system_values);
- NIR_PASS(_, nir, nir_lower_clip_cull_distance_arrays);
NIR_PASS(_, nir, nir_lower_alu_to_scalar, NULL, NULL);
NIR_PASS_V(nir, nir_lower_system_values);
- NIR_PASS_V(nir, nir_lower_clip_cull_distance_arrays);
-
NIR_PASS_V(nir, nir_lower_frexp);
ir3_optimize_loop(dev->compiler, nir);
};
OPT(nir_lower_subgroups, &subgroups_options);
- OPT(nir_lower_clip_cull_distance_arrays);
-
nir_variable_mode indirect_mask =
brw_nir_no_indirect_mask(compiler, nir->info.stage);
OPT(nir_lower_indirect_derefs, indirect_mask, UINT32_MAX);
nir_var_shader_call_data | nir_var_ray_hit_attrib,
NULL);
+ /* This needs to happen after remove_dead_vars because GLSLang likes to
+ * insert dead clip/cull vars and we don't want to clip/cull based on
+ * uninitialized garbage.
+ */
+ NIR_PASS_V(nir, nir_lower_clip_cull_distance_arrays);
+
NIR_PASS_V(nir, nir_propagate_invariant, false);
return nir;