radv: change the needs_push_constants logic
[mesa.git] / src / amd / common / ac_shader_info.c
index 4df428ae81f2d3cc75b55f8f3adc1623f01c1502..6aadb5032e27a2fa2eb8417e0848e851614bf2a1 100644 (file)
@@ -148,10 +148,10 @@ 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->push_constant_size &&
-           !options->layout->dynamic_offset_count)
-               info->needs_push_constants = false;
+       info->needs_push_constants = false;
+       if (options->layout->push_constant_size ||
+           options->layout->dynamic_offset_count)
+               info->needs_push_constants = true;
 
        nir_foreach_variable(variable, &nir->inputs)
                gather_info_input_decl(nir, options, variable, info);