nir/opt_phi_precision: Work with libraries
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Karol Herbst <kherbst@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25625>
This commit is contained in:

committed by
Marge Bot

parent
cd1ba21958
commit
b1b7616418
@@ -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) {
|
||||
|
Reference in New Issue
Block a user