summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIcecream95 <ixn@disroot.org>2020-12-23 01:54:01 +1300
committerMarge Bot <eric+marge@anholt.net>2021-01-01 02:58:49 +0000
commitfbc97ab125265e087b4d940a22dc358339a026fd (patch)
tree8e3db5a762d9bbb49f37f85093d56890a625b788
parent3448a42bf5b352d2fa3db02249d2c107c2dcc103 (diff)
pan/mdg: Implement load_global_invocation_id
NIR generates global_invocation_id, but Clover lowers it to global_invocation_id_zero_base. It isn't lowered for OpenGL, so we need to support both intrinsics. Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8264>
-rw-r--r--src/panfrost/midgard/midgard_compile.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/panfrost/midgard/midgard_compile.c b/src/panfrost/midgard/midgard_compile.c
index accb5bc9331..c0be6a79f72 100644
--- a/src/panfrost/midgard/midgard_compile.c
+++ b/src/panfrost/midgard/midgard_compile.c
@@ -1310,6 +1310,9 @@ compute_builtin_arg(nir_op op)
return 0x14;
case nir_intrinsic_load_local_invocation_id:
return 0x10;
+ case nir_intrinsic_load_global_invocation_id:
+ case nir_intrinsic_load_global_invocation_id_zero_base:
+ return 0x18;
default:
unreachable("Invalid compute paramater loaded");
}
@@ -1797,6 +1800,8 @@ emit_intrinsic(compiler_context *ctx, nir_intrinsic_instr *instr)
case nir_intrinsic_load_work_group_id:
case nir_intrinsic_load_local_invocation_id:
+ case nir_intrinsic_load_global_invocation_id:
+ case nir_intrinsic_load_global_invocation_id_zero_base:
emit_compute_builtin(ctx, instr);
break;