pan/bi: Enable mediump BLEND lowering
authorAlyssa Rosenzweig <alyssa@collabora.com>
Tue, 4 May 2021 20:05:38 +0000 (16:05 -0400)
committerMarge Bot <eric+marge@anholt.net>
Thu, 6 May 2021 23:26:21 +0000 (23:26 +0000)
Other lowerings will wait until we iron out various missing features.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9239>

src/panfrost/bifrost/bifrost_compile.c

index 7e422d0..70a305a 100644 (file)
@@ -3151,6 +3151,12 @@ bifrost_compile_shader_nir(nir_shader *nir,
         NIR_PASS_V(nir, nir_lower_vars_to_ssa);
         NIR_PASS_V(nir, nir_lower_io, nir_var_shader_in | nir_var_shader_out,
                         glsl_type_size, 0);
+
+        if (ctx->stage == MESA_SHADER_FRAGMENT) {
+                NIR_PASS_V(nir, nir_lower_mediump_io, nir_var_shader_out,
+                                ~0, false);
+        }
+
         NIR_PASS_V(nir, nir_lower_ssbo);
         NIR_PASS_V(nir, pan_nir_lower_zs_store);
         NIR_PASS_V(nir, pan_lower_sample_pos);