[Mesa-dev] [PATCH 069.1/129] FIXUP: move lower_deref_instrs
Bas Nieuwenhuizen
bas at basnieuwenhuizen.nl
Sun Jun 3 23:10:08 UTC 2018
---
src/amd/vulkan/radv_pipeline.c | 4 ++--
src/amd/vulkan/radv_shader.c | 2 --
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index 59bbab714df..f4d076db795 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -2025,6 +2025,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;
@@ -2034,8 +2036,6 @@ void radv_create_shaders(struct radv_pipeline *pipeline,
if (i != last)
mask = mask | nir_var_shader_out;
- NIR_PASS_V(nir[i], nir_lower_deref_instrs, ~0);
-
if (!(flags & VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT)) {
nir_lower_io_to_scalar_early(nir[i], mask);
radv_optimize_nir(nir[i], false);
diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c
index 61f141adffc..ff133ded722 100644
--- a/src/amd/vulkan/radv_shader.c
+++ b/src/amd/vulkan/radv_shader.c
@@ -250,8 +250,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
*/
--
2.17.0
More information about the mesa-dev
mailing list