nak/nir: Lower tessellation and geometry I/O
We also need to call nir_lower_indirect_derefs. Even though we're not lowering anything away, we need to call it so that it will lower clip distance arrays. The pass always lowers compact array derfs. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24998>
This commit is contained in:
parent
93db2c1254
commit
c6c2c1b2b2
1 changed files with 9 additions and 0 deletions
|
|
@ -579,6 +579,7 @@ nak_nir_lower_system_value_instr(nir_builder *b, nir_instr *instr, void *data)
|
|||
case nir_intrinsic_load_subgroup_invocation:
|
||||
case nir_intrinsic_load_patch_vertices_in:
|
||||
case nir_intrinsic_load_helper_invocation:
|
||||
case nir_intrinsic_load_invocation_id:
|
||||
case nir_intrinsic_load_local_invocation_index:
|
||||
case nir_intrinsic_load_local_invocation_id:
|
||||
case nir_intrinsic_load_workgroup_id:
|
||||
|
|
@ -715,12 +716,20 @@ nak_postprocess_nir(nir_shader *nir,
|
|||
|
||||
nir_shader_gather_info(nir, nir_shader_get_entrypoint(nir));
|
||||
|
||||
OPT(nir, nir_lower_indirect_derefs, 0, UINT32_MAX);
|
||||
|
||||
switch (nir->info.stage) {
|
||||
case MESA_SHADER_VERTEX:
|
||||
OPT(nir, nak_nir_lower_vs_inputs);
|
||||
OPT(nir, nak_nir_lower_varyings, nir_var_shader_out);
|
||||
break;
|
||||
|
||||
case MESA_SHADER_TESS_CTRL:
|
||||
case MESA_SHADER_TESS_EVAL:
|
||||
case MESA_SHADER_GEOMETRY:
|
||||
OPT(nir, nak_nir_lower_varyings, nir_var_shader_in | nir_var_shader_out);
|
||||
break;
|
||||
|
||||
case MESA_SHADER_FRAGMENT:
|
||||
OPT(nir, nak_nir_lower_fs_inputs, fs_key);
|
||||
OPT(nir, nak_nir_lower_fs_outputs);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue