aboutsummaryrefslogtreecommitdiffstats
path: root/src/panfrost/midgard
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-08-06 14:07:10 -0700
committerAlyssa Rosenzweig <[email protected]>2019-08-12 12:43:02 -0700
commit15954ab6caa0327702b83d861a88c3c498f6d0f1 (patch)
treee4eed091e66e71b90f2f7903b41420960216586b /src/panfrost/midgard
parent7229af794b824a3c117611319cc22054f47fbbe6 (diff)
pan/midgard: Implement nir_intrinsic_load_num_work_groups
Just a sysval to route through. Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/panfrost/midgard')
-rw-r--r--src/panfrost/midgard/midgard_compile.c3
-rw-r--r--src/panfrost/midgard/midgard_compile.h1
2 files changed, 4 insertions, 0 deletions
diff --git a/src/panfrost/midgard/midgard_compile.c b/src/panfrost/midgard/midgard_compile.c
index ab9ea664cb7..460847e8266 100644
--- a/src/panfrost/midgard/midgard_compile.c
+++ b/src/panfrost/midgard/midgard_compile.c
@@ -330,6 +330,8 @@ midgard_nir_sysval_for_intrinsic(nir_intrinsic_instr *instr)
return PAN_SYSVAL_VIEWPORT_SCALE;
case nir_intrinsic_load_viewport_offset:
return PAN_SYSVAL_VIEWPORT_OFFSET;
+ case nir_intrinsic_load_num_work_groups:
+ return PAN_SYSVAL_NUM_WORK_GROUPS;
case nir_intrinsic_load_ssbo:
case nir_intrinsic_store_ssbo:
return midgard_sysval_for_ssbo(instr);
@@ -1575,6 +1577,7 @@ emit_intrinsic(compiler_context *ctx, nir_intrinsic_instr *instr)
case nir_intrinsic_load_viewport_scale:
case nir_intrinsic_load_viewport_offset:
+ case nir_intrinsic_load_num_work_groups:
emit_sysval_read(ctx, &instr->instr, -1, 3);
break;
diff --git a/src/panfrost/midgard/midgard_compile.h b/src/panfrost/midgard/midgard_compile.h
index a15d6c0cded..2eb873f39e4 100644
--- a/src/panfrost/midgard/midgard_compile.h
+++ b/src/panfrost/midgard/midgard_compile.h
@@ -67,6 +67,7 @@ enum {
PAN_SYSVAL_VIEWPORT_OFFSET = 2,
PAN_SYSVAL_TEXTURE_SIZE = 3,
PAN_SYSVAL_SSBO = 4,
+ PAN_SYSVAL_NUM_WORK_GROUPS = 5,
} pan_sysval;
#define PAN_TXS_SYSVAL_ID(texidx, dim, is_array) \