radv: Do non-uniform lowering before bool lowering.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Sun, 28 Jul 2019 20:31:00 +0000 (22:31 +0200)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tue, 6 Aug 2019 15:48:50 +0000 (15:48 +0000)
Since it can introduce comparisons.

Fixes: 028ce527395 "radv: Add non-uniform indexing lowering."
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/amd/vulkan/radv_pipeline.c

index d722d558a434b4fca4045156e8c258c3e4f2bf91..86f0dc11089d0656800fdbdf5192a77e53055404 100644 (file)
@@ -2528,12 +2528,12 @@ 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);
+                       NIR_PASS_V(nir[i], nir_lower_bool_to_int32);
                }
 
                if (radv_can_dump_shader(device, modules[i], false))