summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_pipeline.c
diff options
context:
space:
mode:
authorBas Nieuwenhuizen <[email protected]>2019-04-07 23:57:58 +0200
committerBas Nieuwenhuizen <[email protected]>2019-04-10 02:04:13 +0200
commit028ce527395642b68612d10c6030be5d4706a65e (patch)
tree7e7d8da918ff4e8f3be4575a0ab95f70c8ab4174 /src/amd/vulkan/radv_pipeline.c
parent282bacab4a80e06d1c7f19bf092952599ac9b5f5 (diff)
radv: Add non-uniform indexing lowering.
This patch does it as late as possible so the potential extra basic blocks don't inhibit other optimizations. Big thanks to Jason for writing the lowering pass. Reviewed-by: Samuel Pitoiset <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_pipeline.c')
-rw-r--r--src/amd/vulkan/radv_pipeline.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index d96ae9a4223..619b5a506ad 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -2178,6 +2178,11 @@ void radv_create_shaders(struct radv_pipeline *pipeline,
for (int i = 0; i < MESA_SHADER_STAGES; ++i) {
if (nir[i]) {
NIR_PASS_V(nir[i], nir_lower_bool_to_int32);
+ NIR_PASS_V(nir[i], nir_lower_non_uniform_access,
+ nir_lower_non_uniform_ubo_access |
+ nir_lower_non_uniform_ssbo_access |
+ nir_lower_non_uniform_texture_access |
+ nir_lower_non_uniform_image_access);
}
if (radv_can_dump_shader(device, modules[i], false))