aboutsummaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2018-03-21 17:30:22 -0700
committerJason Ekstrand <[email protected]>2018-06-22 20:15:57 -0700
commitb0c643d8f579a3e1e45a08f6d9de099f2c45898b (patch)
treeac8542d300020594bb08acf15b2d4dbf629208c2 /src/amd/vulkan
parent2100c2f3a25d402f3788b3049eb2c1ee3a01b42e (diff)
spirv: Use NIR per-member splitting
Before, we were doing structure splitting in spirv_to_nir. Unfortunately, this doesn't really work when you think about passing struct pointers into functions. Doing it later in NIR is a much better plan. 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/vulkan')
-rw-r--r--src/amd/vulkan/radv_shader.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c
index 1b6e11f49fe..5fd5d464406 100644
--- a/src/amd/vulkan/radv_shader.c
+++ b/src/amd/vulkan/radv_shader.c
@@ -266,6 +266,13 @@ radv_shader_compile_to_nir(struct radv_device *device,
* lower the rest of the constant initializers.
*/
NIR_PASS_V(nir, nir_lower_constant_initializers, ~0);
+
+ /* Split member structs. We do this before lower_io_to_temporaries so that
+ * it doesn't lower system values to temporaries by accident.
+ */
+ NIR_PASS_V(nir, nir_split_var_copies);
+ NIR_PASS_V(nir, nir_split_per_member_structs);
+
NIR_PASS_V(nir, nir_lower_system_values);
NIR_PASS_V(nir, nir_lower_clip_cull_distance_arrays);
}