From 74212c2414ce04c1331f6c79d74bcc75ea5d4726 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Mon, 19 Mar 2018 10:50:40 -0700 Subject: anv,i965,radv,st,ir3: Call nir_lower_deref_instrs This inserts a call to nir_lower_deref_instrs at every call site of glsl_to_nir, spirv_to_nir, and prog_to_nir. Reviewed-by: Caio Marcelo de Oliveira Filho Acked-by: Rob Clark Acked-by: Bas Nieuwenhuizen Acked-by: Dave Airlie Reviewed-by: Kenneth Graunke --- src/amd/vulkan/radv_shader.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/amd') diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c index 7a5ade9ec7f..1b6e11f49fe 100644 --- a/src/amd/vulkan/radv_shader.c +++ b/src/amd/vulkan/radv_shader.c @@ -177,6 +177,8 @@ radv_shader_compile_to_nir(struct radv_device *device, assert(exec_list_length(&nir->functions) == 1); struct exec_node *node = exec_list_get_head(&nir->functions); entry_point = exec_node_data(nir_function, node, node); + + NIR_PASS_V(nir, nir_lower_deref_instrs, ~0); } else { uint32_t *spirv = (uint32_t *) module->data; assert(module->size % 4 == 0); @@ -234,6 +236,8 @@ radv_shader_compile_to_nir(struct radv_device *device, free(spec_entries); + NIR_PASS_V(nir, nir_lower_deref_instrs, ~0); + /* We have to lower away local constant initializers right before we * inline functions. That way they get properly initialized at the top * of the function and not at the top of its caller. -- cgit v1.2.3