nir: Return b2b ops from nir_type_conversion_op()

Without this, nir_type_conversion_op(bool, bool32, RND) will return
u2u32 instead of b2b32 which is pretty unexpected behavior.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25894>
This commit is contained in:
Faith Ekstrand 2023-10-24 15:15:54 -05:00 committed by Marge Bot
parent d5c310899a
commit 5014759133

View file

@ -67,7 +67,7 @@ nir_type_conversion_op(nir_alu_type src, nir_alu_type dst, nir_rounding_mode rnd
% else:
<% dst_t = src_t %>
% endif
% elif src_t == 'bool' and dst_t in ['int', 'uint', 'bool']:
% elif src_t == 'bool' and dst_t in ['int', 'uint']:
% if dst_t == 'int':
<% continue %>
% else: