From: Alyssa Rosenzweig Date: Tue, 5 Sep 2023 21:19:50 +0000 (-0400) Subject: nir/opt_phi_precision: Work with libraries X-Git-Tag: upstream/23.3.3~967 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b1b7616418ad1f032e6c7acb158ae247ae90c7f7;p=platform%2Fupstream%2Fmesa.git nir/opt_phi_precision: Work with libraries Signed-off-by: Alyssa Rosenzweig Reviewed-by: Karol Herbst Part-of: --- diff --git a/src/compiler/nir/nir_opt_phi_precision.c b/src/compiler/nir/nir_opt_phi_precision.c index 9d41860..d1c74e0 100644 --- a/src/compiler/nir/nir_opt_phi_precision.c +++ b/src/compiler/nir/nir_opt_phi_precision.c @@ -444,13 +444,10 @@ nir_opt_phi_precision(nir_shader *shader) unsigned bit_sizes_used = shader->info.bit_sizes_float | shader->info.bit_sizes_int; - if (!bit_sizes_used) { - nir_shader_gather_info(shader, nir_shader_get_entrypoint(shader)); - bit_sizes_used = shader->info.bit_sizes_float | - shader->info.bit_sizes_int; - } - - if (!(bit_sizes_used & (8 | 16))) + /* Note: if the info is zeroed, we conservatively run to avoid gathering + * info, which doesn't work for libraries. + */ + if (bit_sizes_used && !(bit_sizes_used & (8 | 16))) return false; nir_foreach_function_impl(impl, shader) {