panfrost: Fix typo handling blend types
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Wed, 5 May 2021 15:27:32 +0000 (11:27 -0400)
committerMarge Bot <eric+marge@anholt.net>
Thu, 6 May 2021 23:26:21 +0000 (23:26 +0000)
This was right in my head.

Fixes: 93a176b6cff ("panfrost: Key blend shaders to the input types")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9239>

src/panfrost/lib/pan_blend.c

index a3b0c31..9c7877e 100644 (file)
@@ -562,11 +562,11 @@ pan_blend_create_shader(const struct panfrost_device *dev,
 
         /* Saturate integer conversions */
         for (int i = 0; i < ARRAY_SIZE(s_src); ++i) {
-                bool is_float = nir_alu_type_get_base_type(nir_type);
+                nir_alu_type T = nir_alu_type_get_base_type(nir_type);
                 s_src[i] = nir_convert_with_rounding(&b, s_src[i],
                                 src_types[i], nir_type,
                                 nir_rounding_mode_undef,
-                                !is_float);
+                                T != nir_type_float);
         }
 
         /* Build a trivial blend shader */