nir/lower_shader_calls: lower scratch access to format internally

For a follow up optimization, we would like to track scratch loads.
This isn't possible with global load/store intrinsics. So use a couple
of special intrinsic in the pass and only lower it to global
intrinsics at the end.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16556>
This commit is contained in:
Lionel Landwerlin
2022-05-18 18:29:10 +03:00
committed by Marge Bot
parent df685b4f9c
commit 5a9f8d21d0
3 changed files with 119 additions and 26 deletions

View File

@@ -644,6 +644,7 @@ visit_intrinsic(nir_shader *shader, nir_intrinsic_instr *instr)
case nir_intrinsic_load_topology_id_intel:
case nir_intrinsic_load_scratch_base_ptr:
case nir_intrinsic_ordered_xfb_counter_add_amd:
case nir_intrinsic_load_stack:
is_divergent = true;
break;