Module: Mesa Branch: main Commit: 501475913321a5f7efc25e881074bda14c6bb9e5 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=501475913321a5f7efc25e881074bda14c6bb9e5
Author: Faith Ekstrand <[email protected]> Date: Tue Oct 24 15:15:54 2023 -0500 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 <[email protected]> Reviewed-by: Timur Kristóf <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25894> --- src/compiler/nir/nir_opcodes_c.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/nir/nir_opcodes_c.py b/src/compiler/nir/nir_opcodes_c.py index 2909a15da96..a6dd5a3807d 100644 --- a/src/compiler/nir/nir_opcodes_c.py +++ b/src/compiler/nir/nir_opcodes_c.py @@ -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:
