vulkan: Call lower_clip_cull_distance_arrays in vk_spirv_to_nir
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17644>
This commit is contained in:
parent
85099804bf
commit
87ab287436
|
@ -385,7 +385,6 @@ preprocess_nir(nir_shader *nir)
|
|||
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);
|
||||
|
||||
|
|
|
@ -128,8 +128,6 @@ tu_spirv_to_nir(struct tu_device *dev,
|
|||
|
||||
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);
|
||||
|
|
|
@ -894,8 +894,6 @@ brw_preprocess_nir(const struct brw_compiler *compiler, nir_shader *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);
|
||||
|
|
|
@ -132,6 +132,12 @@ vk_spirv_to_nir(struct vk_device *device,
|
|||
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;
|
||||
|
|
Loading…
Reference in New Issue