intel/rt: Add support for shader buffer record memory

Most of the work for this is done for us by spirv_to_nir which gives us
a load_global from a memory address based on the shader_record_ptr
system values.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7356>
This commit is contained in:
Jason Ekstrand
2020-08-06 16:49:50 -05:00
committed by Marge Bot
parent 9ba7d459a3
commit c3ddefa000
2 changed files with 18 additions and 3 deletions

View File

@@ -178,10 +178,12 @@ lower_rt_io_and_scratch(nir_shader *nir)
/* Now patch any derefs to I/O vars */
NIR_PASS_V(nir, lower_rt_io_derefs);
/* Finally, lower any remaining function_temp access to 64-bit global
* memory access.
/* Finally, lower any remaining function_temp and mem_constant access to
* 64-bit global memory access.
*/
NIR_PASS_V(nir, nir_lower_explicit_io, nir_var_function_temp,
NIR_PASS_V(nir, nir_lower_explicit_io,
nir_var_function_temp |
nir_var_mem_constant,
nir_address_format_64bit_global);
}