pan/bi: Add support for load_point_coord

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7314>
diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c
index 5a8b0da..a55321e 100644
--- a/src/panfrost/bifrost/bifrost_compile.c
+++ b/src/panfrost/bifrost/bifrost_compile.c
@@ -585,6 +585,28 @@
 }
 
 static void
+bi_emit_point_coord(bi_context *ctx, nir_intrinsic_instr *instr)
+{
+        bi_instruction ins = {
+                .type = BI_LOAD_VAR,
+                .vector_channels = 2,
+                .dest = pan_dest_index(&instr->dest),
+                .dest_type = nir_type_float32,
+                .format = nir_type_float32,
+                .src = {
+                        BIR_INDEX_CONSTANT,
+                        BIR_INDEX_ZERO,
+                },
+                .src_types = {
+                        nir_type_uint32,
+                },
+                .constant.u64 = 20,
+        };
+
+        bi_emit(ctx, ins);
+}
+
+static void
 emit_intrinsic(bi_context *ctx, nir_intrinsic_instr *instr)
 {
 
@@ -664,6 +686,10 @@
                 bi_emit_front_face(ctx, instr);
                 break;
 
+        case nir_intrinsic_load_point_coord:
+                bi_emit_point_coord(ctx, instr);
+                break;
+
         default:
                 unreachable("Unknown intrinsic");
                 break;