lavapipe: add support for KHR_buffer_device_address.

Adds the missing magic lowering pass, and stores the pmem
pointer for easier returning to user.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9616>
This commit is contained in:
Dave Airlie
2021-03-16 11:15:47 +10:00
committed by Marge Bot
parent 7b8d53afdd
commit a986d1ed63
5 changed files with 40 additions and 2 deletions

View File

@@ -469,6 +469,7 @@ lvp_shader_compile_to_ir(struct lvp_pipeline *pipeline,
.draw_parameters = true,
.shader_viewport_index_layer = true,
.multiview = true,
.physical_storage_buffer_address = true,
},
.ubo_addr_format = nir_address_format_32bit_index_offset,
.ssbo_addr_format = nir_address_format_32bit_index_offset,
@@ -527,6 +528,10 @@ lvp_shader_compile_to_ir(struct lvp_pipeline *pipeline,
nir_var_mem_ubo | nir_var_mem_ssbo,
nir_address_format_32bit_index_offset);
NIR_PASS_V(nir, nir_lower_explicit_io,
nir_var_mem_global,
nir_address_format_64bit_global);
if (nir->info.stage == MESA_SHADER_COMPUTE) {
NIR_PASS_V(nir, nir_lower_vars_to_explicit_types, nir_var_mem_shared, shared_var_info);
NIR_PASS_V(nir, nir_lower_explicit_io, nir_var_mem_shared, nir_address_format_32bit_offset);