agx: Add branch target to IR
authorAlyssa Rosenzweig <alyssa@collabora.com>
Wed, 26 May 2021 23:51:19 +0000 (19:51 -0400)
committerAlyssa Rosenzweig <alyssa@rosenzweig.io>
Sun, 30 May 2021 19:53:35 +0000 (01:23 +0530)
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11023>

src/asahi/compiler/agx_compiler.h
src/asahi/compiler/agx_opcodes.py

index 9625244..e5cbfaf 100644 (file)
@@ -240,6 +240,9 @@ enum agx_dim {
    AGX_DIM_TEX_CUBE_ARRAY = 7
 };
 
+/* Forward declare for branch target */
+struct agx_block;
+
 typedef struct {
    /* Must be first */
    struct list_head link;
@@ -263,6 +266,7 @@ typedef struct {
       enum agx_format format;
       enum agx_round round;
       enum agx_lod_mode lod_mode;
+      struct agx_block *target;
    };
 
    /* Invert icond/fcond */
index ac4941a..43ba78d 100644 (file)
@@ -88,6 +88,7 @@ ICOND = immediate("icond")
 FCOND = immediate("fcond")
 NEST = immediate("nest")
 INVERT_COND = immediate("invert_cond")
+TARGET = immediate("target", "agx_block *")
 
 FUNOP = lambda x: (x << 28)
 FUNOP_MASK = FUNOP((1 << 14) - 1)