pan/bi: Lower gl_PointSize to FP16 on Valhall
authorAlyssa Rosenzweig <alyssa@collabora.com>
Fri, 28 Jan 2022 17:07:41 +0000 (12:07 -0500)
committerMarge Bot <emma+marge@anholt.net>
Thu, 7 Apr 2022 14:20:45 +0000 (14:20 +0000)
It is unclear if FP32 point sizes are supported on Valhall -- I can't get the
DDK to use them at any rate. Always lower them to FP16 and store them as FP16
for hardware use.

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

src/panfrost/bifrost/bifrost_compile.c

index 65dec9f52f7491a8f82c9b1f138e0f859da5046a..32a3691882e5d8ea87b34f2d4258df7a0b53420f 100644 (file)
@@ -4380,6 +4380,11 @@ bi_finalize_nir(nir_shader *nir, unsigned gpu_id, bool is_blend)
                 NIR_PASS_V(nir, nir_lower_mediump_io, nir_var_shader_out,
                                 ~0, false);
         } else {
+                if (gpu_id >= 0x9000) {
+                        NIR_PASS_V(nir, nir_lower_mediump_io, nir_var_shader_out,
+                                        BITFIELD64_BIT(VARYING_SLOT_PSIZ), false);
+                }
+
                 struct hash_table_u64 *stores = _mesa_hash_table_u64_create(NULL);
                 NIR_PASS_V(nir, nir_shader_instructions_pass,
                                 bifrost_nir_lower_store_component,