aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBoris Brezillon <[email protected]>2020-01-31 08:58:22 +0100
committerMarge Bot <[email protected]>2020-02-03 12:53:47 +0000
commit25946be4c451fe1cc645a6fd3cb5d59160e93f25 (patch)
treec5535fc0af74591a9244c0a9499748d2ee5098c9
parente62c3cf350a8b169e6401d5f1e1f17388cdc4b77 (diff)
pan/midgard: Add an enum to describe the render targets
We are about to add a special ZS render target, let's add a enum so we can easily know which render target we're dealing with. Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3676>
-rw-r--r--src/panfrost/midgard/compiler.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/panfrost/midgard/compiler.h b/src/panfrost/midgard/compiler.h
index 8a187e18572..317124b3921 100644
--- a/src/panfrost/midgard/compiler.h
+++ b/src/panfrost/midgard/compiler.h
@@ -222,6 +222,14 @@ typedef struct midgard_bundle {
bool last_writeout;
} midgard_bundle;
+enum midgard_rt_id {
+ MIDGARD_COLOR_RT0,
+ MIDGARD_COLOR_RT1,
+ MIDGARD_COLOR_RT2,
+ MIDGARD_COLOR_RT3,
+ MIDGARD_NUM_RTS,
+};
+
typedef struct compiler_context {
nir_shader *nir;
gl_shader_stage stage;
@@ -307,7 +315,7 @@ typedef struct compiler_context {
uint32_t quirks;
/* Writeout instructions for each render target */
- midgard_instruction *writeout_branch[4];
+ midgard_instruction *writeout_branch[MIDGARD_NUM_RTS];
} compiler_context;
/* Per-block live_in/live_out */