summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConnor Abbott <cwabbott0@gmail.com>2017-07-31 14:08:14 -0700
committerConnor Abbott <cwabbott0@gmail.com>2017-08-08 12:05:25 -0700
commit838e618146a22472abbf839f69812d9c8d08d399 (patch)
treeeb96e1858b7ee7577f56510464382cb0ae969cce
parentc409b51c3343e886708221c9b67e3336ee5672e3 (diff)
radv: call nir_opt_intrinsics()
For us, this will only lower subgroup mask instructions. It could do other things in the future though.
-rw-r--r--src/amd/vulkan/radv_pipeline.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index bd5eeb776c..e2fec93db6 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -65,6 +65,8 @@ static const struct nir_shader_compiler_options nir_options = {
.lower_unpack_unorm_4x8 = true,
.lower_extract_byte = true,
.lower_extract_word = true,
+ .lower_subgroup_masks = true,
+ .max_subgroup_size = 64,
.max_unroll_iterations = 32
};
@@ -154,6 +156,7 @@ radv_optimize_nir(struct nir_shader *shader)
NIR_PASS_V(shader, nir_lower_64bit_pack);
NIR_PASS_V(shader, nir_lower_alu_to_scalar);
NIR_PASS_V(shader, nir_lower_phis_to_scalar);
+ NIR_PASS_V(shader, nir_opt_intrinsics);
NIR_PASS(progress, shader, nir_copy_prop);
NIR_PASS(progress, shader, nir_opt_remove_phis);