radv: remove one useless check in ac_nir_shader_info_pass()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 18 Dec 2017 18:38:55 +0000 (19:38 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 19 Dec 2017 20:22:12 +0000 (21:22 +0100)
pipeline->layout can't be NULL now.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/common/ac_shader_info.c

index 3299b47e6b879f97b7934dd7fa4e947eec3df040..4df428ae81f2d3cc75b55f8f3adc1623f01c1502 100644 (file)
@@ -149,10 +149,8 @@ ac_nir_shader_info_pass(struct nir_shader *nir,
        struct nir_function *func = (struct nir_function *)exec_list_get_head(&nir->functions);
 
        info->needs_push_constants = true;
-       if (!options->layout)
-               info->needs_push_constants = false;
-       else if (!options->layout->push_constant_size &&
-                !options->layout->dynamic_offset_count)
+       if (!options->layout->push_constant_size &&
+           !options->layout->dynamic_offset_count)
                info->needs_push_constants = false;
 
        nir_foreach_variable(variable, &nir->inputs)