summaryrefslogtreecommitdiffstats
path: root/src/amd
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2018-05-17 10:37:37 -0400
committerJason Ekstrand <[email protected]>2018-06-22 20:54:00 -0700
commitd143f6c8562e930562fc4902c1bf0013901cecf9 (patch)
treed6fc018eba9ebfe0eaa83ba02f9aae72be11d63a /src/amd
parentd7b0be48ef1a5a769ab159113d22bd35df520ab2 (diff)
move lower_deref_instrs
Signed-off-by: Rob Clark <[email protected]> Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/amd')
-rw-r--r--src/amd/vulkan/radv_pipeline.c2
-rw-r--r--src/amd/vulkan/radv_shader.c4
2 files changed, 2 insertions, 4 deletions
diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index 1f01d2ff4d6..1609b800208 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -2034,6 +2034,8 @@ void radv_create_shaders(struct radv_pipeline *pipeline,
nir[i] = nir_shader_clone(NULL, nir[i]);
}
+ NIR_PASS_V(nir[i], nir_lower_deref_instrs, ~0);
+
if (first != last) {
nir_variable_mode mask = 0;
diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c
index 147092511de..a0069de49d0 100644
--- a/src/amd/vulkan/radv_shader.c
+++ b/src/amd/vulkan/radv_shader.c
@@ -177,8 +177,6 @@ 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);
@@ -253,8 +251,6 @@ radv_shader_compile_to_nir(struct radv_device *device,
assert(exec_list_length(&nir->functions) == 1);
entry_point->name = ralloc_strdup(entry_point, "main");
- NIR_PASS_V(nir, nir_lower_deref_instrs, ~0);
-
/* Make sure we lower constant initializers on output variables so that
* nir_remove_dead_variables below sees the corresponding stores
*/