summaryrefslogtreecommitdiffstats
path: root/src/intel
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/intel
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/intel')
-rw-r--r--src/intel/vulkan/anv_pipeline.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c
index b454624c37b..230f2f593e2 100644
--- a/src/intel/vulkan/anv_pipeline.c
+++ b/src/intel/vulkan/anv_pipeline.c
@@ -198,6 +198,12 @@ anv_shader_compile_to_nir(struct anv_pipeline *pipeline,
*/
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_remove_dead_variables,
nir_var_shader_in | nir_var_shader_out | nir_var_system_value);